Ask HN: How to learn about network programming (in Rust)?
2 points by jessym 2 years ago | 9 commentsI would like to learn a bit more about network programming, because I have this idea of building a reverse proxy in Rust.
- I can read and write some basic Rust, but I'm struggling hard with all things related to networking (the mio library, command line tools such as nc, what really is a socket or tcp?)
- Are there any Rust-specific networking resources you can recommend for beginners?
- If not, any general networking resources? Preferably something accessible to somebody who doesn't know C.
- For what it's worth, I have about 8 years of experience with (modern) Java for web development.
Really looking forward to your thoughts and ideas, as I'm feeling a bit lost.
Thank you!
- sn9 2 years agoThere's a bit of network programming in Programming Rust. You can check the table of contents to see if it's what you're looking for.
https://www.amazon.com/Programming-Rust-Fast-Systems-Develop...
- jessym 2 years agoThanks, will check it out!
- sn9 2 years agoRust in Action also has a networking chapter [0] and the author has training services [1].
- sn9 2 years ago
- jessym 2 years ago
- arthurcolle 2 years agoIs there something about the std::net documentation that you find difficult to grok? https://doc.rust-lang.org/std/net/
Other than that, I wrote this blog post about some useful specific Rust resources: https://world.hey.com/arthurcolle/some-useful-rust-resources...
Not a Rust expert, just someone that wrote a useful crate or two.
- jessym 2 years agoThanks!
I'm definitely going to have a look at some of the resources from your blog post.
With regards to the standard documentation: I notice that I'm able to read the sentences, but I'm finding it a bit difficult to really turn it into a working project I actually understand.
(For instance: the docs give an example of how bind to a socket address, but I'm not sure how to morph this into a simple echo server, for example, which writes back whatever I sent to it. Feels a bit like I might be missing some general information about TCP and how to test it, how it relates to HTTP, etc.)
- arthurcolle 2 years agoTotally not an OpenAI shill or anything, but based on your question and this specific type of QA stuff, here's my advice: spend the 20 bucks on ChatGPT Plus to get GPT-4 access - it is an invaluable learning tool for questions such as these.
For example, with your specific question: https://chat.openai.com/share/0d922193-b9b6-4d51-85e8-d31c05...
Zero-shot correct solution to the example query. Based on your question, you could even just say "Can you explain X based on Y info that I found in the docs without writing a solution" if you truly just want to learn about the topic. Then with some iterative refinement of the results over a few back and forths, you can learn about the concept without necessarily having it write the code for you. Cheers!
- jessym 2 years agoThis is pretty good!
I've been trying to have the free GPT-3.5 explain me things, but the results were a bit mixed (I caught it making a few things up earlier). But I might give GPT-4 a try, thanks!
- jessym 2 years ago
- arthurcolle 2 years ago
- jessym 2 years ago