6 ms·
CS631: Advanced Programming in the Unix Environment
- dijit 6y agoI have a book of the same name. I, reluctantly, recommend it. Why recommend?: lots of great content surrounding networking and file access, most of which will improve your programs a lot, if you code the things I do. Why reluctantly?: it is heavily dependent on libc. It may ruin you for other languages than C. Most of the libc shims suck.
- eatonphil 6y agoSo who's the author of your book of the same name?
- mucholove 6y agoI love Objective-C. Because that of that, I find myself using some C once in a while and I like it. What should I be using instead of libc? Musl? PS — I also use it on Linux via GNUstep. I like it that much. :)
- cheph 6y ago> What should I be using instead of libc? Musl? musl is an implementation of libc. So if you are using libc, then yeah sure why not.
- mucholove 6y agoOoh. I’m so out of touch I didn’t even know what MUSL really is. I was wondering whether there was something different than the standard library which made C a joy. Things that people mention as being faster are non-null terminated string libraries. Not sure if such would also make a more expressive API
- deleted 6y ago[deleted]
- froh 6y agoThe posix programming interface happens to be the C library, so I'd be curious how a book on advanced unix system programming could not heavily depend on libc?
- cheph 6y ago> The posix programming interface happens to be the C library Not exactly, the POSIX API is a superset of the C standard library. https://man7.org/linux/man-pages/man7/libc.7.html https://man7.org/linux/man-pages/man7/libc.7.html > The term "libc" is commonly used as a shorthand for the "standard C library", a library of standard functions that can be used by all C programs (and sometimes by programs in other languages). https://en.wikipedia.org/wiki/C_standard_library https://en.wikipedia.org/wiki/C_standard_library > Starting from the original ANSI C standard, it was developed at the same time as the C library POSIX specification, which is a superset of it.
- froh 6y agoI'd appreciate "even more so" over of "not exactly", as this confirms the point: Unix programming means to use the C library, even plus a bit (superset). Thanks for adding nuance and dental.
- cheph 6y ago> I'd appreciate "even more so" over of "not exactly", as this confirms the point: Unix programming means to use the C library, even plus a bit (superset). Your claim is wrong, on a factual level. "The posix programming interface" is not "the C library". So no, not "even more so". > Unix programming means to use the C library, even plus a bit This was not what you claimed, and it is entirely possible to write a C program that only uses the POSIX specific functions and avoids any of the functions in the C standard library. It won't do much, but it will run to completion.
- Gibbon1 6y agoIt's possible to write a C program that doesn't use either the standard library or POSIX functions.
- dboreham 6y agoI've used this book to prove to my kids that, at one time, I may have done something useful because: it has my name in it (by sheer dumb luck I might add).
- dijit 6y agoWell, damn. https://imgur.com/a/m5wywbj https://imgur.com/a/m5wywbj What did you do, if I may ask?
- dboreham 6y agoI was going to say I don't remember, but thanks to the longevity of RFC822 email, the thread to do with this is still in my mailbox. It looks like I reviewed the chapter on dbm. I also found, in searching for these emails, that an editor at PH reached out to me in 2008 asking for review help with the 3rd edition. As far as I can tell I never saw that email and didn't reply <doh!>.
- angry_octet 6y agoIt's down right now, but I guess it is related to Stevens's APUE? A masterful book. I'd love to see it updated for newer kernel interfaces, seccomp etc.
- datalus 6y agoThere's a cached version: https://webcache.googleusercontent.com/search?q=cache:Y56fxQ2iJikJ:https://stevens.netmeister.org/631/+&cd=1&hl=en&ct=clnk&gl=us https://webcache.googleusercontent.com/search?q=cache:Y56fxQ...
- tannhaeuser 6y agoGNU/Linux is not Unix ;)
- angry_octet 6y agoDon't trigger me man :-| I wasn't excluding the BSDs there, Stevens would definitely have covered dtrace, ZFS, Capsicum etc. But I hope that the Solaris/SysV specific stuff could be put in a forbidden appendix. No more ipcs please!
- tannhaeuser 6y agoCare to give a link or context for "no more ipcs"? SysV shared mem is IMO a straightforward, robust low-level (MMU-level) IPC mechanism for CPU-bound tasks compared to memory-mapped I/O and the PITA that are threads, but admittedly I'm not up to date on this topic.
- angry_octet 6y agoMainly the cleanup problem. Determining if something is a live resource is tedious. Numeric IDs are inferior to paths IME, especially from a kernel ABI filtering perspective.
- bogomipz 6y ago>"robust low-level (MMU-level) IPC mechanism for CPU-bound tasks compared to memory-mapped I/O ..." Could you elaborate on what makes IPCS more suited to CPU-bound tasks vs mmap? Sys V ipcs has always kind of eluded me. I think my exposure to it was mostly via Oracle Databases way back when. Cheers.
- qntty 6y agoThis is based on the book by the same name, but has lectures to go along with it. Looks nice. I wish there were lectures to go along with Michael Kerrisk's book The Linux Programming Interface. I subscribe to O'Reilly's video course program, and I've recently been watching Kirk McKusick's course on the design of FreeBSD which is one of the best OS courses I've ever come across.
- Lopiolis 6y ago> I've recently been watching Kirk McKusick's course on the design of FreeBSD Wow, that is one pricey course. Are you watching it out of personal interest or because you need it for something in particular?
- qntty 6y agoHe has one on his website that costs a lot, but the one on O'Reilly only costs as much as a subscription to their service. It's a less in-depth version of the one on his site. https://learning.oreilly.com/videos/introduction-to-the/9780134306049/ https://learning.oreilly.com/videos/introduction-to-the/9780...
- guiambros 6y agoAn ACM subscription costs $99/year, and gives you access to O'Reilly's Safari book and video library [1]. [1] https://news.ycombinator.com/item?id=22799753 https://news.ycombinator.com/item?id=22799753
- marviio 6y agoIs that the complete O'Reilly learning site (videos, instructor led courses, interactive sandboxes) or just the books?
- deleted 6y ago[deleted]
- 6y ago
- llarsson 6y agoDid not take that particular class, but loved taking the equivalent at my university when I was a student. I highly recommend taking this type of class to anyone who wants to understand what happens on a low level, but not down to the OS internals level. Systems programming. Threads, processes, shared memory, synchronized access, pipes, file descriptors, ... The list goes on, but at the end of the day, basically all higher level constructs boil down to these system primitives. Understand these, and you have a much better foundation to understand high level concepts built on top of them.
- arnold_palmur 6y agoDid not expect to see this on the front page of HN - I'm nearly finished my MS at Stevens and have this class planned for next fall - really looking forward to it.
- prezjordan 6y agoI took this class! It was very fun and Jan's a great instructor. Writing an HTTP server in C was probably the most illuminating project I did during my undergrad.
- MrXOR 6y agoThanks for sharing this class. The best references to learn Unix (and TCP/IP and networking) are still William Rich Stevens books. Other courses/sources that I found very useful: http://www.cs.cornell.edu/courses/cs114/2003fa/ http://www.cs.cornell.edu/courses/cs114/2003fa/ http://www.cs.cornell.edu/courses/cs214/2004sp/ http://www.cs.cornell.edu/courses/cs214/2004sp/ http://boris.lk.net/unix/ http://boris.lk.net/unix/ https://www.cl.cam.ac.uk/teaching/1011/UnixTools/notes.pdf https://www.cl.cam.ac.uk/teaching/1011/UnixTools/notes.pdf https://dasher.wustl.edu/chem430/readings/unix-tutorial.pdf https://dasher.wustl.edu/chem430/readings/unix-tutorial.pdf
- deleted 6y ago[deleted]
- 0xFFC 6y agoI truly appreciate sharing this. Thank you so much for this.
- olix0r 6y agojschauma's been doing this for a while: I took this course about 15 years ago! It was one of the two most challenging, rewarding courses in my undergrad degree. I still apply things I learned from it daily. Highly, highly recommended if you want to work in SRE or system-focused programming.
- plinkplonk 6y ago> It was one of the two most challenging, rewarding courses in my undergrad degree. which was the other?
- olix0r 6y agoDan Duchamp's CS 521 TCP/IP Networking -- he had us implement low-level protocols like DNS and TCP/IP from scratch, in C. Brutal, but exceptionally rewarding.
- herodoturtle 6y agoThe first 37 seconds of lecture video #2 are gold: https://www.youtube.com/watch?v=3H7SQWTR6Dw https://www.youtube.com/watch?v=3H7SQWTR6Dw cough cough
- bitwize 6y agoI saw "stevens" in the URL, and I was like "Stevens as in Stevens Institute of Technology or as in the guy who wrote the Unix programming book?" And the answer is... both!