News for hackers. Stuff that matters.
Re:Beej's Guide to C Programming by greenyoda on Wednesday March 29, 2023 @11:48AM (#35358958)
This was discussed here a month ago: https://news.ycombinator.com/item?id=34946811
Re:Beej's Guide to C Programming by dang on Wednesday March 29, 2023 @01:28PM (#35360406)
Yup - almost exactly the same case as https://news.ycombinator.com/item?id=35343696 - we put it in the second-chance pool without realizing it was a dupe. Sorry!
Re:Beej's Guide to C Programming by daveslash on Wednesday March 29, 2023 @11:50AM (#35358981)
For those who might not be familiar with Beej, this is not his first or only guide. They're all excellent. There's a link near the top of the page: "Click here for other Guides"

Also, see previous posts here on HN https://news.ycombinator.com/from?site=beej.us

Re:Beej's Guide to C Programming by rhussmann on Wednesday March 29, 2023 @12:00PM (#35359138)
Beej's Guide to Network Programming was how I fumbled my way into socket programming AND C. I can't remember if I first encountered it in the late 90's or early 2000's. It's funny to think about that world now. Unless you had a shell account or ran Linux or some sort of Unix you had to _pay_ (or... not pay) to get access to a C compiler.

If you were lucky you'd get access to some FTP servers via IRC that might have some ZIP files full of good text docs, or wander upon some hacking clan's site that had good tutorials or info. But more likely you'd try to cobble it all together from as many sources as you could find.

I'm really glad we're in a time, and for the most part a community, that values sharing information free and wide, and supporting FOSS tools that put all this knowledge within reach.

Re:Beej's Guide to C Programming by mistrial9 on Wednesday March 29, 2023 @12:08PM (#35359250)
your timeline is a bit off there, but yes
Re:Beej's Guide to C Programming by reflectiv on Wednesday March 29, 2023 @12:58PM (#35359985)
His timeline sounds exactly right to me, I basically did the same thing.

Mid-late 90s I used Beej's network programming guide to write an IRC client.

Re:Beej's Guide to C Programming by morelisp on Wednesday March 29, 2023 @01:28PM (#35360409)
However, by late 90s you weren't paying for a C compiler, you had Cygwin, MinGW, or DJGPP (OK, probably no sockets in that case).
Re:Beej's Guide to C Programming by mistrial9 on Wednesday March 29, 2023 @04:03PM (#35362627)
Screenshot of GCC 10.2 compiling its own source code Original author(s) Richard Stallman Developer(s) GNU Project Initial release March 22, 1987; 36 years ago
Re:Beej's Guide to C Programming by Gordonjcp on Wednesday March 29, 2023 @12:55PM (#35359958)
Somewhere in the depths of a comms room at a Very Very Big Company, there's a very very old laptop running a very very old install of Slackware, which does one job - run a server that Radio-over-IP boxes connect to, so they can have their G.711 streams picked apart, some DSP applied to add or remove certain high frequency tones and generally clean up the audio, and be fired back out into another interface.

That was all made possible by Beej's Guide to Network Programming and the RBJ Biquad Cookbook, mostly.

Just a temporary bodge until the vendor got their shit together. I doubt it'll ever be replaced.

Re:Beej's Guide to C Programming by wing-_-nuts on Wednesday March 29, 2023 @01:26PM (#35360380)
>Unless you had a shell account or ran Linux or some sort of Unix you had to _pay_ (or... not pay) to get access to a C compiler.

That was actually how I got my introduction to nix. I was taking a c++ class in highschool, and I was mad that I couldn't compile my homework without paying for borland. Someone pointed me to g++, and I actually got a shell account with the university of colorado (it's wild to me they would give those away for free!). I kept pestering the admins about installing this or that, and they told me 'hey kid, why don't you install linux on your own* machine and then you can install whatever you like.

So I went and installed redhat on an old computer. Free compilers for basically every language in existence, and an entire OS worth of source code, heaven!

The rest as they say, is history.

Re:Beej's Guide to C Programming by beej71 on Wednesday March 29, 2023 @09:14PM (#35366402)
It was some random socket program I found on an FTP server that got me going on writing this whole thing. The sockets API was pretty confusing in terms of the sequence of what to call when and how, but this sample program spelled it out pretty simply. (So thank you, anonymous author!)

Then it was just lucky timing with the web picking up around then and the fact that we had just gotten NCSA Mosaic installed on the computers at school. :)

Edit: Pretty sure the first version of the guide was ~1995.

Re:Beej's Guide to C Programming by rhussmann on Thursday March 30, 2023 @12:04AM (#35367799)
Never expected I'd get a reply from Beej themself.

Thank you for your contribution. Your work enabled me to send some bytes from one place on the internet to another, which ignited a passion and a career for me. Thanks again.

Also, thanks for making me wonder where Chico State was and what the pizza was like.

Re:Beej's Guide to C Programming by asicsp on Wednesday March 29, 2023 @11:50AM (#35358986)
Dupe. Discussed last month, though the link was a bit different: https://news.ycombinator.com/item?id=34946811
Re:Beej's Guide to C Programming by qwertyuiop_ on Wednesday March 29, 2023 @11:55AM (#35359053)
Are there any modern c tutorials that teach and guide the learner through practical programs. For instance a real world backend service ?
Re:Beej's Guide to C Programming by saperyton on Wednesday March 29, 2023 @12:04PM (#35359199)
Seconding. This would be great to see.
Re:Beej's Guide to C Programming by lubesGordi on Wednesday March 29, 2023 @12:24PM (#35359491)
Re:Beej's Guide to C Programming by ornornor on Wednesday March 29, 2023 @01:26PM (#35360387)
I’ve been learning with beej’s guide and exercism.il for the last few weeks and it’s very effective paired with the (free!) mentoring there and asking random questions on libera.chat as well.
Re:Beej's Guide to C Programming by Legion on Wednesday March 29, 2023 @12:17PM (#35359379)
My past undergraduate self will always be thankful to Beej for the network socket programming guide.
Re:Beej's Guide to C Programming by hot_gril on Wednesday March 29, 2023 @12:42PM (#35359780)
I think that was the first programming guide I ever read.
Re:Beej's Guide to C Programming by oweiler on Wednesday March 29, 2023 @12:18PM (#35359389)
How often is this going to be reposted?
Re:Beej's Guide to C Programming by John23832 on Wednesday March 29, 2023 @12:31PM (#35359614)
It's one of those eternal reposts. I guess I'm ok with it because it's of quality.
Re:Beej's Guide to C Programming by AnimalMuppet on Wednesday March 29, 2023 @12:40PM (#35359750)
Every day, there's a new "today's 100,000".
Re:Beej's Guide to C Programming by belter on Wednesday March 29, 2023 @01:01PM (#35360028)
Today's 10,000 - https://xkcd.com/1053/

We can be pedantic...this is HN... :-)

Re:Beej's Guide to C Programming by AnimalMuppet on Wednesday March 29, 2023 @01:07PM (#35360113)
Yeah. I was too lazy to look it up...
Re:Beej's Guide to C Programming by augusto-moura on Wednesday March 29, 2023 @12:35PM (#35359672)
Yes
Re:Beej's Guide to C Programming by imwithstoopid on Wednesday March 29, 2023 @12:48PM (#35359846)
heh yeah its probably time for something like the "HN Hall Of Fame" where this stuff gets enshrined, and from that time forward scrubbed from the top page
Re:Beej's Guide to C Programming by ornornor on Wednesday March 29, 2023 @01:27PM (#35360397)
Never heard of it until last month, so I’m glad it keeps getting reposted.
Re:Beej's Guide to C Programming by not_your_vase on Wednesday March 29, 2023 @12:50PM (#35359877)
I wouldn't even mind it, but what's weird is that there are active and interesting threads flagged and penalized with "dupe" flag, because they were posted 49 days ago also... but not Beej's links.
Re:Beej's Guide to C Programming by zmxz on Wednesday March 29, 2023 @01:01PM (#35360038)
Why do you ask? Does it bother you or you want to signal how astute about HN you are?
Re:Beej's Guide to C Programming by Entinel on Wednesday March 29, 2023 @01:04PM (#35360072)
My first time seeing it. Not sure why it bothers you so much.
Re:Beej's Guide to C Programming by sdsd on Wednesday March 29, 2023 @12:29PM (#35359579)
I learned about this when I was a teenager doing the Vortex game from OverTheWire. I ended up learning and falling in love with C and networking in general.
Re:Beej's Guide to C Programming by carapace on Wednesday March 29, 2023 @01:16PM (#35360237)
See also Wikibooks' "C Programming": https://en.wikibooks.org/wiki/C_Programming
Re:Beej's Guide to C Programming by jaxomlotus on Wednesday March 29, 2023 @01:30PM (#35360441)
I worked with Beej and Robot Stampede back when he helped port Aviary's image editor tools from Flash to HTML5. Beej, if you're reading this, I hope you're doing great!
Re:Beej's Guide to C Programming by beej71 on Wednesday March 29, 2023 @08:46PM (#35366170)
Blast from the past! I'm doing A-OK. Hope the same for you!
Re:Beej's Guide to C Programming by ape4 on Wednesday March 29, 2023 @01:33PM (#35360483)
In the time section it has:

    .tm_sec=04,    // seconds after the minute -- [0, 60]
Since a leading zero means octal I wouldn't suggest writing a number this way. Of course, in the case octal 4 == decimal 4.
Re:Beej's Guide to C Programming by beej71 on Wednesday March 29, 2023 @08:45PM (#35366159)
Good catch... I warn people of this very problem elsewhere in the guide. :)

Lucky I didn't go with nine...