Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What's a good book on modern Linux application programming?
18 points by devnonymous on Oct 22, 2015 | hide | past | favorite | 10 comments
Some background: I am a old *nix programmer; grew up on Richard Stevens and The Unix programming environment. For a long time now though, I have not done much of 'systems' programming, the last good linux application programming book I read was 'Advanced Linux Programming' which I enjoyed a whole lot, although it is quite dated today, I presume.

I recently happened to hear about unshare(1) -- which to my surprise has been around in linux for a while now. This call/command seems so cool -- fells like a hammer looking for nails ! :-)

So, my question is, what would you recommend as a book that'll cover all the new and cool stuff (like unshare) that's in modern linux systems ?




The Linux Programming Interface by Michael Kerrisk. It seems to reference unshare on pages 603 and 801 (http://man7.org/tlpi/download/TLPI-Index.pdf ), but I don't own a copy to check what it says (it's on wishlist though).


Thanks, I'm going to check that out!


I'm not sure about books, because the 'Net tracks everything so much more effectively. Treating the internet like a firehose-book, then...

- If you're interested in Linux kernel activity in particular, sign up for LKML updates so you have a constant feed of "ooh, what's that" to keep up with, although following everything in realtime might be a bit of an overload.

- It's good to have a passing idea of how the major distros work - if you have enough familiarity with a system to at least comfortably spin it up in a VM easily and quickly, it makes it that much easier to test how the occasional obscure edge case is handled in a given environment. If you're writing at the systems level (eg, background daemons, systemd vs sysvinit et. al.) this will probably come up reasonably frequently.

- I've learned that some languages can actually be almost as fast as C nowadays - in http://www.gopherjs.org/blog/2015/09/28/surprises-in-gopherj..., a small test algorithm that computes pi using 1 billion iterations runs in 6.434s when compiled with gcc -O3, and the same code written runs inside Node.js in 6.549s - 105ms difference, arguably nil.

- Real-world applications do undeniably introduce latency in the most optimized of environments, but capable, speedy CPUs are approaching such ubiquity that scripting languages are an extremely viable choice for a lot of tasks.

- I understand that IllumOS - the now community-maintained open-source project that used to be Solaris - has awesome kernel-level debugging facilities. This might be interesting.


Echoing another comment: The Linux Programming Interface by Michael Kerrisk. I bought it instead of the UNP update based on its Amazon reviews, and haven't regretted it.


Thanks! Also I noticed that the book website maintains an API changes page:

http://man7.org/tlpi/api_changes/index.html

Awesome!


GNU Autotools documentation, libtool, `man gcc`, You're going to need to know C, this ain't Windows land where we have VB, and other high level beginner lanagues.


Umm, guess you didn't read my request. When I said I grew up on Stevens and The Unix programming environment, I thought it implied that I knew C and as a veteran Linux developer IMHO, suggesting the Gnu autotools doc..man gcc (seriously??) is the worst answer to my question. One can learn application programming on Linux without first having to read through the entire man pages of the tools.


"this ain't Windows land where we have VB, and other high level beginner lanagues."

You say that like it's a good thing. What's wrong with high level languages that are easy to use? Progress is defined by making complicated tasks easier. I'm guessing the ASM guys used to say the same thing about C/C++ users.


Actually you don't really need C. There is plenty of stuff in Python and Perl. Golang also has a ton of wrappers, and I'd consider that a pretty easy language.


Instead you'll have to contend with userland tools written by amateurs that choose to ignore POSIX standards.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: