[HN Gopher] Linux Applications Programming by Example: The Funda...
___________________________________________________________________
Linux Applications Programming by Example: The Fundamental APIs
(2nd Edition)
Author : teleforce
Score : 152 points
Date : 2026-03-20 23:57 UTC (23 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| NewsaHackO wrote:
| Is there an actual book available?
| fuzzybear3965 wrote:
| Yes. Look at the README.
|
| https://www.informit.com/store/linux-application-development...
| NewsaHackO wrote:
| Of course, I saw that, but if the text of the book is not
| freely available, then the examples wouldn't really be
| helpful, no?
| chii wrote:
| So buy the book? The expectation of free stuff is all too
| common.
| NewsaHackO wrote:
| Regardless, a link to a repo of disjointed examples is
| not very interesting or helpful.
| tad_tough_anne wrote:
| If you don't wanna pay, Library Genesis has the first
| edition (2004), but, if you didn't find the examples to
| be at least modestly interesting in themselves, is this
| even your bag? As a Linux sysadmin and occasional writer
| of lousy C programs, I often consult NetBSD's source tree
| for when I want good examples that aren't as _complex_ as
| GNU 's, so I expect to come back to these.
|
| Judging by the publisher's sample,[1] the second edition
| (2025) looked like a worthwhile upgrade, so I ordered it.
| Much of the material is in the manpages, but this
| presents it with better explanations.
|
| ___
|
| 1. <https://ptgmedia.pearsoncmg.com/images/9780135325520/
| samplep...>
| remix2000 wrote:
| Or perhaps maybe rather free stuff is all too uncommon...
| andreygrehov wrote:
| https://www.manualslib.com/products/Lamborghini-
| Urus-1030536...
|
| This one is good as well.
| Joel_Mckay wrote:
| Linux is rarely a porting issue for C++ or python:
| https://wxwidgets.org/
|
| Static linking libraries for MacOS or Windows is contaminated
| by GPL/LGPL code, and this is why wxwidgets excludes the
| disclosure requirement.
|
| Also, if you are looking for a VueJS cross-platform GUI
| framework for most Desktop and Mobile platforms (modern MacOS
| hardware and developer account is a requirement):
|
| https://github.com/quasarframework/quasar
|
| Qt5/Qt6 frameworks sooner or later cause more problems than
| they solve, and require a lot more maintenance/support.
|
| Best of luck =3
| wolfi1 wrote:
| "contaminated by GPL/LGPL code"? really? if you want to make
| profit off of your code buy for several thousands of dollars
| commercial libraries and you are in the clear. if you don't
| want to pay for libraries you have to accept their conditions
| Joel_Mckay wrote:
| I usually prefer releasing under Apache 2.0 license, as I
| can't predict what people will need 10 years from now.
|
| People use LGPL libraries in commercial software all the
| time, as the shared objects (.so) do not contaminate the
| source application license. The instant someone static
| links LGPL/GPL lib into an application binary its source
| also must carry a compatible open license. Note this
| obligation differs from publishing patches back to the main
| lib branch.
|
| It gets messy when people release libraries under multiple
| licenses. Porting games and applications from *nix systems
| can be non-trivial. Best regards =3
| discarded1023 wrote:
| For those looking for a broader/more portable introduction,
| Xavier Leroy and Didier Remy wrote a great high-level text on
| UNIX system programming a long time ago [1]. Of course it uses
| ocaml (perhaps motivating some to learn that language) but the
| style is low-level and straightforwardly imperative. The
| advantage is that it sweeps up a lot of the messy and boring
| error handling into the ocaml runtime and/or exceptions. This
| makes the code a lot easier to follow, but of course makes it
| look misleadingly simpler than it would be in C (etc).
|
| [1] https://ocaml.github.io/ocamlunix/
| jacobgeorge08 wrote:
| Thanks! I just started the OCaml Programming Book this week to
| learn and language and get better at functional programming.
| Cant wait to jump into this after
| up2isomorphism wrote:
| Why would someone want to learn Unix Programming using OCAML?
| Not a smart choice. Also this does not look easier to read than
| a shell script either.
|
| let rec copy_rec source dest = let infos = lstat source in
| match infos.st_kind with | S_REG -> file_copy source dest;
| set_infos dest infos | S_LNK -> let link = readlink source in
| symlink link dest | S_DIR -> mkdir dest 0o200; Misc.iter_dir
| (fun file -> if file <> Filename.current_dir_name && file <>
| Filename.parent_dir_name then copy_rec (Filename.concat source
| file) (Filename.concat dest file)) source; set_infos dest infos
| | _ -> prerr_endline ("Can't cope with special file " ^ source)
| hrmtst93837 wrote:
| OCaml is a weird teaching choice for broad Unix programming,
| but it makes more sense than bash once the code stops being
| toy-sized and starts touching files, processes, and error
| paths in more than one place. Shell scripts let typos turn
| into state changes, and C gives you the usual memory
| footguns.
|
| That snippet is ugly. Cleaner OCaml is easier to maintain
| than the average bash blob if you care more about finding
| mistakes before prod than saving ten minutes on ML syntax.
| uecker wrote:
| IMHO modern C (with modern tooling) is very reasonable.
| andreygrehov wrote:
| What's the purpose of this submission?
| lordmoma wrote:
| what is so fun about this?
| drnick1 wrote:
| Why post this without making the text available?
___________________________________________________________________
(page generated 2026-03-21 23:01 UTC)