Virtual DOM for Your Terminal
Tsoding Daily
@tsodingdailyAbout
"Daily" Development Log of Tsoding. If you want to repost a clip from this channel, feel free to do so, but please credit the channel and provide the link to the original video. Thank you!
Latest Posts
Video Description
Previous Episodes: https://www.youtube.com/playlist?list=PLpM-Dvs8t0VZ1tPn-Qqdro3p_5s1HuMyF References: - Bug - https://twitter.com/Iptoux/status/1724878712926052530 - Tsoding - 4at - https://github.com/tsoding/4at Support: - BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9 - Servers: https://zap-hosting.com/en/shop/donation/2038e94867b5e65cab2e72abf8ad956c/ Chapters: - 0:00:00 - Announcement - 0:00:39 - Intro - 0:01:18 - Demo - 0:03:09 - Problem on Window - 0:05:17 - Terminal Virtual Buffering - 0:06:04 - Virtual DOM of React - 0:06:42 - Meta does not develop React for you - 0:07:22 - Crossterm is Too "Low-Level" - 0:08:04 - How do you implement a Virtual Buffer? - 0:08:44 - struct Buffer - 0:10:18 - Multi-Dimensional Arrays in Rust - 0:13:12 - impl Buffer - 0:13:43 - struct Cell - 0:15:02 - Outlining Buffer API - 0:17:11 - Buffer::put_cell() - 0:19:19 - Buffer::put_cells() - 0:22:17 - Compilation errors - 0:23:13 - Buffer::new() - 0:27:41 - Buffer::resize() - 0:29:34 - Preparing Buffer Instance - 0:31:14 - Buffering status_bar() - 0:38:15 - Visualizing the Buffer - 0:45:17 - Buffering Chat::render() - 0:48:33 - Factoring out Prompt::render() - 0:53:51 - Buffering Prompt::render() - 0:56:13 - Visualizing Final Buffer - 0:57:54 - Double Buffering - 1:00:00 - Buffer::diff() - 1:08:49 - Buffer::clear() - 1:10:05 - Patching the Buffer - 1:12:41 - "Swaping" Buffers - 1:13:52 - Initial Flush - 1:14:36 - Compilation Errors - 1:16:30 - Potential Patching Optimization - 1:17:14 - Q: How many years I need to learn Programming to be so "Fluent"? - 1:18:30 - Testing the Client for the First Time - 1:20:35 - Fixing the coordinates - 1:21:27 - Selection works! - 1:23:17 - Fixing the colors - 1:26:36 - Patching Optimization - 1:29:45 - Resizing the Terminal - 1:31:48 - Optimizing X movement - 1:34:43 - Testing with Server Locally - 1:36:05 - Committing changes - 1:36:52 - Requesting Feedback from Windows Users - 1:37:25 - How to use 4at client - 1:38:36 - Deploying to urmom - 1:39:14 - Receiving Feedback from Windows Users - 1:40:09 - DDoS Session - 1:41:42 - Outro
You May Also Like
Upgrade Your iPhone Experience
AI-recommended products based on this video

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

DUEDUE for Samsung Galaxy S25 Plus Case Magnetic Samsung S24 Plus Case Clear Compatible with Magsafe Slim Cover with Stand Ring Shockproof Protective Case for Samsung S25 Plus/S24 Plus 6.7 Inch Clear
![[3+3 Pack] for Samsung Galaxy S26 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S26 Tempered Glass Screen Protector 5G](https://m.media-amazon.com/images/I/71fBNpw7yNL._AC_UL960_QL65_.jpg)
[3+3 Pack] for Samsung Galaxy S26 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S26 Tempered Glass Screen Protector 5G
![[3+3 Pack] for Samsung Galaxy S25 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S25 Tempered Glass Screen Protector 5G](https://m.media-amazon.com/images/I/71MrPARmMqL._AC_UL960_FMwebp_QL65_.jpg)
[3+3 Pack] for Samsung Galaxy S25 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S25 Tempered Glass Screen Protector 5G
![[3+3 Pack] for Samsung Galaxy S25 Ultra Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S25 Ultra Tempered Glass Screen Protector 5G](https://m.media-amazon.com/images/I/71X+9YRBKCL._AC_UL960_FMwebp_QL65_.jpg)
[3+3 Pack] for Samsung Galaxy S25 Ultra Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S25 Ultra Tempered Glass Screen Protector 5G

Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More
![Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/71dL2NiwINL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black

Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black
![Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/61rMnLID99L._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black
![Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/61Ygh697e4L._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black

Yarxiawin Phone Case for Samsung S25 Case with Ring Stand Magnetic Compatible with Magsafe Wireless Charger, Pink Bumper Cover Samsung Galaxy S25 Case Clear Shockproof (Blue)

AsperX for Magsafe Power Bank, 10000mAh Wireless Magnetic Power Bank, 22.5W Wire Fast Charging Portable Charger with USB C Cable, LCD Display for Magsafe Battery Pack for iPhone 16/15/14/13/12

soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, IPX5 Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization via App

Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

soundcore by Anker Q20i Hybrid Active Noise Cancelling Headphones, Wireless Over-Ear Bluetooth, 40H Long ANC Playtime, Hi-Res Audio, Big Bass, Customize via an App, Transparency Mode, Ideal for Travel

soundcore by Anker Q20i Hybrid Active Noise Cancelling Headphones, Wireless Over-Ear Bluetooth, 40H Long ANC Playtime, Hi-Res Audio, Big Bass, Customize via an App, Transparency Mode, Ideal for Travel

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods

4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)

eazpower for Magsafe Power Bank 10000mAh, Magnetic Battery Pack Wireless, 20W PD Fast Charging, Compact Portable Charger with Built-in Cables and Stand for iPhone 16/15/14/13/12/ Apple Watch/Airpods
![Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified](https://m.media-amazon.com/images/I/61gT1WljYwL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

AMVR Upgraded Handle Attachment Compatible with Meta/Oculus Quest 3S/Quest 3 Accessories, 3-in-1 VR Gorilla Tag Long Arms, Beat Saber Handles, Golf Club Attachment(Not for Charging Dock)
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)




















