The video provides a pragmatic look at how AI can accelerate legacy code modernization while emphasizing that human oversight remains the final defense against functional regressions. It highlights the essential balance between automated efficiency and the meticulous craftsmanship required in core system development.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Rantcast 1: Neovim dev using AI, vim-fugitive, :terminalAdded:
Episode one of rant cast.
Except we can't call it rant cast because that was already taken by this annoying guy.
There's this old story about replacing T-select leveraging the vim.ui select with legacy features like T-select and Z equals for spell corrections.
And of course it is productive to use AI to start by just exploring a patch.
So, I gave it this query and uh guided it to use this thing that I designed also with the help of AI.
But this is just a starting point. It's very productive.
And there's no reason not to do this.
Not learning anything by uh trawling around in the depths of an old legacy code base that isn't very well or isn't as well organized as it could be.
Although it will get better organized over time with the help of the AI because we can I can use this extra technology to refine the code base.
Now I can review what it did.
And so, you can see here that already we're seeing processing results.
Building a selection menu with this this old approach.
Building a selection menu with the old legacy code is terrible. There's no reason to do this in this hokey bumbling way using these low-level C mechanisms where we're just uh >> [sighs] >> bit by bit building a a menu using the message system and then uh string formatting as print f.
This is terrible. We have We don't have to live like this.
So, instead I have told it to call out to Lua using interface that I designed earlier in a different PR.
And here it's building vim script objects are represented in in the C code.
They're represented as these things. It It It doesn't doesn't matter that they're that they happen to correspond to how how the how the C implementation uh works with vim script because they're basically just structs.
And so, they're useful for um passing things to Lua cuz it's it's it's very easy to serialize these structs to Lua and we have We have now a a a a a formal mechanism.
So, this new code looks like it's it's building some arguments that we will pass to Lua.
And so, now the task is to review what it's doing and see if there's any improvements that can be made.
And also, maybe we rewrite the comments a bit.
So, it's decided to return a minimal amount of data which apparently is all we need to fit it into this old legacy routine.
And it still has It has basically sort of moved some of the legacy logic.
Looks like the verbos had a an effect on on the logic. So, it shows some extra info.
And it's also pretending to handle right left which doesn't really work all that well and looks like we are no longer handling right left explicitly in C.
So, then we can check Are we doing any handling of right left here?
This is something the AI wrote.
No.
Is there any handling in here?
No.
But everything else in this old code mouse Is there any mouse handling in the new code? No.
So, with mouse uh it supported mouse clicks on the menu. You can see here like it's doing this sort of hokey bespoke handling of mouse clicks in the caller.
The UI.select should do that. Like it should handle that already. Should be no need for the spell suggest model to be dealing explicitly with mouse clicks.
Mouse handling.
Okay. So, the right left lack of right left handling is technically a regression. So, now I need to decide if I care about that.
>> [snorts] >> Oh, great.
This comment is very proud of itself.
What the [Β __Β ] Look at this.
Change spell backwards.
Cool.
Oh, UI.select depends on input list.
Yeah. So, like maybe input list should handle right left. Why are we doing that in spell?
>> [snorts] >> Uh yeah, custom makers of course probably don't handle right left. Like This should all be done in bespoke ways sprinkled all over the place.
So, as you can see, T-select didn't have this handling.
It's terrible.
So, I can take notes.
So, I'll just kind of let's see do some sort of fix up here for [groaning] the message kind.
ADHD check off.
GitHub because it never ends.
See if the reply was here.
Yay!
Thank you, Zier.
So, now I can do a quick test to see if it actually works. Okay, this is cool. So, let's just copy the the old Here we go.
And so, we can do this to prove to ourselves that the equals really is using UI.data select. So, I'm sorry, it's in this file. Oh, it isn't there.
Okay. And now, if we go back here, we do the equals. Hey, look.
It really is using UI.select. That's cool. And now, let's try TSelect. Oh, there's no X X like empty Oh, finally. Got the X. Got the text.
Got some now.
TSelect.
No, I am because we need to be in a C file. Okay, so TSelect.
No.
All right.
What does TSelect even do?
Okay, so TSelect get Hey, hey.
All right, cool.
This is very cool.
So, now we can exit out of that and uh continue reviewing cuz this looks like a success so far. And we just need to make sure that we aren't committing slop.
So, we can look at UI kinds to see what kinds are available.
>> [snorts] >> Um and uh confirm UI is like doesn't It's not for just like plain old messages. These look like plain old messages. Yeah, so it agrees and uh deleted this.
Look at this.
Using the old view to to manage the Git staging area and review changes.
What a concept.
So, this all looks good and now we need to double-check the new code in this function.
It's building type dials.
And then it passes them to this. And yeah, this this is just boilerplate code, nothing stuff.
So, we can move on to this this new s- the WSL core module.
Yeah, we don't need this comment.
>> [sighs] >> This was the old language. Yeah, but we need to translate it.
So, we have some precedent for that.
Mhm.
this thing.
This guy um has handling for scar just like the old code.
>> [snorts] >> The new code is doing the purpose handling internally.
Mhm.
Okay, so maybe we can move that to Lua.
Mhm.
No, empty kind is never correct.
Empty kind is never correct.
So This should be Maybe echo.
Probably echo.
And I don't know.
So now we'll do this.
And All right, we're going to do the minor amount of code.
We want this to be as close to like pure data mapping as possible. We don't want it to make decisions.
So this is just putting in a list and this is calling the little code.
Now I'm back in the land.
Yeah.
So we need to review that. Let's review that.
tag change it so I don't know what I needed.
So we got rid of this entire print tags list function. This is 173 lines of code that is just a bespoke way to present a list.
Like this.
It's like advancing the the cursor.
Just like It's manually drawing stuff to the screen.
It's doing alignment.
That might have been a regression.
Let's find out.
So we can compare.
On the top is the new way.
And then we can compare on the bottom.
What does it look like?
Oh.
It has a nice highlighting. So one thing we missed was the highlighting.
Probably also the truncation.
Wow. So the parsing and parse match.
You can see here it had redundant parsing in the old tags thing. This is just like constant deluge of bespoke ad hoc [clears throat] redundant code everywhere overtime shuffled down to fix bugs and all the people just get tired of reporting bugs and so you think you fixed the bugs, but you actually didn't.
They just got tired of reporting them.
Okay, break check is maybe not a good idea.
Although it was in the old code, so that means probably it's okay.
What that means is that um whatever was calling this, which is now called this, is presumably prepared to pull the event loop, which can then do stuff. It's probably set it here to pull.
And but then it still will execute this code after like event loop stuff happens and we won't check out until here.
So we probably want to check out and see.
Another thing to do it turns out uh the part of the AI is just feeding through a straw and you know, can't know everything adequately.
So if we break here, then uh I probably actually should return.
Cuz Yeah.
We don't want to present this selectively to the user.
interrupted Um I think this is the default prompt uh really cool if uh we can test.
Click.
So mouse equals A and then How much is this?
Yeah.
Cool.
Cool.
And then if we do that, pull then you can see it doesn't work. So yeah, like the old one had this fancy highlighting, but I don't know. We can somehow figure that out later.
And I don't think also the headers are even that helpful. Does anyone ever look at these headers? No, does it Does anyone even use these headers anymore?
Maybe I will now.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 viewsβ’2026-05-28
How agent o11y differs from traditional o11y β Phil Hetzel, Braintrust
aiDotEngineer
450 viewsβ’2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanationπ―β
LearnwithSahera
1K viewsβ’2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 viewsβ’2026-05-29
Search Algorithms Explained in 60 Seconds! π€π¨
samarthtuliofficial
218 viewsβ’2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 viewsβ’2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 viewsβ’2026-05-29
So What's Odin Lang Even Good For
TechOverTea
131 viewsβ’2026-06-01











