November 20241:15:531.6k views

Joint stream with Joe Tannenbaum

About

Joe Tannenbaum and I pair on scrolling for a terminal UI: slicing the wrapped lines to fit the screen, clamping the scroll position, and working out auto-scroll.

Transcript

Everything we said

00:00

Aaron Francis

All right. It looks like... Let's check the profile here. Hey, there we go. Hey, we're both there.

00:07

Joe Tannenbaum

Hey.

00:08

Aaron Francis

Look at that.

00:09

Joe Tannenbaum

There we go.

00:10

Aaron Francis

Okay.

00:11

Joe Tannenbaum

Infinity, infinity stream.

00:12

Aaron Francis

Uh-huh. We'll start to see... We should start to see a little bit of the chat. Uh, oh, you can't see the chat, so if you wanted to pull up, um, uh-

00:21

Joe Tannenbaum

Oh, just pull it up separately.

00:24

Aaron Francis

Yeah, Twitter chat-

00:25

Joe Tannenbaum

Yeah, let's see

00:25

Aaron Francis

... or YouTube chat, or you could pull up, you could pull up this actual stream and put it on mute and watch the chat over there, but that's a little-

00:33

Joe Tannenbaum

Yeah. Maybe I'll-

00:34

Aaron Francis

Let's see.

00:35

Joe Tannenbaum

Yeah. We'll go to Twitter and sure.

00:41

Aaron Francis

And I think it auto-tweeted for me. Joint stream with Joe Tannenbaum. There we go.

00:47

Joe Tannenbaum

Mm-mm.

00:50

Aaron Francis

Okay. And let's make sure we are on YouTube as well.

00:59

Joe Tannenbaum

Oh, it'd be cool if I just didn't have to play it. I think I can just not play it and I can still see the chat, I think is how it works. I'm not really sure.

01:05

Aaron Francis

Smart.

01:05

Joe Tannenbaum

I see a chat window. Guess, I guess we'll see.

01:08

Aaron Francis

Smart, smart, smart, smart. Okay, if anyone is here, please start chatting so we can see that it is working. I have overlaid Joe over the chat just a little bit, but that should be fine. Oh, there we go. All right. It looks like, uh, chat is coming through on Twitter, but I'm not seeing chat coming through on Restream.

01:38

Hm. I don't know. I think Restream changed a bunch of stuff. It is working on Twitter.

01:52

Joe Tannenbaum

Is it? No, no, no, I'm not.

01:52

Aaron Francis

I see chat on Twitter. I see-

01:55

Joe Tannenbaum

Oh, okay. I see a chat here

01:56

Aaron Francis

... Restream chat coming in. All right. Restream chat, refresh. Hey, there's some Twitch chat. There's a LinkedIn chat. I see Restream telling me that it's ready. Oh, there we go. Now we're starting. All right. So we missed a few, but now they're coming in. Looking good today. That's the kind of chat I wanna hear.

02:19

Joe Tannenbaum

Yeah, yeah.

02:19

Aaron Francis

Looking good today.

02:19

Joe Tannenbaum

Keep, keep that banter up.

02:20

Aaron Francis

Yeah, appreciate it. Keep that one coming. We like that. Okay. Yes, we are working on our, um, we're working on the TUI. Um, quick question for you, Joe. What is a TUI?

02:34

Joe Tannenbaum

A TUI's a text-based user interface, so conventional interface built via concatenating strings together to make it look like a real thing, or as real-

02:44

Aaron Francis

Okay

02:44

Joe Tannenbaum

... as you wanna make it, to be honest.

02:46

Aaron Francis

Okay.

02:46

Joe Tannenbaum

Yeah. And in our case, uh, you can build them anywhere, but we are building them in the terminal primarily, because that's the only way you can build interfaces in the terminal. You can't... There's no graphical interface, it's just a bunch of text, so.

03:00

Aaron Francis

Okay.

03:00

Joe Tannenbaum

Yeah.

03:00

Aaron Francis

So it's-

03:01

Joe Tannenbaum

That's a TUI

03:01

Aaron Francis

... it's text, not terminal. I kind of thought it was terminal, but I like text. Um-

03:07

Joe Tannenbaum

Oh, yeah. Text. Text, yeah.

03:10

Aaron Francis

We just happen to be doing it in the terminal. Um, okay. I have, I've gotten some notes that my audio is low, but I just turned down Joe, so, uh, I think we should be more-

03:19

Joe Tannenbaum

Okay

03:19

Aaron Francis

... even now. So if I'm still low compared to Joe, please let me know. Otherwise, we're just gonna power through. Hey, Nate.

03:28

Joe Tannenbaum

Cool.

03:29

Aaron Francis

Um, okay. So here's what, uh, here's what we were working with when we last left off, and what I need you for is I don't actually know how to do any of this, so that's the problem. You... I, I watched, I watched your Laracast course, and then just kind of like took off into the wilderness by myself, um, and-

03:49

Joe Tannenbaum

But, but so confidently. I mean, you, you immediately were like- ... "We should use loopables," and I was like, "Oh, we're going loopables right away. I love this. This is great."

03:58

Aaron Francis

I know. That is one of my great strengths is being very confident- ... even in the face of ignorance. Um, okay, so we have app dev, which great first start, 'cause this is, this is broken.

04:09

Joe Tannenbaum

Uh-huh. Okay, cool.

04:09

Aaron Francis

Um, but, um, one of the problems here, uh, so we're, we've like scrolled the menu off the screen, but if you hit the right arrow, you can kind of see what it's supposed to look like. Um-

04:20

Joe Tannenbaum

Right

04:21

Aaron Francis

... and so I think one thing... Let's see. Where do we wanna start? One, I want, I wanna have this like, uh, middle window part, like this part here, I need that to be scrollable. Um-

04:35

Joe Tannenbaum

Okay

04:36

Aaron Francis

... I also want these tabs to be more consistently pinned to the top, and the, like the hot keys more consistent-

04:44

Joe Tannenbaum

Oh, you're moving it around right now.

04:45

Aaron Francis

Yeah.

04:46

Joe Tannenbaum

Okay.

04:46

Aaron Francis

So like that. Something weird is happening there.

04:51

Joe Tannenbaum

Show me. Oh, well first of all, that, uh, is that just the logs? Is that what's happening? Yeah.

04:55

Aaron Francis

That's the logs.

04:55

Joe Tannenbaum

Okay, so you're getting-

04:56

Aaron Francis

Yeah

04:56

Joe Tannenbaum

... you're getting real logs, so you're, you're getting too much information.

04:59

Aaron Francis

Mm-hmm.

04:59

Joe Tannenbaum

So immediately we need to just like confine that to the height of the terminal, and also it looks like we need to do some like wrapping here, 'cause I think you're getting, uh-

05:08

Aaron Francis

Oh. Oh, oh, oh, oh, oh

05:09

Joe Tannenbaum

... lines that are too long, and so it's, it's getting a little confused. So let's look at, let's, let's start there.

05:14

Aaron Francis

I see.

05:14

Joe Tannenbaum

Let's look at that.

05:15

Aaron Francis

Okay.

05:15

Joe Tannenbaum

And we can get that scrolling.

05:16

Aaron Francis

Um-

05:16

Joe Tannenbaum

I assume you kind of want the logs to scroll, I would say.

05:19

Aaron Francis

I do, yeah. I want people-

05:21

Joe Tannenbaum

Okay

05:21

Aaron Francis

... um, I want people to be able to pause the output. Um-

05:27

Joe Tannenbaum

Okay.

05:28

Aaron Francis

Well, I don't know. I at least want people to be able to scroll back and see the stuff that was happening before, if that makes sense.

05:35

Joe Tannenbaum

Okay, let's start there. That's a good place to start.

05:37

Aaron Francis

Okay.

05:37

Joe Tannenbaum

I like that.

05:37

Aaron Francis

Okay. So here's kind of the, um, here's the setup. I have this dashboard renderer.

05:45

Joe Tannenbaum

Okay.

05:45

Aaron Francis

Um, and I kind of stole, I stole your concept of tabs here. Um-

05:49

Joe Tannenbaum

Right

05:49

Aaron Francis

... and then I think you're right. I didn't account for line wrapping. So this is where I say, "Take the last 20 lines and just throw them out into- Throw 'em out into the, the terminal. And we are, we are on tuple

06:04

Joe Tannenbaum

So it's already coming in as individual lines, right?

06:06

Aaron Francis

It's coming in as individual lines.

06:07

Joe Tannenbaum

It's already coming in.

06:08

Aaron Francis

Mm-hmm.

06:08

Joe Tannenbaum

Okay. That's good.

06:09

Aaron Francis

Um, so if you look over here, um, it's like gathers, gathers output, uh, keeps track of the latest output and explodes it by line, and it just keeps track of the last 500.

06:25

Joe Tannenbaum

Okay. Yeah. Perfect. All right, so let's let me merge this line. Yeah. Okay.

06:31

Aaron Francis

And the lines are just up here.

06:32

Joe Tannenbaum

Very cool. Like that.

06:33

Aaron Francis

So-

06:33

Joe Tannenbaum

Great

06:33

Aaron Francis

... eh, good idea, bad idea, I don't know, but, um-

06:36

Joe Tannenbaum

Perfect

06:36

Aaron Francis

... it's working.

06:37

Joe Tannenbaum

Um, so we can do this-

06:39

Aaron Francis

Okay

06:39

Joe Tannenbaum

... one of two ways. As lines come in, we can wrap them-

06:43

Aaron Francis

Mm-hmm

06:43

Joe Tannenbaum

... and then make those individual lines themselves. So basically, like, if you-

06:47

Aaron Francis

Mm-hmm

06:47

Joe Tannenbaum

... I'm just gonna type some nonsense in here-

06:48

Aaron Francis

Yeah

06:48

Joe Tannenbaum

... for a second. If you have-

06:50

Aaron Francis

Yeah, this is awesome. Look at this

06:51

Joe Tannenbaum

... a very long line, um-

06:53

Aaron Francis

Uh-huh

06:54

Joe Tannenbaum

... we can, we can word wrap all of those, re-explode them, and then make it a very long, and then the next array item would be line. And then we just have a consistent behavior here, which is, like, we can take 20 of those. So the only, the only caveat there is that the gathers output would have to know, like, how wide the area is, which is not a big deal.

07:16

Aaron Francis

Mm-hmm.

07:16

Joe Tannenbaum

We could pass that along. Um, or we can handle it here, which is a little bit messier, but not the end of the world. Where would you like to do that?

07:23

Aaron Francis

Um, I have a preference.

07:26

Joe Tannenbaum

Okay.

07:27

Aaron Francis

Um, I would prefer to handle it in the renderer. This feels like a rendering-

07:31

Joe Tannenbaum

Okay

07:31

Aaron Francis

... concern. The fact-

07:32

Joe Tannenbaum

Okay

07:32

Aaron Francis

... that, uh, the command or the terminal width changes feels like the, the gathers output should keep track of all the logs and the renderer should, uh, adjust them as, as necessary.

07:44

Joe Tannenbaum

Little, little separation of concerns here. Um, I'm-

07:46

Aaron Francis

Yep

07:46

Joe Tannenbaum

... I dig it.

07:47

Aaron Francis

Yeah.

07:47

Joe Tannenbaum

Um, okay. So, so, um, here's what-- Do you want-- Like, my approach, I think, would be, uh, do you want me to just type some stuff out and you see if you dig it? Or do you want to-

08:02

Aaron Francis

Yeah

08:02

Joe Tannenbaum

... talk through it? Okay.

08:03

Aaron Francis

No.

08:04

Joe Tannenbaum

Um, we know we're, we're saying we have space for basically 20 lines. We know that, right?

08:09

Aaron Francis

Uh, it-

08:10

Joe Tannenbaum

That's what it basically is saying for now

08:10

Aaron Francis

... that's what we're doing. I don't know if we know that, but yeah.

08:12

Joe Tannenbaum

For now. Okay.

08:13

Aaron Francis

Mm-hmm.

08:14

Joe Tannenbaum

So, uh, before we do the each line, what I would do is I would flat map this-

08:21

Aaron Francis

Mm-hmm

08:21

Joe Tannenbaum

... and I would say, um, so we're just getting the individual lines here. So, uh, line... Okay.

08:30

Aaron Francis

Oh, yeah, your key bindings are all off.

08:32

Joe Tannenbaum

Maybe.

08:32

Aaron Francis

Yeah.

08:34

Joe Tannenbaum

So line equals word wrap, and-

08:37

Aaron Francis

Mm-hmm

08:38

Joe Tannenbaum

... uh, we need... Do we have a width somewhere set somewhere? Oh, I see a width up here. We can use that.

08:42

Aaron Francis

Uh, yeah. I think it's, I think it's up there.

08:45

Joe Tannenbaum

Width. Okay. So we're gonna word wrap the line to, we're actually gonna use this, which I think is string. No, what is the, uh, what is the argument name? Am I not getting a hover? I don't see a hover.

09:00

Aaron Francis

Oh, here. I'll do it. I'm gonna-

09:01

Joe Tannenbaum

Are you getting a hover? Uh, string-

09:04

Aaron Francis

String width break cut

09:05

Joe Tannenbaum

... yeah. Okay. So if we take, uh, this line-

09:10

Aaron Francis

Mm-hmm

09:10

Joe Tannenbaum

... and then we do, uh, yep, width. Okay. You're with me. Um, and then we also want to cut long words. Cut long words true. Okay. So whoop, and then we return. It's the little-

09:30

Aaron Francis

You're operating, you're operating in a foreign environment here too.

09:33

Joe Tannenbaum

Uh, PHP end of line, uh, line.

09:37

Aaron Francis

Oh, okay.

09:37

Joe Tannenbaum

And so that's gonna give us that, and then we retake the last 20, meaning, like, whatever the resulting-

09:43

Aaron Francis

Oh

09:43

Joe Tannenbaum

... we may now have more lines there.

09:45

Aaron Francis

Uh-huh. Uh-huh. Uh-huh.

09:46

Joe Tannenbaum

Uh, but they should've been flat mapped down to like a, a flattened array, and now, now we should be ready to roll. I don't know-

09:53

Aaron Francis

Okay. This is clever. So-

09:54

Joe Tannenbaum

I think we're saving, but I don't know.

09:55

Aaron Francis

Yeah, I don't-- I'll take over. So we're taking the last 20 to-

09:59

Joe Tannenbaum

Yeah

09:59

Aaron Francis

... limit how much we have to flat map, and then-

10:02

Joe Tannenbaum

Right

10:02

Aaron Francis

... we'll likely end up with a few extra, so we're taking the last 20 again.

10:07

Joe Tannenbaum

Yeah.

10:07

Aaron Francis

Um, so now if we stop that-

10:10

Joe Tannenbaum

Maybe. Hopefully

10:10

Aaron Francis

... and start it again. Hey, that worked. That worked great.

10:15

Joe Tannenbaum

Come on.

10:15

Aaron Francis

Look at that.

10:16

Joe Tannenbaum

Great. Love that.

10:17

Aaron Francis

Okay.

10:18

Joe Tannenbaum

Okay.

10:18

Aaron Francis

Um-

10:18

Joe Tannenbaum

So now we have that.

10:19

Aaron Francis

So then here's the other thing. Um, so we're on logs. We have at least 20 lines, which needs to be calculated better. Then you switch to JavaScript and look at where the hotkeys go. So help me understand. You see how the hotkeys pop up?

10:33

Joe Tannenbaum

Yep. Yep.

10:34

Aaron Francis

Help me understand what, uh, what pin to bottom does, if not-

10:39

Joe Tannenbaum

Yeah. That's interesting

10:40

Aaron Francis

... pin it to bottom.

10:41

Joe Tannenbaum

Um, well, I wonder if we're potentially, uh, our height and our, our, our 20 is not matching up correctly.

10:48

Aaron Francis

Oh.

10:48

Joe Tannenbaum

Meaning, like, maybe 20's too-

10:50

Aaron Francis

Oh, oh, oh, oh

10:50

Joe Tannenbaum

... too much. Uh, do you wanna just dump height real quick and just see what-

10:54

Aaron Francis

Yes

10:54

Joe Tannenbaum

... the value is? Oh, by the way-

10:56

Aaron Francis

Yeah

10:56

Joe Tannenbaum

... um, we should run this with no alt screen, 'cause as soon as you dump, it's gonna, like, bounce the alt screen 'cause it thinks-

11:02

Aaron Francis

Yeah

11:02

Joe Tannenbaum

... something crazy happened.

11:03

Aaron Francis

That was, that was weird to me. Um, so tell me again what it is. It's-

11:06

Joe Tannenbaum

So it's, uh, no, br-br-br, alt screen. I built this in for myself 'cause I got so tired of disabling it and then run-

11:14

Aaron Francis

Oh, this is, this is not like a system thing? This is a Joe thing?

11:18

Joe Tannenbaum

This is a Joe thing, yeah.

11:20

Aaron Francis

Okay.

11:20

Joe Tannenbaum

This is a me thing.

11:21

Aaron Francis

Okay.

11:21

Joe Tannenbaum

So and then, and now, now AR app dev, I'm gonna let you t- do most of the typing here-

11:26

Aaron Francis

Yeah

11:26

Joe Tannenbaum

... since I'm bothering you.

11:27

Aaron Francis

Uh, AR app dev. I just turned Joe up, so sorry about the, the audio. I, you know, we'll figure it out. Um, okay. 21 is the height.

11:36

Joe Tannenbaum

Oh, oh, oh. 21. So, so yeah, we have too many, we're taking too many lines.

11:40

Aaron Francis

I see.

11:40

Joe Tannenbaum

So let's actually make this official. Instead of 20-

11:43

Aaron Francis

Yes

11:43

Joe Tannenbaum

... we know we've got a line of tabs. Uh, we probably have three lines up top, and let's say two lines on the bottom, so let's just say six. So just say height minus six.

11:53

Aaron Francis

So we'll say height less six. And then we'll come here and-

11:57

Joe Tannenbaum

And then we should have a better scenario Uh, except you went negative that, I believe, right?

12:05

Aaron Francis

Correct. The last one.

12:05

Joe Tannenbaum

It was even the last of that. Yeah.

12:08

Aaron Francis

Um-

12:08

Joe Tannenbaum

Now we should be hopefully in a better place.

12:12

Aaron Francis

We should be at least in a consistent place. There we go.

12:15

Joe Tannenbaum

Oh, baby. That's what I'm talking about.

12:17

Aaron Francis

There we go.

12:17

Joe Tannenbaum

So we can always adjust that to how much height we think we actually are taking up with other elements on the, the screen.

12:22

Aaron Francis

Right. Okay.

12:22

Joe Tannenbaum

'Cause it looks like it's, it looks like it's one, two... And we already are buffering height, so we may not-- We could adjust that value-

12:30

Aaron Francis

Ah

12:30

Joe Tannenbaum

... according to, you know, what we actually need.

12:34

Aaron Francis

Okay. So-

12:35

Joe Tannenbaum

Oh, yeah. That looks great. Cool.

12:40

Aaron Francis

Um, okay. So I wanna move these all the way to the top. Why is it being centered, uh, vertically? Is that something I've done?

12:46

Joe Tannenbaum

Uh, I don't know. Let's see. Uh, center horizontally.

12:49

Aaron Francis

Center horizontally.

12:50

Joe Tannenbaum

It might be because-

12:51

Aaron Francis

Do we have a-

12:54

Joe Tannenbaum

Well, we're, we're doing minus... Wait, center horizontally. Oh, well, here, first of all. Wait, tabs implode. Oh, okay. That's fine. New line. Let's just say, this might totally break it, so just like, you know, we'll see. But let's see if that does something. Oh, I can't switch via tab.

13:14

Aaron Francis

Yeah. I'll switch.

13:15

Joe Tannenbaum

You, you switched to that. Uh, see if that breaks it or does anything. Hmm, you do have a, kind of a big buffer up top there, huh?

13:25

Aaron Francis

Right?

13:26

Joe Tannenbaum

Uh...

13:28

Aaron Francis

We hate a big buffer. We hate it. Um, so you keep-

13:32

Joe Tannenbaum

Yeah, I'm not really sure, to be honest

13:33

Aaron Francis

... you keep thinking.

13:34

Joe Tannenbaum

Yeah, I'm not sure.

13:35

Aaron Francis

Let's, uh-

13:35

Joe Tannenbaum

We'll have to figure that out.

13:37

Aaron Francis

Let's do-

13:38

Joe Tannenbaum

Uh-

13:38

Aaron Francis

And okay, so I need to answer two questions in chat. Uh, Joe is the creator, Joe's the creator of the library that I'm using here, also a Laravel employee. That's who Joe is. That's why he's here, 'cause he knows how to do these things and I do not.

13:50

Joe Tannenbaum

So he's not Joe.

13:51

Aaron Francis

Yeah. Not a-- This person says, "Not a Laravel dev. Who's Joe?" Great question. Great question. Um, let's find Twitter/joetanenbaum. There you go.

14:02

Joe Tannenbaum

Joe Killer. Wow, okay.

14:03

Aaron Francis

Yeah, I don't know who that is. That's Joe. Joe is the creator of Chewy, which is what we're working on-

14:08

Joe Tannenbaum

Yeah

14:08

Aaron Francis

... right now. Um, okay. So coming back here. Oh, the other question, how many of those sweaters do you own? Let's pretend it's a lot. It's actually just one. Um, but let's pretend it's not just one that is, hasn't been washed. It's just so, it's just so comfy. I have to have it.

14:27

Joe Tannenbaum

Do you have... So this, this hoodie, uh, since Laracon, has just, like, lived on the back of my chair, and I just throw it on-

14:32

Aaron Francis

Yeah

14:32

Joe Tannenbaum

... whenever I'm working.

14:33

Aaron Francis

Mm-hmm.

14:33

Joe Tannenbaum

Is that what you, is that the, that's the game? And I kind of have it in rotation, like, after, like, a week, I'm like, "Oh, I should probably-"

14:39

Aaron Francis

Yeah, except-

14:39

Joe Tannenbaum

"... chuck this in the laundry."

14:41

Aaron Francis

Um, I don't know if this is, like, a me thing or a guy thing. I, I'm, I know it's not a my wife thing. I have a little pile of clothes next to my bed, um-

14:51

Joe Tannenbaum

Uh-huh

14:51

Aaron Francis

... that's, like, neither clean nor dirty, but it always is there. So it's like, I'll take off some clothes and I'm like, "Ah, I didn't really get those clothes dirty. Let's just leave those next-"

15:01

Joe Tannenbaum

Didn't get proper use here.

15:02

Aaron Francis

Let's, yeah-

15:02

Joe Tannenbaum

Yeah

15:02

Aaron Francis

... let's put those in a little holding pattern. We'll keep those right there. And then I wake up the next morning, and I look at the little pile and I'm like, "Yeah, I'm gonna wear that again," and I put the sweater back on.

15:11

Joe Tannenbaum

Okay.

15:11

Aaron Francis

So the s- the sweater goes into, like, the holding pattern pile. So neither clean nor dirty.

15:16

Joe Tannenbaum

I kind of have that pile on top of my dresser a little bit, I would say.

15:19

Aaron Francis

See? There you go.

15:20

Joe Tannenbaum

It's less formal than all that, but yeah, sure.

15:23

Aaron Francis

So if we did this, let's say, um, let's just-

15:28

Joe Tannenbaum

Yeah, I'm curious, like, if we just do a line up there

15:29

Aaron Francis

... let's just render the tabs. Oh, you wanna do just a line? So if we did this line. Hey, y'all.

15:34

Joe Tannenbaum

Just to see if that is even buffered down.

15:37

Aaron Francis

Return this. Need a semicolon here. Guess I don't have to clear with an alt screen. See? That's wild, right? The floordrobe.

15:51

Joe Tannenbaum

Hmm.

15:51

Aaron Francis

The clothes buffer. That's funny.

15:53

Joe Tannenbaum

The floordrobe is great. The floordrobe is really good.

15:56

Aaron Francis

I feel like the floor, the floordrobe is mine now. Um, okay. So what do we think about-

16:01

Joe Tannenbaum

Yeah, what's up with that? That's just, uh... Oh. Oh, is your line height insane? Do you, you've, you've spaced-

16:07

Aaron Francis

No, I don't have tailor, I don't have tailor line height. Um-

16:11

Joe Tannenbaum

'Cause you're not, you can't even select further up, which m- makes me think that the prompt is moving way down out the gate. Oh. Hmm. Can you open up, like, uh, the Mac terminal and run this?

16:29

Aaron Francis

Um-

16:29

Joe Tannenbaum

Like the, the, the normal one. Oh boy, I'm asking you to, like, do a bunch of stuff here. Okay.

16:36

Aaron Francis

Yeah. So this feels like the Mac terminal. Um, where am I? Uh, okay. So I want code, probably Live OS. I, I don't think I've ever used this. Um-

16:48

Joe Tannenbaum

I know, yeah.

16:49

Aaron Francis

And it's just the same thing. Come on, Aaron. It's the exact same thing.

16:55

Joe Tannenbaum

What are you doing over there? Or what am I doing over there?

16:57

Aaron Francis

What are you doing over there?

16:57

Joe Tannenbaum

Somebody, somebody's doing something.

16:58

Aaron Francis

Yeah, who's doing that?

16:59

Joe Tannenbaum

Uh, okay.

17:00

Aaron Francis

Hey, Sam, dude.

17:01

Joe Tannenbaum

Let's, let's go back to the code real quick.

17:02

Aaron Francis

Ooh, let's, let's just check, uh, let's check the actual command and see if we're doing something wonky there. Let's go to dev. Oh, nope. Just new dashboard run. This is all just registering commands. New dashboard run. Show dashboard.

17:25

Listen, do some stuff, do some stuff. Loop this render. Init dimensions.

17:31

Joe Tannenbaum

I wonder if, uh... No, it shouldn't be. What is init dimensions? What is that?

17:41

Aaron Francis

I don't know.

17:41

Joe Tannenbaum

Oh, no. Init dimensions just gets the, it just gets the width and height of the terminal. So that's, that's like a... Uh, question. Are, if you, uh, if you disable any of the commands just for a second, so, like, remove all the commands and see if something is outputting before it gets to where we're going.

18:02

Aaron Francis

Mm-hmm. Mm-hmm.

18:03

Joe Tannenbaum

I'm just curious.

18:05

Aaron Francis

And those don't need to be. Just this one and this one Be no, well, yeah

18:15

Joe Tannenbaum

You can, you can close out the other one if you want.

18:18

Aaron Francis

Yeah. Still-

18:18

Joe Tannenbaum

What in the world?

18:20

Aaron Francis

All right. Let's keep going. We'll figure that out later.

18:22

Joe Tannenbaum

Mm. Yeah. Okay.

18:24

Aaron Francis

Rather, I'll let you figure that out later. Um, okay. So what I need to do now is let's just check to see where we're at. So if we kill that, we're still at, "Hey y'all." We need to clear that out for dashboard renderer. So for some reason, we have some buffer up here.

18:44

That's fine.

18:45

Joe Tannenbaum

We'll figure it out later.

18:46

Aaron Francis

We'll get rid of that later. Um-

18:47

Joe Tannenbaum

Easily adjustable.

18:49

Aaron Francis

Yep. Okay. How in the world, um... This needs to be, this needs to be, stack traces need to be prettier, but that's just, that's wild.

18:57

Joe Tannenbaum

Yeah.

18:57

Aaron Francis

Um-

18:58

Joe Tannenbaum

Yeah.

18:59

Aaron Francis

How would we get a scroll, like a scrolling panel in here?

19:05

Joe Tannenbaum

Okay. So Proms has this kind of built in. Jess is-- This is like so astoundingly hard to do, and Jess-

19:12

Aaron Francis

Yes

19:12

Joe Tannenbaum

... has like built it in, in like a method, which is like so impressive. If you don't know, uh, for people on stream, Jess Archer, uh, one of the most brilliant people that I know. She's, she's, she's lovely and intimidating and, uh, she's a lovely person, but she's so smart. Um, so-

19:28

Aaron Francis

Yes. Which is the intimidating part

19:28

Joe Tannenbaum

... she built Proms, which is the base of this entire thing. Um-

19:32

Aaron Francis

Jess, what's, what's, what's her Twitter?

19:34

Joe Tannenbaum

Uh, oh, I wanna say Jess Archer Co- Codes? Jess Archer-

19:38

Aaron Francis

Yeah

19:39

Joe Tannenbaum

... Jess Archer Codes. Yeah.

19:40

Aaron Francis

Go follow her.

19:41

Joe Tannenbaum

She's amazing.

19:41

Aaron Francis

She's incredible. Um, so yes, definitely go follow Jess. All right. So she built something.

19:47

Joe Tannenbaum

She's also-- I'm just gonna say, if you're following Laracon AU, she's gonna blow some minds next week. I'm just saying.

19:51

Aaron Francis

Oh, I'm so excited.

19:52

Joe Tannenbaum

It's gonna be, it's gonna be incredible.

19:54

Aaron Francis

I know what it is-

19:54

Joe Tannenbaum

I just saw it

19:55

Aaron Francis

... but I haven't seen it yet.

19:57

Joe Tannenbaum

Oh, dude. When-

19:58

Aaron Francis

I know

19:59

Joe Tannenbaum

... when the reveal happens, it, like the audience is gonna . Like it's just gonna be... I mean, I've done it every time I've seen the demo. It's just-

20:05

Aaron Francis

I can't, I cannot wait

20:06

Joe Tannenbaum

... it's so good.

20:08

Aaron Francis

I cannot wait.

20:08

Joe Tannenbaum

It's so good.

20:09

Aaron Francis

Okay. Also-

20:10

Joe Tannenbaum

Uh-

20:10

Aaron Francis

... while we're talking about how great Jess is, mom to twins, so very near and dear to my heart.

20:16

Joe Tannenbaum

Indeed.

20:16

Aaron Francis

I think hers-

20:16

Joe Tannenbaum

I believe much older twins than, than yours are

20:18

Aaron Francis

... much older. I think hers are like-

20:19

Joe Tannenbaum

Yeah

20:19

Aaron Francis

... 10 or 11 or something like that.

20:21

Joe Tannenbaum

Something like that, yeah. Yeah.

20:23

Aaron Francis

All right.

20:24

Joe Tannenbaum

Uh, but a-

20:24

Aaron Francis

Oh, hey. Hugo's here

20:25

Joe Tannenbaum

... a family, twin family. Um, okay. Let's make something scrollable. Let's go to, um... Here's how it works.

20:35

Aaron Francis

I imagine here-

20:36

Joe Tannenbaum

We're gonna add to the renderer, draw sc- scroll bars, I believe it's called, as a trait.

20:40

Aaron Francis

Okay.

20:41

Joe Tannenbaum

Okay. It draws-

20:43

Aaron Francis

Scroll, scroll. Oops

20:43

Joe Tannenbaum

... scroll bars, yeah. And this is not me, this is Jess. Um-

20:47

Aaron Francis

Okay

20:48

Joe Tannenbaum

... so we're gonna have a scroll bar. We need to show the lines that are visible. Here, if you wanna pop into that actually-

20:54

Aaron Francis

Uh-huh

20:54

Joe Tannenbaum

... uh, to the traits. So we have that scroll bar method, which is the magic bit. We have the visible lines.

21:01

Aaron Francis

Okay.

21:01

Joe Tannenbaum

What is the index of the first visible item, so that we know where, how to position that scroll bar on the side. The height of the area that we're working with, how many items total, and what's the width of the area. Those are the... I know it sounds like a lot, but like those are the things we have to pass in, and then we magically get-

21:15

Aaron Francis

Yeah. I'm just gonna monkey with this a little bit-

21:17

Joe Tannenbaum

... a bunch of lines-

21:17

Aaron Francis

... just so I can read it

21:18

Joe Tannenbaum

... in a scroll bar.

21:20

Aaron Francis

Okay. So we need to pass in-

21:23

Joe Tannenbaum

Don't worry about the coloring. I'm sure we're fine.

21:24

Aaron Francis

We need to-- Yeah, we need to pass in what's visible.

21:28

Joe Tannenbaum

Mm-hmm.

21:28

Aaron Francis

Is that, um-

21:28

Joe Tannenbaum

But basically that's visible-

21:30

Aaron Francis

... not visible within the window? Is that visible across everything?

21:34

Joe Tannenbaum

No. Visible in the window.

21:35

Aaron Francis

Or is that visible in the window?

21:37

Joe Tannenbaum

So this, this methodology-

21:39

Aaron Francis

Okay

21:39

Joe Tannenbaum

... of doing this, uh, while in the renderer may not ultimately-

21:45

Aaron Francis

Mm-hmm

21:45

Joe Tannenbaum

... work as a plan because we actually need to know how many total lines there are, so we may need to pre-word wrap some of this stuff and shove it in the proper array that you're originally working with. Do you know what I'm saying?

21:58

Aaron Francis

Barely, but let's keep going.

21:59

Joe Tannenbaum

Okay.

21:59

Aaron Francis

So if we, so we, we have the, we have the arguments kind of in mind. We've got a collection of visible lines and an integer of the first visible.

22:10

Joe Tannenbaum

Meaning what's the-

22:11

Aaron Francis

So I don't know if I fully understand.

22:13

Joe Tannenbaum

So let's say, let's just say we have a collection of 100 items.

22:17

Aaron Francis

Yep.

22:17

Joe Tannenbaum

Uh, we are showing 20, so that collection-

22:19

Aaron Francis

Yep

22:19

Joe Tannenbaum

... of visible is gonna be 20 items.

22:21

Aaron Francis

Uh-huh.

22:22

Joe Tannenbaum

And we are saying we are at the 40th item. We're at index 40 of this collection. And all that, all that's doing is showing... Because she has to draw a scroll bar, right? So this is all completely manual.

22:34

Aaron Francis

Oh. Oh, oh, oh, oh.

22:35

Joe Tannenbaum

So it's saying, okay, how far down this list are you? And then give us the total height of the area that we're working with, and that means that we can shraw, we can draw the scroll ball, gar-

22:46

Aaron Francis

You got it. You got it.

22:47

Joe Tannenbaum

Draw the scroll bar-

22:47

Aaron Francis

Power through.

22:48

Joe Tannenbaum

... appropriate height.

22:50

Aaron Francis

Okay.

22:50

Joe Tannenbaum

And then, uh, the total total of items. So like how many items are in the actual collection. R- she's basically just calculating percentages here off of like what you're showing, right?

23:00

Aaron Francis

Got it. Okay. And this is for scroll bar only. Got it. Okay.

23:05

Joe Tannenbaum

No, no, no. This is gonna show a scrollable list.

23:09

Aaron Francis

Ooh.

23:09

Joe Tannenbaum

So like you'll be able to scroll this list. Here, here's the difference. So in a browser, we get this for free, right? Like we are sh-

23:15

Aaron Francis

Mm-hmm

23:16

Joe Tannenbaum

... we, we can just put a bunch of stuff on the page, and the, the browser will figure out this out for us.

23:20

Aaron Francis

Mm-hmm.

23:20

Joe Tannenbaum

In the terminal, it's a virtual scroll.

23:23

Aaron Francis

Mm-hmm.

23:23

Joe Tannenbaum

We don't render things that are outside the area. We're only rendering-

23:26

Aaron Francis

Mm-hmm

23:26

Joe Tannenbaum

... what's inside the area, so it's like a scrolling list of this 20, these 20 items, right?

23:31

Aaron Francis

Mm-hmm. Mm-hmm. Mm-hmm.

23:31

Joe Tannenbaum

So, um, super manual, but this is like probably the best abstraction I've ever seen of this, where it's like as minimal information as you can give and get this back.

23:42

Aaron Francis

Okay. All right. Let's try it.

23:44

Joe Tannenbaum

Okay. So, um-

23:45

Aaron Francis

So we have draws scroll bar as a trait, so I imagine like somewhere down here, are we gonna do this scroll bar or something?

23:53

Joe Tannenbaum

Correct. That's right.

23:54

Aaron Francis

Okay.

23:55

Joe Tannenbaum

Okay.

23:55

Aaron Francis

Um, so let's... Probably not gonna each out our lines anymore.

23:59

Joe Tannenbaum

Beautiful.

24:00

Aaron Francis

Or at least not yet.

24:00

Joe Tannenbaum

We're actually gonna set that to a variable, I would say-

24:02

Aaron Francis

Okay

24:02

Joe Tannenbaum

... that all, everything we just did there.

24:04

Aaron Francis

All right. So we'll call this, I'm gonna call this visible. Does that seem right?

24:08

Joe Tannenbaum

That seems correct.

24:09

Aaron Francis

Okay.

24:09

Joe Tannenbaum

So we're gonna do this the way we have it now, and then we'll adjust for-

24:13

Aaron Francis

I love that

24:14

Joe Tannenbaum

... other things later. We'll just do it this way now.

24:16

Aaron Francis

Incremental progress. I love that.

24:17

Joe Tannenbaum

Yeah, yeah, yeah.

24:17

Aaron Francis

So visible first visible. So visible, then what is-

24:21

Joe Tannenbaum

Mm-hmm

24:21

Aaron Francis

... first visible gonna be here?

24:23

Joe Tannenbaum

So we need to know what index we are on currently, which means that right now... Okay. Eh. I was, like, trying to keep this simple, and I was like, there's kind of no way. We need to add a little bit of, um, state to your gathers. What is it called? Gathers output?

24:43

Aaron Francis

Gathers output.

24:44

Joe Tannenbaum

Okay. 'Cause is this a generic gathers output for everything that's happening here?

24:48

Aaron Francis

For any output, yeah.

24:49

Joe Tannenbaum

Perfect.

24:50

Aaron Francis

So riddle me this.

24:50

Joe Tannenbaum

But they're all individual-

24:50

Aaron Francis

Is there something we can, is there something we can just hard code here?

24:54

Joe Tannenbaum

Yes.

24:54

Aaron Francis

Just like one, two, three, four, five, and run it?

24:56

Joe Tannenbaum

Uh, uh, let's do, let's do 20. Let's just put 20 in, and we'll see what, what comes out of that. So we're on the 20th-

25:03

Aaron Francis

Okay

25:03

Joe Tannenbaum

... index, let's just say. Uh-

25:05

Aaron Francis

Height is required.

25:05

Joe Tannenbaum

The height.

25:06

Aaron Francis

And so-

25:07

Joe Tannenbaum

Mm-hmm

25:07

Aaron Francis

... we have that. Allow... No, no, no. We have-

25:09

Joe Tannenbaum

Yep.

25:09

Aaron Francis

Ah.

25:10

Joe Tannenbaum

Allowed lines is good. That's good.

25:11

Aaron Francis

Okay.

25:11

Joe Tannenbaum

Yep. Uh, and then I think, what's next?

25:16

Aaron Francis

Total.

25:17

Joe Tannenbaum

Okay. So then we also have, we have that information already, so, um, go, go back to the other, to the other screen.

25:25

Aaron Francis

Oh, oh, oh, oh.

25:26

Joe Tannenbaum

So it's the-

25:27

Aaron Francis

So we need to-

25:27

Joe Tannenbaum

... it's the total of this here. This, these lines, that's the total we're looking for. How many lines-

25:31

Aaron Francis

Okay. So we need to do something else here. We need to not take that. We need to flat map that. We need to say that this is total lines after it's been flat mapped.

25:41

Joe Tannenbaum

Oh, yeah. We can totally do this.

25:42

Aaron Francis

Then we'll say-

25:42

Joe Tannenbaum

Yes

25:42

Aaron Francis

... visible equals total lines take, and then this is total lines count.

25:51

Joe Tannenbaum

Beautiful.

25:51

Aaron Francis

Does that seem right?

25:52

Joe Tannenbaum

Uh, yeah. And then we, I think we just need a width as the last one.

25:54

Aaron Francis

Width, okay, which we have. Okay, so we've written the scroll bar, but have we written the lines? Yes, I guess the scroll-

26:05

Joe Tannenbaum

No, it's a collection, I believe, that's returned, and then you each out that. If I remember correctly.

26:11

Aaron Francis

Oh. Returns collection-

26:13

Joe Tannenbaum

Yes

26:13

Aaron Francis

... and string, yep.

26:14

Joe Tannenbaum

Yep.

26:14

Aaron Francis

So then we'll just each this line. By the way, your course does this all the time, and that's not a pattern that I use very often, and I love it. It's great.

26:25

Joe Tannenbaum

You're about to use it a lot. It's amazing.

26:26

Aaron Francis

Yeah, it's really great.

26:27

Joe Tannenbaum

Yeah.

26:27

Aaron Francis

All right, so if we quit this.

26:29

Joe Tannenbaum

Oh, boy. Here we go.

26:30

Aaron Francis

And then we clear it.

26:31

Joe Tannenbaum

Yeah, how's it?

26:32

Aaron Francis

All right. So let's do no alt screen.

26:34

Joe Tannenbaum

Total, okay. Yeah, yeah, yeah, yeah, yeah. Uh-

26:40

Aaron Francis

Dashboard render pad

26:41

Joe Tannenbaum

Oh, interesting. Um, okay. Oh, it's probably expecting to use this with... It's never used-

26:47

Aaron Francis

Oh

26:47

Joe Tannenbaum

... by itself, so it's just missing a trait, which is, um, probably draws boxes. Uh, say-

26:57

Aaron Francis

Interacts with strings. That's feels pretty low level.

27:01

Joe Tannenbaum

Okay. Yep. That's fine.

27:02

Aaron Francis

Do we want that one?

27:03

Joe Tannenbaum

Yeah. We'll, we'll take it. So just add that to your main, to your main one.

27:08

Aaron Francis

Interacts with strings.

27:09

Joe Tannenbaum

I'm kind of surprised that's not in there for some reason. Oh.

27:12

Aaron Francis

Okay. All right. So let's do-

27:13

Joe Tannenbaum

And now-

27:14

Aaron Francis

... the with an alt screen. That-

27:19

Joe Tannenbaum

Okay. I don't see a s- oh, because-

27:21

Aaron Francis

... something

27:21

Joe Tannenbaum

... we don't see a scroll bar though. I don't see the actual... I see a bar-

27:24

Aaron Francis

Let's change-

27:25

Joe Tannenbaum

... but I don't see, like, the little-

27:27

Aaron Francis

Let's change this to, like, five. There you go. Right there.

27:34

Joe Tannenbaum

Oh, I can... Yep, there it is. Okay. Perfect.

27:37

Aaron Francis

Okay.

27:38

Joe Tannenbaum

Great. We just made a scroll bar. Now, to make this work, um, you need to track the scroll position on each of these-

27:45

Aaron Francis

Mm-hmm

27:45

Joe Tannenbaum

... gathers outputs, right? So you need to know what, what index you're on. So basically, um, whatever you decide scrolls, so if you're doing up and down arrow keys, you just need to change that index, and then that'll slide the, the visible view as we, as we go. So that'll be your, like-

28:03

Aaron Francis

Oh, no way

28:04

Joe Tannenbaum

... first visible, right? So basically-

28:06

Aaron Francis

Okay. So let's do this then

28:07

Joe Tannenbaum

... um, on gathers output, just, just add a, add a piece of state.

28:13

Aaron Francis

Well, let's... Can we just test it-

28:15

Joe Tannenbaum

Oh, go do that

28:15

Aaron Francis

... real fast?

28:16

Joe Tannenbaum

Oh, sure. Yeah.

28:18

Aaron Francis

Um, so if we have... These are all of the lines mapped to the right size.

28:23

Joe Tannenbaum

Right. Instead of take, you're gonna want slice, I believe, or s- yeah, slice. You wanna take a, a slice of starting at the index we wanna be on and the number of allowed lines that we have.

28:35

Aaron Francis

Oh, I see. Okay.

28:37

Joe Tannenbaum

Make sense?

28:37

Aaron Francis

So we'll say, um, start equals zero, which-

28:41

Joe Tannenbaum

Nailed it. Yep

28:41

Aaron Francis

... is not right, but w- that'll be fine. And then we want slice, offset, and length. So we'll do slice from zero to-

28:52

Joe Tannenbaum

No.

28:52

Aaron Francis

Not, no

28:52

Joe Tannenbaum

Start to allowed lines.

28:54

Aaron Francis

Start and have as many allowed lines as you want. Um-

28:58

Joe Tannenbaum

And then change that five to start. And-

29:02

Aaron Francis

Okay. Now we're getting real.

29:05

Joe Tannenbaum

And then once we replace start with the state from your gathers output-

29:10

Aaron Francis

Mm-hmm, mm-hmm, mm-hmm

29:10

Joe Tannenbaum

... we'll have a proper, a proper thing going on here.

29:15

Aaron Francis

Okay, so that looks right to me in that the scroll bar's at the very top, and presumably, this is the first line that gathers output has collected. So now-

29:29

Joe Tannenbaum

Yes, presumably

29:30

Aaron Francis

... what if we did, um, what gets passed in here? A dashboard gets passed in here. So let's go to dashboard. Oh, I see. Uh, let's just do one global one for now.

29:43

Joe Tannenbaum

Sure.

29:43

Aaron Francis

And then we can do it on, uh, bit by bit. So this is probably on, we'll say on down. Does that seem right?

29:51

Joe Tannenbaum

Seems good. Yeah.

29:52

Aaron Francis

Um, this current command stop. We'll say this, um, doesn't matter. Uh, scroll-

29:59

Joe Tannenbaum

What is current command?

30:02

Aaron Francis

Uh, current command is-

30:04

Joe Tannenbaum

Oh, I see. Let's see

30:05

Aaron Francis

... the dev command. So we can put the state there.

30:09

Joe Tannenbaum

Yeah. Isn't that, that's where... Yeah.

30:11

Aaron Francis

That's where we want it-

30:12

Joe Tannenbaum

We could totally do that

30:12

Aaron Francis

... in fact.

30:12

Joe Tannenbaum

Yep. Yep. That's, that's correct.

30:15

Aaron Francis

So let's just do that, and we'll say current command scroll index, probably just plus or plus

30:21

Joe Tannenbaum

Well, why don't you just add a method that's called scroll down, and then we can just deal with it in there, um-

30:26

Aaron Francis

Ah, you old dog. I like that. Current command, dev command. Um, public function scroll down. Uh, we'll make it a little bit more intelligent in a second, and we'll say-

30:48

Joe Tannenbaum

Yeah

30:50

Aaron Francis

... um, let's just say bind protected.

30:54

Joe Tannenbaum

Public.

30:54

Aaron Francis

It should be on Control + N. That's interesting. Um, I don't know what Control + N is. Public integer scroll, and see, all this terminal stuff, we'll just start it at zero. It should, in reality, be the last line, 'cause we want it pinned to the bottom, but that's fine.

31:10

Joe Tannenbaum

Oh, sure, yeah.

31:11

Aaron Francis

We'll say this, uh, scroll. Control + N for down and P for up. That's so interesting. I've never heard of that in my life. Scroll index actually needs to go, if we're scrolling down-

31:26

Joe Tannenbaum

Go up

31:27

Aaron Francis

... the index needs to go up. Is that right?

31:28

Joe Tannenbaum

Yeah. That's correct.

31:31

Aaron Francis

And we'll add some safeguards here in a minute.

31:35

Joe Tannenbaum

Yep.

31:36

Aaron Francis

Um, okay. So then back in dashboard, we want this command scroll on down is scroll down, and on... These little affordances are super nice. Are these you or Jess?

31:55

Joe Tannenbaum

I, uh, this is me. Yeah.

31:57

Aaron Francis

That's awesome.

31:57

Joe Tannenbaum

You can, you can register key presses the way that, um, Promps does, but the fluidity of this and the s- it, it just feels so much better. It's just more-

32:06

Aaron Francis

Yeah

32:06

Joe Tannenbaum

... fluid.

32:07

Aaron Francis

Yeah. I like this a lot.

32:07

Joe Tannenbaum

I mean, she didn't, this isn't really what it's for. I am, like, really hijacking this thing. So it's-

32:12

Aaron Francis

Of course

32:12

Joe Tannenbaum

... you know, she shouldn't have thought about this stuff.

32:14

Aaron Francis

Of course. Um, okay. So then we can now go to the renderer and check the prompt. And so instead of start, we'll say prompt scroll index.

32:26

Joe Tannenbaum

Uh, prompt commands. I, I don't know-

32:28

Aaron Francis

Oh

32:28

Joe Tannenbaum

... how you access that.

32:29

Aaron Francis

Oh, oh, oh, oh.

32:29

Joe Tannenbaum

I think-

32:31

Aaron Francis

Um, where does-

32:33

Joe Tannenbaum

If you go up a little bit, I think it's that

32:34

Aaron Francis

... this one.

32:35

Joe Tannenbaum

Yeah, yeah.

32:37

Aaron Francis

That could be made, that could be made nicer. Um, but who has the time?

32:42

Joe Tannenbaum

Nobody has the time. Uh, and yeah, scroll index.

32:46

Aaron Francis

So again, it's just selected scroll index.

32:50

Joe Tannenbaum

And I think we might have a scrollable window now. Let's see.

32:58

Aaron Francis

Hey, we've got a scrollable-

33:00

Joe Tannenbaum

It's working

33:00

Aaron Francis

... window. Look at that. And we got some errors. Who cares?

33:03

Joe Tannenbaum

So we don't have the safeguards, so it sort of like gets-

33:05

Aaron Francis

Yes

33:06

Joe Tannenbaum

... it gets wild in there, but, uh, yeah.

33:08

Aaron Francis

So if we go over to... That's just, that's just not running. Um, none of these are actually running, so that's, we don't have any. Look at that. We have a scrollable-

33:19

Joe Tannenbaum

So if you, if you end up clamping it, if you make sure that the scroll index doesn't go past the allowed values, then you're, you're in, you're in the money. You're good to go.

33:27

Aaron Francis

Uh, scroll index equals, so this'll be fun. Um, equals max min.

33:35

Joe Tannenbaum

So I actually just added... Are you in the, um, are you in the latest version of, of Promp- of, uh, Chewy?

33:49

Aaron Francis

1.7?

33:51

Joe Tannenbaum

Couldn't tell you. Uh, let's see if you have it. Um, I, I have this new utility because I've been doing it so much. Yes. Okay, cool, and you'll be the first to use it probably. Um-

34:01

Aaron Francis

Oh, yeah

34:01

Joe Tannenbaum

... it's called-

34:02

Aaron Francis

1.7

34:02

Joe Tannenbaum

... I believe clamped number. So you can, um-

34:06

Aaron Francis

Uh, who? Who has clamped number? Or does that-

34:08

Joe Tannenbaum

You know what? Let's just do it the manual. We'll do it this way. This is too-

34:11

Aaron Francis

Okay

34:11

Joe Tannenbaum

... this is too much. So you want to-

34:15

Aaron Francis

Is it-

34:17

Joe Tannenbaum

Yep, you got it. Nailed it.

34:18

Aaron Francis

Do I?

34:20

Joe Tannenbaum

Yeah.

34:20

Aaron Francis

Um, the max of-

34:21

Joe Tannenbaum

So it's the minimum. It's the minimum

34:22

Aaron Francis

... the minimum of this. And-

34:32

Joe Tannenbaum

Uh-huh

34:32

Aaron Francis

... oh, I don't have, I don't have-

34:34

Joe Tannenbaum

I mean, you can-

34:35

Aaron Francis

... the mapped lines

34:36

Joe Tannenbaum

... oh, you can, yeah.

34:36

Aaron Francis

We might, 'cause-

34:37

Joe Tannenbaum

We do have to move them there

34:38

Aaron Francis

... I didn't flat map them. We, we have to move it into that other spot, don't we?

34:41

Joe Tannenbaum

Yeah. But you're gonna need them for all of it, so when you initialize... Yeah. The, all these dev commands need to know what the width is, unfortunately. It's kind of the nature of the beast sometimes that, uh, unless, unless you do this logic in the renderer, so you have to choose your, you have to pick your poison here.

35:02

You either have to, uh, make sure-

35:04

Aaron Francis

Hmm

35:04

Joe Tannenbaum

... the scroll index is not past that in the renderer, or you need to do it here, and either is fine. But, um, you get weirder side effects when you calculate it in the renderer because you could, you'll always be increasing the scroll index, so you might-

35:19

Aaron Francis

Mm-hmm

35:19

Joe Tannenbaum

... like if you went past it, then you would get like this weird delay going back up because it's like decreasing until it's like caught up to where it actually should be. Yeah, you hate it.

35:28

Aaron Francis

I see.

35:28

Joe Tannenbaum

I hate it too, but it is a little bit the nature of this particular beast.

35:34

Aaron Francis

Yeah, this is a very, um, this is an environment that I'm not used to being in.

35:39

Joe Tannenbaum

Yeah.

35:40

Aaron Francis

Like all this, all this manual stuff. Um, yeah. Somebody said we could just pass max in for now. Let's just do that for now.

35:50

Joe Tannenbaum

That's fine. That, that works.

35:52

Aaron Francis

Does that feel okay? There's, there's some, there's some refactoring to be done.

35:56

Joe Tannenbaum

Well, how do we know, how do we know the max, though? We have to know, we still have to know the flat mapped max, right? We have to know the word wrap max on this thing. 'Cause the, the scroll down happens in the key binding-

36:10

Aaron Francis

Oh, it happens in the-

36:11

Joe Tannenbaum

... which is in the states

36:11

Aaron Francis

... freaking other place. Yeah.

36:13

Joe Tannenbaum

Yeah, yeah, yeah. Now-

36:15

Aaron Francis

All right. Let's move it to-

36:17

Joe Tannenbaum

Yeah, it just gets wild. I was gonna say, you could pass it back from the renderer to the thing, but that just feels bad. That feels bad in a different way

36:25

Aaron Francis

All right, so we're gonna move it over here. Um-

36:28

Joe Tannenbaum

Here, here's how I typically do this. I like to have a pure, like, lines, meaning like these are the original lines, so if they resize the terminal or something like that-

36:36

Aaron Francis

Mm-hmm

36:36

Joe Tannenbaum

... or I, I need adjustments, I still have the original to work with. But then I have-

36:40

Aaron Francis

Mm-hmm

36:40

Joe Tannenbaum

... sort of like a word wrap lines array as well, so that, like, every time we're adding lines, we're adding it to the original, and we're adding it to the word wrap so that, like, the original stays pure, and we can, like, work off of it if we need to for some reason. I-

36:53

Aaron Francis

Okay

36:53

Joe Tannenbaum

... am probably over-optimizing right now for this particular project, but I'm just sort of checking that out there.

37:00

Aaron Francis

Um, would it be too expensive to just have a... I just don't, I just don't have a good sense of how fast all of this stuff is. So would it be too expensive to do this?

37:14

Joe Tannenbaum

No, it should be fine. That's cool. Yep.

37:17

Aaron Francis

I feel like this stuff-

37:17

Joe Tannenbaum

Uh-

37:17

Aaron Francis

... is pretty quick, right?

37:20

Joe Tannenbaum

Right. But again, like, how are you going to...

37:24

Aaron Francis

I need the width, eh?

37:26

Joe Tannenbaum

Yeah, the width is really the thing.

37:28

Aaron Francis

That's fine. I'll just, we'll just start here.

37:30

Joe Tannenbaum

Yeah.

37:30

Aaron Francis

Make it work, make it pretty.

37:31

Joe Tannenbaum

This is the easiest way r- for now.

37:36

Aaron Francis

All right. So we can get rid of you, and then we'll say that you come here. And since we just have one, we'll put it up there. Um, this is...

38:02

So then we can come back here, kill you for a second. Dashboard renderer. Who are you? So we need gathers output to receive the width, but that happens in here.

38:20

Joe Tannenbaum

Oh, boy.

38:21

Aaron Francis

Oh, boy.

38:21

Joe Tannenbaum

Wait, and is that happening in the original command?

38:25

Aaron Francis

Yeah, that happens out in user land.

38:29

Joe Tannenbaum

Um-

38:29

Aaron Francis

So what we're gonna have to have is-

38:31

Joe Tannenbaum

Okay. Well, here's-

38:31

Aaron Francis

... a set width. Go on.

38:34

Joe Tannenbaum

Yep. You, you already did it.

38:35

Aaron Francis

Okay.

38:35

Joe Tannenbaum

You got it. Yep.

38:40

Aaron Francis

Okay. Sorry. And... Which might be good, 'cause we might need to reset it anyway if somebody resizes.

39:01

Joe Tannenbaum

Yeah, yeah, yeah.

39:01

Aaron Francis

I guess this doesn't need to be public. I don't really, I just don't really care. It's not a Boolean either. I don't really care about public/private that much. Do you? It's just not something that-

39:10

Joe Tannenbaum

I don't except-

39:11

Aaron Francis

... has ever concerned me

39:12

Joe Tannenbaum

... except in this stuff, um-

39:13

Aaron Francis

Ah, shoot. Dang it

39:14

Joe Tannenbaum

... I, I've, I've never, I've never had more public... No, no, you're, you're right in this. Like, this is fine. You don't need this public. But, um, I've never had more public properties on any class ever than since I've started working with this stuff because, I don't know, I just make everything protected. It's all-

39:30

Aaron Francis

Yep

39:30

Joe Tannenbaum

... it's all protected all the way down. Um-

39:32

Aaron Francis

Um-

39:32

Joe Tannenbaum

Okay, so here's what, uh, we're in the dashboard-

39:35

Aaron Francis

Can we do each run-

39:36

Joe Tannenbaum

So-

39:36

Aaron Francis

We start each one. We also need to-

39:39

Joe Tannenbaum

So I would set a prob- public width property on this so that everybody's on the same page and we're not calculating it twice in the-

39:45

Aaron Francis

Oh, that's smart.

39:46

Joe Tannenbaum

Um, yeah. So public width property, set it to what you're setting it in the render right now, uh, which you already have somewhere in there. Boopity bop. Yep. Grab that. Set that property. Now everybody's-

40:01

Aaron Francis

'Cause this is prop

40:01

Joe Tannenbaum

... working off the same width-

40:02

Aaron Francis

Okay

40:02

Joe Tannenbaum

... all the time. Yes, exactly.

40:04

Aaron Francis

Cool, cool, cool, cool, cool. I like it. Width-

40:07

Joe Tannenbaum

Yeah

40:07

Aaron Francis

... equals this terminal-

40:10

Joe Tannenbaum

Mm-hmm

40:10

Aaron Francis

... less two. And then-

40:13

Joe Tannenbaum

Uh, just set the property instead of a local variable.

40:16

Aaron Francis

Yep.

40:16

Joe Tannenbaum

Yep, yep. And now we can pass that along to whatever, and now the renderer can also use that too, so everybody's on the same page.

40:24

Aaron Francis

So, I mean, we could probably do set. What are... These are the commands. These are the commands, and I need, I need to go through the command to the component, I think. The command has a component. Goodness me.

40:44

Joe Tannenbaum

Oh my goodness.

40:46

Aaron Francis

Um, okay. So we need to go through the command to the component. So let's just do it like this for a second. Let's just pull all of this in here. We'll say that this is a dev command, command. We'll say command run, and then does run return this? Yep.

41:06

Joe Tannenbaum

Uh-huh.

41:07

Aaron Francis

Then, um-

41:09

Joe Tannenbaum

Set width here?

41:10

Aaron Francis

Command component.

41:13

Joe Tannenbaum

Oh.

41:13

Aaron Francis

Not w-width, width. Boy, architecting this stuff is... I'm having, I'm having trouble keeping track of this. Um, set width-

41:21

Joe Tannenbaum

Yeah

41:21

Aaron Francis

... is this width. I feel like, um, despite it being, like, nice and organized in different classes, everyone has to know everything about everyone else. So it's like, what are, what are we doing here, you know?

41:33

Joe Tannenbaum

When you're doing something simple, it's pretty straightforward. As soon as, basically, as soon as scroll bars get in the mix, it starts, like everybody needs to know a lot of things. Which is-

41:41

Aaron Francis

That's why, that's why you're here, because I looked at scroll bars-

41:44

Joe Tannenbaum

Yeah

41:44

Aaron Francis

... and was like, "I can't do that." Um, okay. So now upon booting the dashboard, um, the prompt dashboard, we set the width-

41:55

Joe Tannenbaum

Mm-hmm

41:55

Aaron Francis

... and then we loop through the commands that have been registered, which could be user land, um, and we start each actual underlying command. And so-

42:05

Joe Tannenbaum

Right

42:05

Aaron Francis

... this, this does the whole pending process thing and starts it, and then we reach into the gathers component of each command-

42:16

Joe Tannenbaum

Mm-hmm

42:16

Aaron Francis

... and we set the width. So now we are safely here. Um...

42:24

Joe Tannenbaum

Okay. So-

42:25

Aaron Francis

That's fine

42:26

Joe Tannenbaum

... we need to make sure that the renderer is now accessing this width instead of width, 'cause that's no longer available. That's 'Cause that's gonna break everything immediately

42:35

Aaron Francis

Okay, so we need to go to the dashboard renderer

42:39

Joe Tannenbaum

And wherever we wrap the thing-

42:41

Aaron Francis

For now-

42:41

Joe Tannenbaum

Oh yeah, perfect. Yep

42:41

Aaron Francis

... for now I'm just gonna do this, prompt-

42:44

Joe Tannenbaum

That's correct

42:44

Aaron Francis

... with.

42:45

Joe Tannenbaum

Yep. Perfect.

42:46

Aaron Francis

A little, a little goofy, but that's fine. Um, okay, so then down here, total lines becomes prompt... What did we call it? Wrapped lines.

43:00

Joe Tannenbaum

Wrapped lines, but it's not the prompt, it's this-

43:03

Aaron Francis

Nope

43:03

Joe Tannenbaum

... uh, commands thingy.

43:04

Aaron Francis

Mother. God freaking.

43:06

Joe Tannenbaum

Shit.

43:06

Aaron Francis

Um, okay, so we're gonna do this. We are gonna... We can do this as early as we want, right? Selected command is over here, and prompt commands. I think we can do this as early as we want.

43:28

So we're just gonna say that selected-

43:35

Joe Tannenbaum

Yeah

43:35

Aaron Francis

... equals that. Eh, we'll move that around later. Um, so then presumably we can say total lines equals selected command, which is goofy 'cause this is named selected command and they're entirely separate things. Um, selected command component.

43:56

Blah.

43:58

Joe Tannenbaum

Oh, man. Oh, man.

44:00

Aaron Francis

So gross. Um-

44:02

Joe Tannenbaum

And then wrapped lines. Oh, boy.

44:07

Aaron Francis

Gotta make it work. Just gotta make it work. Um-

44:09

Joe Tannenbaum

Uh, and then you want the, you want the count on that. You want the count on that 'cause it's total lines.

44:16

Aaron Francis

Do I?

44:16

Joe Tannenbaum

Yes.

44:17

Aaron Francis

No, I do not.

44:17

Joe Tannenbaum

Oh, sorry. Total lines count is below. My bad. My bad.

44:19

Aaron Francis

Yeah, let's do this.

44:20

Joe Tannenbaum

Yep.

44:22

Aaron Francis

Wrapped lines is wrapped lines, wrapped lines slice, wrapped lines count. So what have we done? Have we done anything? Catch me up.

44:33

Joe Tannenbaum

Uh, we clamped-

44:34

Aaron Francis

Where are, where, where are we?

44:35

Joe Tannenbaum

I think... Oh, we need to clamp the values.

44:36

Aaron Francis

Oh, we haven't clamped. We haven't clamped.

44:38

Joe Tannenbaum

We have to clamp. That was the whole thing. I totally clamped the values.

44:40

Aaron Francis

That was the whole freaking thing. Um, so we need to go to... What are you complaining about? Yeah, yeah. Hey. Perfect. Perfect.

44:47

Joe Tannenbaum

Okay, so now we know some things.

44:49

Aaron Francis

We do. What do we know? Um, so we need the min of, uh-

44:57

Joe Tannenbaum

This wrapped lines count.

45:01

Aaron Francis

Is it this? No, it's this component.

45:05

Joe Tannenbaum

Oh, component.

45:06

Aaron Francis

Which is goofily named, doesn't mean anything.

45:09

Joe Tannenbaum

Yeah.

45:09

Aaron Francis

Component could be anything. Okay, so let's just say max lines equals that. So we want the min of... Yeah, the min of one more-

45:29

Joe Tannenbaum

Mm-hmm

45:30

Aaron Francis

... or however many lines there are.

45:34

Joe Tannenbaum

I think minus one, I believe, is what we want because it's, uh, we're doing a count, so I believe minus one. 'Cause the m- the, the last index will be one less than the count of the... Yep.

45:50

Aaron Francis

I think you're right. So actually this-

45:54

Joe Tannenbaum

Uh, this we don't need max lines for.

45:56

Aaron Francis

Yeah.

45:57

Joe Tannenbaum

We just need zero, and it would be minus one. Perfect. And now we might, we might have something.

46:04

Aaron Francis

Might we? There's like a 4% chance we got all this right. Um, okay, so we are back. Goodness, I need to name these things better. Um, we're back over here. Current command, scroll down.

46:18

Joe Tannenbaum

It's so clean. I love that. Love that.

46:20

Aaron Francis

Yeah. This is great. This is great. Why am I not just using current command over in the renderer?

46:29

Joe Tannenbaum

Nobody knows.

46:29

Aaron Francis

That's exactly this. Nobody knows.

46:31

Joe Tannenbaum

Mm-hmm. Yeah.

46:32

Aaron Francis

Least of all me. Um-

46:33

Joe Tannenbaum

We're all asking.

46:35

Aaron Francis

Yeah. Yeah. We sure are. Um, okay. Okay, so we're scrolling-

46:41

Joe Tannenbaum

Now you should stick to the bottom

46:41

Aaron Francis

... down, down, down.

46:43

Joe Tannenbaum

Oh.

46:44

Aaron Francis

And we don't.

46:46

Joe Tannenbaum

Okay, what did we not calculate correctly here? Oh, sorry. Okay. Let's go back. Yes, this is the last piece of the puzzle.

46:58

Aaron Francis

Okay.

46:59

Joe Tannenbaum

Um, we can't scroll all the way to the last index because we need to leave the, the number we're taking on the screen. So I know, this is all so-

47:08

Aaron Francis

Yeah

47:08

Joe Tannenbaum

... manual. Yes. It's okay. It's okay. We can totally do this. Uh, so where... Go to the renderer. And how many are we... Where are we setting this? Oh, allowed lines is height minus six. So I got, I have some slightly bad news for you.

47:30

Aaron Francis

Okay, perfect.

47:34

Joe Tannenbaum

Uh, this should probably be stored on the... Wait, do we need to-

47:39

Aaron Francis

No, don't do this. Don't do this to me.

47:42

Joe Tannenbaum

Oh. Okay, the, the, the quick fix-

47:48

Aaron Francis

I see what you're saying.

47:49

Joe Tannenbaum

Um, yeah. The quick fix is that we can do this in the renderer, but long term, that's not great because of the same problem we had before.

47:57

Aaron Francis

Shoot.

47:58

Joe Tannenbaum

The official way of doing this would be to pa- pass the height along and store how many are supposed to be visible at any given moment on the gathered output.

48:05

Aaron Francis

All right, we just did it, so it's fresh. Let's just power through. Um-

48:09

Joe Tannenbaum

Yeah, so we basically just need to replicate that. Yep. Man, oh, man.

48:14

Aaron Francis

No, we're doing this. Set dimensions.

48:17

Joe Tannenbaum

Oh, baby.

48:18

Aaron Francis

What do you, what do you think about that, huh?

48:19

Joe Tannenbaum

I love that.

48:20

Aaron Francis

Isn't that wild?

48:21

Joe Tannenbaum

I love that. Yeah.

48:26

Aaron Francis

Yep, yep, yep, yep, yep. Um, so then we come back to who? You probably? Each-

48:43

Joe Tannenbaum

Yeah. So let's get a height property on this as well.

48:47

Aaron Francis

So we'll come back to the renderer, and we are just gonna yoink that, and we'll just replace it with that for now, which is silly, but that's fine. Um, and so we just... Good Lord. Um, we're just putting stuff everywhere, aren't we? And setDimensions now accepts a width and a height, and we need to say that this height...

49:18

Dewey Pager sounds like a package on its own. Yeah, Joe, can you just do that and get back to me?

49:25

Joe Tannenbaum

Yeah, I can.

49:27

Aaron Francis

Yeah. Thank you.

49:28

Joe Tannenbaum

It's like I could build 100 of these things, but, like, who want... I don't know.

49:31

Aaron Francis

You should.

49:32

Joe Tannenbaum

Who actually wants them? There's like, you know, I-

49:33

Aaron Francis

Me, for right now.

49:35

Joe Tannenbaum

That's true.

49:36

Aaron Francis

Yeah.

49:37

Joe Tannenbaum

Yeah. That's true.

49:38

Aaron Francis

Don't you... It's not like it's just, you know, Taylor's not watching. You should just-

49:41

Joe Tannenbaum

Well-

49:41

Aaron Francis

... do this on company time.

49:42

Joe Tannenbaum

What else am I doing? I am doing this on company time.

49:45

Aaron Francis

Oh, perfect. Even Steven, what's the problem? Um-

49:48

Joe Tannenbaum

Yeah

49:48

Aaron Francis

... okay, setDimensions, width, height, width, height. Um, okay. So then-

49:55

Joe Tannenbaum

Okay

49:55

Aaron Francis

... probably over in the dev command.

49:59

Joe Tannenbaum

Yeah. So-

50:00

Aaron Francis

We need to do something-

50:03

Joe Tannenbaum

We should... Aye, aye, aye, aye, aye. Um, we should specify somewhere in here a property that says what the visible window, what's the count of the visible window, so that we can use that in the renderer, okay? So basically, um-

50:21

Aaron Francis

All right, let's hard code for now

50:21

Joe Tannenbaum

... make a property... Yeah. It's fine. Um-

50:25

Aaron Francis

So we'll say this component, we do have height, right?

50:28

Joe Tannenbaum

And right now we're setting it to height minus six, if I remember correctly.

50:33

Aaron Francis

Man, whatever.

50:34

Joe Tannenbaum

I know, it feels, feels bad. It all feels bad.

50:37

Aaron Francis

It all feels bad. Um, we are setting it to... So in the-

50:42

Joe Tannenbaum

Wait, why is this, uh-

50:47

Aaron Francis

All right, so in the dashboard prompt, we're setting it to-

50:51

Joe Tannenbaum

Mm-hmm

50:51

Aaron Francis

... terminal lines less three.

50:53

Joe Tannenbaum

But go down to allowed.

50:55

Aaron Francis

Um-

50:55

Joe Tannenbaum

I think we called it allowed lines

50:56

Aaron Francis

... F me. Yeah. Mother, um-

51:01

Joe Tannenbaum

Yep, height minus six

51:02

Aaron Francis

... so then... All right, let's just hard code that for a second.

51:05

Joe Tannenbaum

It's fine. Um-

51:06

Aaron Francis

So this component height already has the less three, it just needs the less six. Um-

51:11

Joe Tannenbaum

Mm-hmm. Yep.

51:13

Aaron Francis

This is like, more like pane height, right?

51:16

Joe Tannenbaum

Sure. Yeah. Well, it's like it's the... Yeah. That's, that... Exactly right, actually. Yeah.

51:21

Aaron Francis

Okay.

51:21

Joe Tannenbaum

That's fine. Um, okay. So now when we add, we wanna go, uh, max lines minus one, minus scroll pane height, I think is what I wanna do.

51:35

Aaron Francis

No, I can't be right.

51:35

Joe Tannenbaum

Give me a minute.

51:36

Aaron Francis

It's gotta be like-

51:37

Joe Tannenbaum

Well, because-

51:37

Aaron Francis

... scroll pane height less one, right?

51:38

Joe Tannenbaum

So if you have 100, and the pane height-

51:40

Aaron Francis

Oh

51:40

Joe Tannenbaum

... is say 20, you can only go up to actually 80, right? So your fir- because we're talking about, let me just be clear, we're talking about the first visible index that's, that's being shown here, right?

51:55

Aaron Francis

No, I think you're right.

51:58

Joe Tannenbaum

It'll, it'll either be immediately evidently wrong or immediately evidently right. And we'll, we'll adjust from there.

52:04

Aaron Francis

Well, it's great. Okay. So this will only... So we need to get in there and scroll down. In fact, what we need to do is we need to go to Laravel.log. Yeah. We need to clear all of that out, and then-

52:22

Joe Tannenbaum

Mm-hmm

52:22

Aaron Francis

... we need to have a little bit better understanding-

52:25

Joe Tannenbaum

Need some insight

52:26

Aaron Francis

... of what's happening. Yeah. So this will be a little bit better. So now if I take you, that should be correct. Okay.

52:48

Joe Tannenbaum

Okay.

52:49

Aaron Francis

This should be a little bit easier to understand.

52:52

Joe Tannenbaum

Correct. Good job.

52:57

Aaron Francis

Okay.

52:58

Joe Tannenbaum

Okay. So already it looks too short.

53:01

Aaron Francis

Already looks-

53:01

Joe Tannenbaum

That's-

53:02

Aaron Francis

... weird

53:02

Joe Tannenbaum

... weird. Also-

53:02

Aaron Francis

We also have no scroll bar.

53:04

Joe Tannenbaum

Oh, are we limiting the amount of logs coming in?

53:08

Aaron Francis

Maybe.

53:08

Joe Tannenbaum

What's the command you're running?

53:10

Aaron Francis

Maybe. Maybe, maybe, maybe. Okay. That's close. That was close. Um-

53:15

Joe Tannenbaum

'Cause it goes, it reverts to no scroll bar if the-

53:17

Aaron Francis

What do I need? Like dash N something?

53:20

Joe Tannenbaum

Yeah, dash N, and let's just say 100, just to like give us, give us some breathing room. Yeah.

53:25

Aaron Francis

Can I do it there?

53:26

Joe Tannenbaum

Mm-hmm.

53:26

Aaron Francis

Or does it have to be... There we go.

53:28

Joe Tannenbaum

Yeah. Okay.

53:28

Aaron Francis

There we go. Okay. Good so far.

53:32

Joe Tannenbaum

Yeah.

53:33

Aaron Francis

Boy, that's a lot easier to track, isn't it?

53:35

Joe Tannenbaum

Oh, way easier. Oh, it's looking good.

53:37

Aaron Francis

Okay. So then we get-

53:37

Joe Tannenbaum

It's looking good. It's looking good

53:38

Aaron Francis

... close to the bottom. We stopped a little... Well, the, um-

53:43

Joe Tannenbaum

Hmm. It should be at the end. It should be at the end

53:44

Aaron Francis

... in my opinion, the scroll bar is in the wrong position, but the lines-

53:48

Joe Tannenbaum

But it means we-

53:48

Aaron Francis

... are in the right position

53:49

Joe Tannenbaum

... are probably doing something wrong, I would say.

53:51

Aaron Francis

Yeah.

53:52

Joe Tannenbaum

So-

53:53

Aaron Francis

Yeah. It's definitely me, not Jess. That's for- ... that's for dang sure. I can guarantee you that one.

54:00

Joe Tannenbaum

Um, okay, let's-

54:01

Aaron Francis

Oxyzone, I am reading YouTube chats as well. Yes, I'm reading all chats. Um, okay.

54:07

Joe Tannenbaum

What, uh... Let's go back to the scroll bar method to make sure we're passing all the right params still.

54:12

Aaron Francis

Um, where?

54:16

Joe Tannenbaum

Yeah. We have lines count. That's cor- Okay. So we have the visible, which is fine. The start, which is the scroll index. The allowed lines. Hmm. Maybe we don't need the... Maybe the minus one is messing us up, although it shouldn't be, but maybe it is.

54:37

Maybe the minus one needs to be differentiated.

54:39

Aaron Francis

That's my, that's my favorite fix is like, did the minus one need to be there? We don't know

54:45

Joe Tannenbaum

I don't know, let's see.

54:45

Aaron Francis

We're gonna find out.

54:46

Joe Tannenbaum

Let's see if it breaks.

54:46

Aaron Francis

I always do a minus one, plus one, see what happens. Um...

54:52

Joe Tannenbaum

There we go. Now we are sort of-- We are-- Now we're getting a little space at the bottom, which is weird, so-

54:55

Aaron Francis

Doing a little overscroll.

54:59

Joe Tannenbaum

Hmm. Some- something's funny here. I'm not really sure-

55:02

Aaron Francis

But this, this is, this is fine-tunable later.

55:04

Joe Tannenbaum

Yeah. But we have a scrolling bar, which is cool.

55:07

Aaron Francis

This is very cool. Um...

55:10

Joe Tannenbaum

Oh.

55:11

Aaron Francis

Allow-

55:12

Joe Tannenbaum

Uh, are we getting... No, we shouldn't. No. No. No. I was thinking, do we have, like, an extra space at the end of the log? Is there a space at the end of the log? Do you have a-

55:24

Aaron Francis

Let's check

55:24

Joe Tannenbaum

... do you have automatically adding a space, or is there no space?

55:28

Aaron Francis

Hey, it's not our fault.

55:31

Joe Tannenbaum

It's not our fault.

55:31

Aaron Francis

It's not our fault.

55:32

Joe Tannenbaum

No, this is correct. This is the correct output.

55:33

Aaron Francis

Well, I mean, it's mostly, it's mostly my fault. Yeah. Why do you, why are you doing that?

55:36

Joe Tannenbaum

It just auto-adds a space 'cause that's an editor thing.

55:39

Aaron Francis

Oh. PHP Storm, huh?

55:42

Joe Tannenbaum

Um, so that's correct. That's good. We did it.

55:43

Aaron Francis

We did it.

55:45

Joe Tannenbaum

Yep.

55:45

Aaron Francis

Oh.

55:46

Joe Tannenbaum

Oh.

55:46

Aaron Francis

Did we just loop around?

55:49

Joe Tannenbaum

Uh, oh, you're probably not-

55:50

Aaron Francis

Uh-oh

55:50

Joe Tannenbaum

... testing for uniqueness as you tail. Oh, 'cause you were... Okay. Let's see. No, I'm just thinking-

56:00

Aaron Francis

Is that a command thing? Let's restart it.

56:02

Joe Tannenbaum

Yeah.

56:02

Aaron Francis

Um-

56:03

Joe Tannenbaum

So, so basically something changed a couple of times, and you are just still piping it straight through into... It's not what would normally happen in a real log. You did something, like, weird, where you re-saved a file several times, and so tail just kind of piped in the existing log back to you. Normally, you would just get the new entries and you would probably be okay.

56:24

But you should-

56:24

Aaron Francis

Got it

56:25

Joe Tannenbaum

... check that. That seems-

56:27

Aaron Francis

Check, check that later

56:28

Joe Tannenbaum

... something's funny there. That's later. That's later.

56:29

Aaron Francis

Something's funny.

56:30

Joe Tannenbaum

Yeah.

56:31

Aaron Francis

Um, that's not the first weird thing I've done on this project, that's for sure. Um, okay. Let's do... How much more time do you have? Any?

56:40

Joe Tannenbaum

Uh, I probably have, like, 10 more minutes, and then I'm, uh-

56:42

Aaron Francis

All right

56:42

Joe Tannenbaum

... I'm probably gonna bounce.

56:43

Aaron Francis

Let's do, uh, let's do a little bit of... Well, you tell me. So, w- I have a few options here. We could do a little bit of cleanup, um-

56:53

Joe Tannenbaum

Yeah

56:53

Aaron Francis

... which isn't terribly sexy. We could do a, um, like a, like a pause and resume kind of thing. So here's, here's the use case that I'm thinking of. Um, if, if I'm, like, developing and something goes wrong, I wanna come and look at the logs, but they might have scrolled off the screen by then, of course.

57:16

Joe Tannenbaum

Mm-hmm. Mm-hmm.

57:17

Aaron Francis

So this is good, but I basically want, when I scroll up, um, I want it to... I don't know, like, I don't know how to handle the logs continually appending and keeping my scroll position, and then being like-

57:34

Joe Tannenbaum

Yeah

57:34

Aaron Francis

... "Okay, I'm done scrolling. Let's, like, jump to the bottom."

57:39

Joe Tannenbaum

It, it-- Yeah, that's a tricky one. I mean, um, you basically have to say, like, is the scroll index currently at the end-

57:47

Aaron Francis

Mm-hmm

57:47

Joe Tannenbaum

... while, when a new log comes in.

57:49

Aaron Francis

Mm-hmm.

57:50

Joe Tannenbaum

And if it is, make the sc- like, adjust the scroll index to be the new end scroll index to account for the new logs. So you could just up- update that state automatically as logs come in.

57:59

Aaron Francis

Oh.

57:59

Joe Tannenbaum

But if it's already not at the end, we assume you're scrolling-

58:03

Aaron Francis

Uh-huh

58:03

Joe Tannenbaum

... and keep it where it's at and let it, let it come back. And then you could always have, like, a little shortcut that says, like, "Jump me to the..." Like, live, live stream it or whatever, which basically, like, resumes the... And it, and it basically would update the scroll index to your last one, so that when the next logs come in, we assume we're auto-scrolling and it'll just start popping in. Does that make sense?

58:21

Aaron Francis

Uh-huh. Uh-huh. Uh-huh. Boy-

58:23

Joe Tannenbaum

Is that anything?

58:24

Aaron Francis

That's not a 10 minute, that's not a 10 minuter.

58:27

Joe Tannenbaum

Uh, no, but we can, we can talk about, like, the approach to what it would mean to pause, if you wanted to, like, pause it coming in. Is that... Or you just wanna do, like, an auto-scroll, not auto-scroll situation. That's really what you mean when you... When you say pause, you're not saying pause them coming in. You're saying pause-

58:46

Aaron Francis

Pause my view-

58:46

Joe Tannenbaum

... tailing

58:47

Aaron Francis

... of what's coming in, I think.

58:50

Joe Tannenbaum

Okay. So, um...

58:54

Aaron Francis

So let's do this. Let's do, real quick, um-

58:56

Joe Tannenbaum

So we could, we could make it, we could, we could do this. We could do this, I think. We could get-

59:01

Aaron Francis

Let's make sure

59:01

Joe Tannenbaum

... we could get, we could make some headway.

59:03

Aaron Francis

Let's make sure. I'm gonna open this test command and make sure I don't have any keys hanging around. I do not. So you can see how smart I am. I, uh, sometimes will just test things here, 'cause I don't really understand-

59:14

Joe Tannenbaum

Mm-hmm. Mm-hmm

59:14

Aaron Francis

... some behaviors. Very normal.

59:15

Joe Tannenbaum

Mm-hmm. Yep. Yep.

59:16

Aaron Francis

Um, okay. So let's say, uh, while true, info i++, i equals, who knows, we'll start at 40. Um, sleep for one. Okay. That's gonna log it, right?

59:36

Joe Tannenbaum

Yeah. So here we could just right out the gate make this auto-scroll very easily.

59:42

Aaron Francis

Okay.

59:42

Joe Tannenbaum

So if we go back to our-

59:45

Aaron Francis

I'm gonna start this command.

59:47

Joe Tannenbaum

Or... Okay. If we go to our-

59:50

Aaron Francis

And if we run that-

59:50

Joe Tannenbaum

I wanna say it's the gathers input. Oh, are we getting... That's true, that's gonna do.

59:55

Aaron Francis

We should see... Cool.

59:57

Joe Tannenbaum

Yeah. Perfect.

59:57

Aaron Francis

Okay. So it's wonky, but it's working. Okay.

1:00:00

Joe Tannenbaum

Okay.

1:00:00

Aaron Francis

All right.

1:00:02

Joe Tannenbaum

Uh-

1:00:03

Aaron Francis

You want it to be here?

1:00:05

Joe Tannenbaum

I think so. Is this where... Yeah. Yeah, yeah, yeah, yeah. Is this where the scroll index lives?

1:00:10

Aaron Francis

I think the scroll index lives on this one.

1:00:13

Joe Tannenbaum

Mm-hmm. You've already made this harder. Why? Why? Okay. Yeah. You, so-

1:00:18

Aaron Francis

Well, I didn't, I didn't... That wasn't me. You did it.

1:00:21

Joe Tannenbaum

Here's, here's, here's my thought on this, which is that-

1:00:25

Aaron Francis

Okay

1:00:25

Joe Tannenbaum

... um, where, where do we append the new lines in gathers output? Can you go to that method?

1:00:30

Aaron Francis

Uh-huh.

1:00:32

Joe Tannenbaum

Okay. So, mm-hmm, where's output? Lines, erase slice. So right here, here's what we need to do. We need to check based on the current wrapped lines, are we on the, are we at the last scroll index we could possibly be at? Are we at the max?

1:00:50

Aaron Francis

Mm-hmm.

1:00:51

Joe Tannenbaum

If we are, that means we can assume that we are auto-scrolling. Okay. So basically, like, we just need auto scroll equals some sort of Boolean, right? Oh, God. I'm, I'm killing you right now, I can feel it.

1:01:06

Aaron Francis

No.

1:01:06

Joe Tannenbaum

Uh, so let's just say true. Uh, we do some sort of check here that says, like, are we auto-scrolling at this point, right? Then we append the lines, and then we would say, if auto scroll, uh... Oy yoy yoy.

1:01:22

Aaron Francis

No, no, no, I don't like it.

1:01:24

Joe Tannenbaum

You don't like this?

1:01:25

Aaron Francis

I don't like it.

1:01:25

Joe Tannenbaum

Okay, how do you wanna do it?

1:01:25

Aaron Francis

What if we do... What if we h- what if we set, uh, what if we set when the scroll index is negative one, it's in live mode?

1:01:39

Joe Tannenbaum

Well, 'cause we need the scroll index to show where the scroll bar is on the s- on the scrolling. That needs to be set correctly. We can, we can have a Boolean that says, like, we're in live mode or we're not in live mode, right?

1:01:51

Aaron Francis

Well, if we follow that through and we come to the renderer, where do we take the index? Um, if start equals negative one, start equals... What, what would be the last line, basically?

1:02:13

Joe Tannenbaum

Hmm. Okay. Yeah. Um-

1:02:16

Aaron Francis

Well, what would be the max? So if we come over here, what is the max? The max is max lines less scroll panel height-

1:02:26

Joe Tannenbaum

Yeah

1:02:26

Aaron Francis

... which we have. Does this feel weird?

1:02:34

Joe Tannenbaum

I think where you're gonna run into trouble is as soon as you start scrolling, w- what does that look like? I.e., like, okay, so it's at negative one now, and I've s- I now scroll-

1:02:45

Aaron Francis

Uh-huh

1:02:45

Joe Tannenbaum

... up. And so I have to then check, are we at negative one?

1:02:49

Aaron Francis

Oh, you gotta check for negative one everywhere.

1:02:51

Joe Tannenbaum

Set it... Set, yeah, negative one becomes this weird flag that we have to set everywhere or we have to check for everywhere in order to-

1:02:56

Aaron Francis

Yep

1:02:56

Joe Tannenbaum

... understand what the index should be.

1:02:58

Aaron Francis

Yep, yep, yep, yep, yep, yep, yep.

1:02:59

Joe Tannenbaum

Um...

1:03:00

Aaron Francis

All right, let's do the Boolean style.

1:03:06

Joe Tannenbaum

I mean, I don't really love the Boolean either- ... but we can start there and see if it, like, it, we can get it to work correctly at the very least.

1:03:12

Aaron Francis

Well, I don't like, I don't like the idea of messing about with-

1:03:15

Joe Tannenbaum

It knows too much in there. Yeah, yeah, yeah.

1:03:18

Aaron Francis

Yeah.

1:03:19

Joe Tannenbaum

Uh, well, we can, well, we can... I don't know how this is all set up, but w- who's calling onTick in here? Are you calling onTick in the dev command?

1:03:29

Aaron Francis

I think you're calling onTick. UseTick-

1:03:32

Joe Tannenbaum

Oh, is this just a loopable?

1:03:33

Aaron Francis

... is a loopable. Mm-hmm. So every tick it sh- sees if the command is trying to stop, otherwise it gathers up the latest output since the last tick. No good?

1:03:50

Joe Tannenbaum

No, it's fine. I just, uh, I was trying to, I was trying to delegate the responsibility elsewhere, but we're not in direct control of... Like, this doesn't know about the dev command, right?

1:04:03

Aaron Francis

Correct.

1:04:03

Joe Tannenbaum

Or does it?

1:04:04

Aaron Francis

Correct.

1:04:05

Joe Tannenbaum

Hmm. That's tricky. Um, well, this is-

1:04:12

Aaron Francis

So here's-

1:04:12

Joe Tannenbaum

... becoming a not 10-minute thing.

1:04:14

Aaron Francis

Well, and we're already, like, six minutes into your 10. So we got four-

1:04:17

Joe Tannenbaum

Yeah

1:04:17

Aaron Francis

... minutes left. Um, so let's program by wishful thinking and say that here we want, um, we're just gonna say pause and-

1:04:33

Joe Tannenbaum

Mm-hmm

1:04:34

Aaron Francis

... live. Um, and then we'll come over here. Where are you? We're gonna say restart. These all need to be cleaned up just a little bit. We'll say pause and live. And-

1:04:49

Joe Tannenbaum

I mean, technically you could, you could, uh, make that one hotkey that, that switches based on what you're actually in, but that's for later.

1:04:57

Aaron Francis

Hmm. I like that. Combine based on state. Um-

1:05:05

Joe Tannenbaum

Well, that, that one is-

1:05:07

Aaron Francis

What about that?

1:05:09

Joe Tannenbaum

Yeah. This I, this I dig. I dig. I like.

1:05:11

Aaron Francis

Okay. Okay.

1:05:12

Joe Tannenbaum

Yep. Yep. Uh-huh. Uh-huh.

1:05:14

Aaron Francis

Hey, newness here. Um, current command is a dev command. And so then if we come over here and we say we got scroll down, we got scroll up. What if we said, um, we just want... Then the question is, what do we do in here?

1:05:35

Joe Tannenbaum

Well, if we s- if we say, like, set a flag to say what mode we're in.

1:05:40

Aaron Francis

Mm-hmm. Okay. I like the word mode. That seems cool.

1:05:45

Joe Tannenbaum

Yeah. Um.

1:05:52

Aaron Francis

No need to have random-

1:05:52

Joe Tannenbaum

Oh

1:05:53

Aaron Francis

... strings. We can just say-

1:05:54

Joe Tannenbaum

Wait. Um-

1:05:54

Aaron Francis

Oh, go on

1:05:54

Joe Tannenbaum

... no, keep it. No, need, just keep... What was your thought?

1:05:59

Aaron Francis

I was gonna say, no need to have random strings. We can just have a Boolean, right?

1:06:07

Joe Tannenbaum

Okay. Here, here, here's the thing that we can, here's the thing that we can do.

1:06:12

Aaron Francis

Yeah.

1:06:12

Joe Tannenbaum

Great.

1:06:12

Aaron Francis

Tell me.

1:06:13

Joe Tannenbaum

We're here.

1:06:14

Aaron Francis

Yeah.

1:06:14

Joe Tannenbaum

Uh, let me, let me type for a second. Let me just see if we got-

1:06:17

Aaron Francis

Oh, drive, baby. Let's see it

1:06:18

Joe Tannenbaum

... uh, uh, pet function. Uh, catch... I'm just gonna call this catch up scroll for right now.

1:06:25

Aaron Francis

Okay.

1:06:26

Joe Tannenbaum

And this is void, and it's just gonna s- oh, my God, this is killing me. I don't know how-

1:06:30

Aaron Francis

I know. I'm so sorry

1:06:31

Joe Tannenbaum

... you do it. That's okay. If, uh, we can say, whoops, if this... There's just an immense amount of lag, so I can't see what I'm typing in real time. Uh, basically what we're gonna do is set this scroll index equal to, uh, uh, uh, uh, uh, um, this rat...

1:06:56

Oh, no, it's component. This component Uh, don't enter wrapped lines-

1:07:05

Aaron Francis

Mm-hmm. Mm-hmm. Mm-hmm

1:07:05

Joe Tannenbaum

... count minus this. What, what was the vis- uh...

1:07:14

Aaron Francis

I can scroll down. Hang on.

1:07:15

Joe Tannenbaum

What was the thing? I don't remember what the thing was. Yeah. So, and just for n- right now we'll just grab-

1:07:22

Aaron Francis

Yeah

1:07:22

Joe Tannenbaum

... this here.

1:07:23

Aaron Francis

We'll fix, fix all this later. This, this-

1:07:25

Joe Tannenbaum

Yeah. This'll, this'll be nicer, nicer later. Um, and then when we loop, uh, go back to the loop, the main loop. Oh, I think I missed a semicolon here. Sorry.

1:07:37

Aaron Francis

Yeah. Let me grab something fast. So we'll do this, and then we need to add, uh, we need to add public bool paused equal false.

1:07:48

Joe Tannenbaum

And if we go back to the main loop-

1:07:49

Aaron Francis

The loopable

1:07:50

Joe Tannenbaum

... and then we go... No, the main loop in the, in the app state.

1:07:55

Aaron Francis

I don't know what the main loop in the app state-

1:07:57

Joe Tannenbaum

Sorry, right there. Yeah, dashboard.

1:07:58

Aaron Francis

Renderer? Sorry. Renderer?

1:08:00

Joe Tannenbaum

Um, being... No, just the regular dashboard.

1:08:02

Aaron Francis

Okay.

1:08:02

Joe Tannenbaum

Sorry, I'm being massively unclear. Go down to where the loop method, which is right there.

1:08:07

Aaron Francis

Oh, yeah. Okay.

1:08:08

Joe Tannenbaum

And now we can say, we can grab this, and we can say boop, and we can say catch up scroll here.

1:08:20

Aaron Francis

What?

1:08:20

Joe Tannenbaum

And now-

1:08:22

Aaron Francis

What?

1:08:22

Joe Tannenbaum

... I think, I think this m- might do it, and I don't know, but, like, let's just, let's just rip it.

1:08:30

Aaron Francis

Okay. Tell me-

1:08:31

Joe Tannenbaum

Let's go

1:08:31

Aaron Francis

... what you've just done. So you, let's just... We've done this.

1:08:34

Joe Tannenbaum

So-

1:08:34

Aaron Francis

You've done def main.

1:08:35

Joe Tannenbaum

So as we loop through-

1:08:37

Aaron Francis

Mm-hmm

1:08:37

Joe Tannenbaum

... as we loop through, we are saying, "If it's not paused, set the scroll index to the last scroll index that's possible," meaning, like, we want the live feed of it, okay? So every time we loop through-

1:08:48

Aaron Francis

Oh

1:08:48

Joe Tannenbaum

... we're gonna set it to the last one. But if we're not paused, we can scroll as we wish.

1:08:55

Aaron Francis

Oh. Okay, so let's do this. Um, we can comment out that.

1:08:59

Joe Tannenbaum

So in terms of a usability thing that we can flag for later-

1:09:03

Aaron Francis

Mm-hmm

1:09:03

Joe Tannenbaum

... you should disable manual scrolling if you are in paused mode, because it, otherwise it's gonna constantly fight you to be down instead of being, allow you to scroll through the thing. You could also say, "As soon as we scroll, put it in pause mode." That could also be a thing that you do. But-

1:09:18

Aaron Francis

Yeah

1:09:18

Joe Tannenbaum

... neither here nor there.

1:09:19

Aaron Francis

Yeah.

1:09:20

Joe Tannenbaum

Okay, let's try it.

1:09:21

Aaron Francis

All right. All right, so we're just, like, we're cruising.

1:09:25

Joe Tannenbaum

Yeah.

1:09:26

Aaron Francis

Uh, it's getting a little weird. Don't know where that's coming from.

1:09:30

Joe Tannenbaum

I think it's because we're getting mixed, um... You need to clean up the output that's coming in, because you're getting, I think, chunks of... Like, meaning when you're tailing, you're getting, you're not getting clean output back, I think is what I'm saying.

1:09:49

Aaron Francis

Let's do that.

1:09:55

Joe Tannenbaum

My goodness, what is happening now?

1:09:57

Aaron Francis

I do not know. But if we hit pause, it did pause.

1:10:03

Joe Tannenbaum

Okay. And if we hit L, does it go back? Yep.

1:10:05

Aaron Francis

And if you hit L, hey, I think that works.

1:10:09

Joe Tannenbaum

All right. It's something. It's just a little, something's off here. There's, like, something to-

1:10:15

Aaron Francis

There's, I think there's something off-

1:10:16

Joe Tannenbaum

... fix

1:10:16

Aaron Francis

... with, like, the actual command.

1:10:23

Joe Tannenbaum

Yeah. Something, something's wrong. I'm not really sure what it is, but I have to-

1:10:25

Aaron Francis

I'm not either. But this is good, because if we pause it, if we pause it, we can actually scroll up. Who knows why they're interleaved like that.

1:10:34

Joe Tannenbaum

Yeah.

1:10:34

Aaron Francis

Um, and then if we hit live, it pops back down to the bottom. So there's likely-

1:10:40

Joe Tannenbaum

We'll take it

1:10:41

Aaron Francis

... a-

1:10:43

Joe Tannenbaum

It... Some-

1:10:45

Aaron Francis

Oh

1:10:45

Joe Tannenbaum

... something about the way this is coming in.

1:10:46

Aaron Francis

No, no, no. This person is totally right. Who is that? Chris. Chris on YouTube is totally right. I am starting this command twice.

1:10:56

Joe Tannenbaum

Oh. Oh. Oh.

1:10:58

Aaron Francis

No, no, no, no. Don't... No, no, no. That's, no, no. Don't laugh at me. Don't laugh at me. No, no, no. That's not on me. Well, you should've caught that. You sh- you should-

1:11:04

Joe Tannenbaum

Oh, man. That's hilarious

1:11:05

Aaron Francis

... you should've seen that. All right. All right. Forget that that ever happened. We're back, baby. We're back.

1:11:11

Joe Tannenbaum

Okay. It's still doing something so weird, and I don't know what that is. What is, what is happening here?

1:11:18

Aaron Francis

But it worked kind of.

1:11:20

Joe Tannenbaum

It kinda worked.

1:11:26

Aaron Francis

Oh, now, now it's not pausing anymore. Okay. That's it. We're done. That was 10 minutes.

1:11:34

Joe Tannenbaum

Okay.

1:11:35

Aaron Francis

We're close.

1:11:35

Joe Tannenbaum

Thank you. This was fun. This was fun.

1:11:37

Aaron Francis

This was great.

1:11:37

Joe Tannenbaum

We got, we got into a place where it's like, okay, we can play in this pl- this space a little bit.

1:11:40

Aaron Francis

Yes.

1:11:41

Joe Tannenbaum

That's not bad.

1:11:41

Aaron Francis

So there's a lot to clean up. Um, for those of you watching, you need to go find... Well, there they are. You need to go find Jess Archer-

1:11:52

Joe Tannenbaum

Jess Archer, for sure

1:11:53

Aaron Francis

... who's created Prompts underneath, and you need to go find Joe Tiemanbaum, who created-

1:11:58

Joe Tannenbaum

Tiemanbaum

1:11:59

Aaron Francis

... Chewy on top. Both-

1:12:00

Joe Tannenbaum

Yeah

1:12:01

Aaron Francis

... Laravel employees. Um, and also, while we're here, did you see this? Does, does this speak to-

1:12:07

Joe Tannenbaum

I didn't wanna-

1:12:07

Aaron Francis

... your Chewy heart?

1:12:08

Joe Tannenbaum

I didn't wanna... I...

1:12:11

Aaron Francis

I appreciate the respect.

1:12:13

Joe Tannenbaum

I saw it yesterday, and I was like, the urge to tweet this is so strong-

1:12:17

Aaron Francis

I know

1:12:17

Joe Tannenbaum

... because it really-

1:12:18

Aaron Francis

No

1:12:18

Joe Tannenbaum

... is fantastic.

1:12:19

Aaron Francis

Dude-

1:12:19

Joe Tannenbaum

But also, I can't, I cannot

1:12:20

Aaron Francis

... that's very, that's very thoughtful.

1:12:23

Joe Tannenbaum

I cannot.

1:12:23

Aaron Francis

You are free.

1:12:24

Joe Tannenbaum

But-

1:12:24

Aaron Francis

All of you are free to like Planet Scale. That is totally fine.

1:12:28

Joe Tannenbaum

The... Oh, I don't dislike them. I just, you know, eh, you know.

1:12:30

Aaron Francis

Yes. That's totally fine.

1:12:32

Joe Tannenbaum

Uh, I think this is-

1:12:33

Aaron Francis

Yeah. What do you think?

1:12:34

Joe Tannenbaum

... bold and fun and great, and I'm very, very into it. It's horrific on mobile right now, but it is great on desktop.

1:12:41

Aaron Francis

Oh, is that it?

1:12:42

Joe Tannenbaum

Um-

1:12:42

Aaron Francis

Is that true?

1:12:43

Joe Tannenbaum

It's probably a really hard thing to nail on mobile. I don't know.

1:12:45

Aaron Francis

This is some real-

1:12:45

Joe Tannenbaum

My, my phone lives-

1:12:46

Aaron Francis

... not real mobile

1:12:47

Joe Tannenbaum

... lives wild. Um-

1:12:48

Aaron Francis

Yeah.

1:12:49

Joe Tannenbaum

This is so cool. I think this is rad. I think this is really cool.

1:12:51

Aaron Francis

I immediately thought of you when I saw this.

1:12:53

Joe Tannenbaum

Yeah.

1:12:53

Aaron Francis

I thought-

1:12:54

Joe Tannenbaum

Yeah

1:12:54

Aaron Francis

... I thought, "Joe's, Joe's gonna like this."

1:12:55

Joe Tannenbaum

'Cause, like, nobody's doing anything even close like this right now.

1:12:59

Aaron Francis

No.

1:12:59

Joe Tannenbaum

Like, this is so bespoke and so nice, and I think it's V-- I think it's fantastic. I'm so into it.

1:13:05

Aaron Francis

I have questions about whether this will convert. Um, like is, does this serve the business needs? But-

1:13:10

Joe Tannenbaum

That's a whole lot of not my problem, but-

1:13:12

Aaron Francis

Yeah.

1:13:13

Joe Tannenbaum

Yeah. I, I, I agree. I agree.

1:13:15

Aaron Francis

Honestly, a lot of not my problem now, too.

1:13:17

Joe Tannenbaum

Yeah. Yeah. Uh, but I respect the, I respect the big swing, and I think it's-- I, uh, for me, it's working. I think it's great. Wow, they really minified the heck out of that, huh?

1:13:25

Aaron Francis

They sure did.

1:13:26

Joe Tannenbaum

Uh, but then they have to pre all this stuff 'cause it's literally just text. That's amazing.

1:13:30

Aaron Francis

And then it's also Remix. It's amazing.

1:13:32

Joe Tannenbaum

Oh, boy.

1:13:33

Aaron Francis

Yeah. Anyway, I thought of you. I don't... I, I will withhold all opinions, but I thought of you when I saw this.

1:13:39

Joe Tannenbaum

I am a fan.

1:13:40

Aaron Francis

Just gonna leave it.

1:13:40

Joe Tannenbaum

I'm a big fan.

1:13:41

Aaron Francis

Yeah.

1:13:41

Joe Tannenbaum

Yeah.

1:13:41

Aaron Francis

Good for-

1:13:42

Joe Tannenbaum

Yeah

1:13:42

Aaron Francis

... good for you.

1:13:42

Joe Tannenbaum

For sure.

1:13:42

Aaron Francis

Good for them. All right. Thanks for doing this.

1:13:45

Joe Tannenbaum

Uh, dude, thank you. It's a pleasure.

1:13:46

Aaron Francis

Super fun. Yeah. Y'all, thanks for hanging out. I will, um... So here's last question, Joe. Do you think this is, do you think this is, uh, usable? Like, not right now, but as a concept, having all of this running versus NPX concurrently?

1:14:03

Joe Tannenbaum

Um, when Taylor first showed us this a couple weeks ago or whenever it was-

1:14:10

Aaron Francis

Mm-hmm

1:14:10

Joe Tannenbaum

... uh, he would, like, put it in the Slack channel. He's like, "What do you think?" I was like, "This feels like it should be a two-way probably."

1:14:16

Aaron Francis

Come on. Hey.

1:14:16

Joe Tannenbaum

It feels like exactly kind of what you're building.

1:14:18

Aaron Francis

Yeah.

1:14:18

Joe Tannenbaum

Like... And I was like, "Is this why I was hired? Is this the reason that we-"

1:14:21

Aaron Francis

Yeah

1:14:21

Joe Tannenbaum

"... finally gotten here?" Um, I think that-- Here's, here's what I think. I think it's a, actually a better user experience than the concurrently, in my opinion.

1:14:29

Aaron Francis

Uh-huh. Uh-huh.

1:14:29

Joe Tannenbaum

I don't like that it's really all mixed together. Um-

1:14:31

Aaron Francis

I don't either. Hate that

1:14:32

Joe Tannenbaum

... it feels less, like, parsable to me.

1:14:36

Aaron Francis

Uh-huh.

1:14:36

Joe Tannenbaum

But, um, the difficulty of getting it exactly right, the types-

1:14:43

Aaron Francis

Uh-huh

1:14:43

Joe Tannenbaum

... of stuff that are going to be coming through the pipe in these streams-

1:14:47

Aaron Francis

Yeah

1:14:47

Joe Tannenbaum

... is hard. And making it right across, especially different terminals, is very difficult.

1:14:52

Aaron Francis

Mm-hmm.

1:14:52

Joe Tannenbaum

That being said, I think tabs is a, you know, 100X experience over, over the-- Like, this is a big leap forward. I like that, like, you can just start the whole process in one fell swoop. I do love that.

1:15:03

Aaron Francis

Yeah.

1:15:03

Joe Tannenbaum

I just think that the output is not, um, as, as parsable as I would like it to be, considering it's important stuff that I need to look at. You know what I mean?

1:15:12

Aaron Francis

Yes. Okay.

1:15:12

Joe Tannenbaum

So I think it's a step in the right direction.

1:15:14

Aaron Francis

Like, I don't wanna see, I don't wanna see Veet constantly spamming stuff when I'm trying to find logs, and that's the problem-

1:15:19

Joe Tannenbaum

Yeah

1:15:20

Aaron Francis

... in my opinion, with NPX concurrently, is-

1:15:23

Joe Tannenbaum

Yeah

1:15:23

Aaron Francis

... like, the, the relative weight of importance is all set to equal, and it's like, that's just-

1:15:27

Joe Tannenbaum

Mm-hmm

1:15:27

Aaron Francis

... noisy, and so I don't like that.

1:15:29

Joe Tannenbaum

Mm-hmm.

1:15:30

Aaron Francis

Okay, cool.

1:15:30

Joe Tannenbaum

That's my, that's my feeling as well.

1:15:31

Aaron Francis

Well, I will get this polished up, and then, uh, we'll release it open source, and we'll let the people fix all the bugs. Isn't that how it works?

1:15:39

Joe Tannenbaum

That's how it works. That's how it works.

1:15:40

Aaron Francis

And if anybody, if anybody ends up using it, they have to pay me 8% of their revenue, so-

1:15:45

Joe Tannenbaum

There it is

1:15:45

Aaron Francis

... hey, we're just having fun.

1:15:46

Joe Tannenbaum

There it is.

1:15:46

Aaron Francis

We're just having fun. All right. Thanks, y'all. Thank you, Joe-

1:15:49

Joe Tannenbaum

All right, dude

1:15:49

Aaron Francis

... for doing this. We'll talk soon. See y'all later.

1:15:52

Joe Tannenbaum

See you later.

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