Coding a Web Server in 25 Lines - Computerphile
311,483
Published 2024-02-22
More about Laurie: bit.ly/C_LaurenceTratt
www.facebook.com/computerphile
twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharanblog.com/
Thank you to Jane Street for their support of this channel. Learn more: www.janestreet.com/
All Comments (21)
-
The joy of modern programming languages. Listening on a socket in just one line.
-
I loved Laurie’s smile each time he wrote something he knew was absolutely dodgy!
-
He is a gift that keeps on giving A fundamental explanation of making a simple webserver in 25 LOC for easy understanding of its components A lecturer that 1. Uses Rust 2. Uses a framework laptop 3. USES NEOVIM very nice
-
Programming Rust on a Framework laptop running OpenBSD. Absolutely based.
-
Honestly I didn't expect the fundamentals of HTTP to be so easy. This sort of "from-the-ground-up" approach was really fun to watch!
-
I had this professor for a few lectures in my undergrad during covid. He was very enthusiastic, funny and explained things really well. He was also was explaining concepts with his neovim + rust setup. Happy to see him again on computerphile!
-
Rust user? Framework laptop owner? Based prof.
-
The funny thing is, there's an async tutorial in the Rust Book that explains how to use threads with a web server do handle 4 workers. If I remember correctly it's not even 10 lines more. Would've been a cool addition!
-
'I am abusing this monstrously.' == always the sign of well-written code.
-
You can build the web server in one line of code if you put your 25 lines of code in a library. 😂
-
You can tell this guy loves what he does. Thanks for the video!
-
Don't know if it's a coincidence, but the code really reminded of the one in the first chapters of the Rust Book – Building a Multithreaded Web Server. I've just been reading it a couple of weeks ago, and can definitely recommend taking a look if you're interested! Though it's worth mentioning that the code does contain some difficult Rust
-
Great format for explaining web servers. Those 17 minutes flew by
-
it is important to remember that whichever end you are writing, you need to consider the other end a bad actor or buggy AF.
-
TELESCOPE USED!! LETS GOOOOOOO!!!!!
-
"In 25 lines" is doing a lot of heavy lifting with those libraries wrapping so much networking code.
-
This was awesome. I was a programmer, now a DBA. Having someone explain code like this is what a learning experience should be.
-
Even before the rest was completed, just the bit that sent back "Hello Computerphile" was totally amazing to me.
-
Fantastic content, that's what I was always missing in the "basic" server setup - the way the server actually functions!
-
Nice! One of my first projects was writing my own webserver in Java, later added PHP support and used it to host my website.