Live data from Hacker News

Ask HN: How to learn about network programming (in Rust)?

news.ycombinator.com

1–10 of 10 posts

Ask HN: How to learn about network programming (in Rust)?

#1
Hello HN!

I 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!

Re: Ask HN: How to learn about network programming (in Rust)?

#2
Is 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.

Re: Ask HN: How to learn about network programming (in Rust)?

#3

Is 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.

Thanks!

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.)

Re: Ask HN: How to learn about network programming (in Rust)?

#4
post #3

Is 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.

Thanks! 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 ex…

Totally 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!

Re: Ask HN: How to learn about network programming (in Rust)?

#5
post #3

Earlier quoted context omitted.

Thanks! 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 ex…

Totally 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,…

This 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!

Re: Ask HN: How to learn about network programming (in Rust)?

#6
post #5

Earlier quoted context omitted.

Totally 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,…

This 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!

GPT-4 is significantly better than GPT-3.5-turbo. Do not use GPT-3.5-turbo outputs as your benchmark for the utility of the more advanced models! :) Especially when used for LLM Agents, or any kind of harder question.

Re: Ask HN: How to learn about network programming (in Rust)?

#7
post #5

Earlier quoted context omitted.

This 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!

GPT-4 is significantly better than GPT-3.5-turbo. Do not use GPT-3.5-turbo outputs as your benchmark for the utility of the more advanced models! :) Especially when used for LLM Agents, or any kind of harder question.

Got it, thank you so much!

Re: Ask HN: How to learn about network programming (in Rust)?

#10
post #9
post #8

There'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...

Thanks, will check it out!

Rust in Action also has a networking chapter [0] and the author has training services [1].

[0] https://www.manning.com/books/rust-in-action

[1] https://learning.accelerant.dev/