Live data from Hacker News

Beej's Guide to Network Programming

beej.us

31–40 of 91 posts

Re: Beej's Guide to Network Programming

#31
post #14

> "The way I see it, it's the educators who hold all the power in the world. No, stop laughing and hear me out. A good instructor can, over the course of their career, create hundreds of millions or even billions of dollars of GDP. Let's say a teacher teaches 40 students a year for 30 years. And Each of those students goes on to work for 40 years. And, due to the quality of instruction, they earn $10,000 more per yea…

> OK but providing value isn't the same as having power.

Providing value is absolutely a way of having power. You change the world, that's power.

Having power isn't the same as yielding benefit (for yourself).

Re: Beej's Guide to Network Programming

#32
post #16
post #9

My nick has been Beej or b33j ever since starcraft or counterstrike 1.5. I will always bring up “but you know who the real beej is, right?” if the other person is a nerd.

Now maybe I have to change all my usernames to animats0r for the same reason

Funny enough I only got this joke on my second read. One of my uncles had a company with a name similar to your joke :D ADD probably.

So, to me it was beej. But in reality, to the public [you can’t nickname yourself].

So it’s always been b33j0r. My friend who had the first dedicated server I encountered named me that because my name is Brian Jor—-

Finding me has been trivial since I first AWP’d in a CAL-O match. This was before scoutznknives were more than merit badges.

Re: Beej's Guide to Network Programming

#33
post #24

I'll ask here in case I can get help. I followed Beej's linked guide to transfer data over udp sometime ago, written in C on a Windows machine. I then compiled the code on Mac os x but could never get it to work properly. Tried all the Google suggestions at the time, posting this comment in case there's an obvious "oh did you set X?" tip from someone that has done a similar task.

What was the specific issue you ran into?

Re: Beej's Guide to Network Programming

#36

I'm not saying Rust is the answer to all things, I'm saying I want a Rust translation for continuity of the wisdom and concision I loved in this guide as a 14 year old.

The only problem is that it wouldn't be quite as useful. Zig, Rust, D, etc offer libraries and methodologies (async/await, for instance) that deprecate traditional raw socket programming. Instead, you would use something like tokio in Rust to do the same thing.

You certainly can program raw sockets, the techniques are almost orthogonal to the beej guide. It's the same API and Structs (using FFI) and you would change some glue logic to make it more rust idiomatic. It would just be less useful in those languages, generally.

Re: Beej's Guide to Network Programming

#37
post #24

I'll ask here in case I can get help. I followed Beej's linked guide to transfer data over udp sometime ago, written in C on a Windows machine. I then compiled the code on Mac os x but could never get it to work properly. Tried all the Google suggestions at the time, posting this comment in case there's an obvious "oh did you set X?" tip from someone that has done a similar task.

Maybe the reason you're not getting help is is that you're not asking a question. You're not even describing a problem. You're only stating that you have a problem.

Re: Beej's Guide to Network Programming

#38
Open question: in what fields are you working where you really need to work with actual sockets? Most of the network programming I do fall into one of two categories:

1. A library exists to abstract over the bytes-into-sockets layer, meaning I don't need to deal with it; or

2. A library probably exists to abstract over the bytes-into-sockets layer, but I've chosen to ignore it either because I'm truly ignorant of it, or for intellectual stimulation.

(Note that in category 2 I count things like "not using protobuf/thrift/etc. for IPC.)

When are these things not true? Genuinely curious! I'm guessing interfacing with existing obscure third parties, or using obscure language environments, but what are examples of that? And what other usages are there?

Re: Beej's Guide to Network Programming

#39
post #38

Open question: in what fields are you working where you really need to work with actual sockets? Most of the network programming I do fall into one of two categories: 1. A library exists to abstract over the bytes-into-sockets layer, meaning I don't need to deal with it; or 2. A library probably exists to abstract over the bytes-into-sockets layer, but I've chosen to ignore it either because I'm truly ignorant of it,…

There is a whole universe of programming that exists outside of webdev. Firmware, video games, high performance systems, etc.

Re: Beej's Guide to Network Programming

#40
post #38

Open question: in what fields are you working where you really need to work with actual sockets? Most of the network programming I do fall into one of two categories: 1. A library exists to abstract over the bytes-into-sockets layer, meaning I don't need to deal with it; or 2. A library probably exists to abstract over the bytes-into-sockets layer, but I've chosen to ignore it either because I'm truly ignorant of it,…

Had plenty of use cases where even zmq was overkill.

E.g. interfacing a research machine with an OEM machine or a machine to a standalone embedded target, sometimes it makes sense to just serialize, send over a socket, ethernet crossover cable and be done.

Post reply on HN