News for hackers. Stuff that matters.
Re:Beej's Guide to Unix IPC (2015) by synergy20 on Thursday January 06, 2022 @04:53PM (#29830816)
The IPC is in SystemV flavor but I think these days we normally should adopt Posix IPC instead especially for Linux/BSD, am I missing something?

    "On Linux and FreeBSD there is big advantage of posix queues, as handler given by mq_open are basically file descriptor which can be polled/epolled/selected/kqueued"
    "all POSIX IPC is thread-safe, while most SysV IPC is NOT"
Re:Beej's Guide to Unix IPC (2015) by beej71 on Thursday January 06, 2022 @05:17PM (#29831174)
It hasn't been appreciably touched in decades. It could definitely use an update. And I need to port it to the new pandoc toolchain.
Re:Beej's Guide to Unix IPC (2015) by maxwell_xander on Friday January 07, 2022 @12:34AM (#29835373)
Thanks for teaching me C and networking. You have a talent for teaching and I hope you're doing incredible things
Re:Beej's Guide to Unix IPC (2015) by pure_simplicity on Thursday January 06, 2022 @05:59PM (#29831786)
If you use pandoc, have you considered epub as a target format? I am getting good results going from latex to epub using pandoc. Not sure what your sources and toolchain are like, though.

Thanks for the great guides. :)

Re:Beej's Guide to Unix IPC (2015) by systemvoltage on Thursday January 06, 2022 @06:51PM (#29832457)
Disagree. ePub (or any flowable medium) sucks when code blocks are involved. eBooks are great for novels and long form prose. Not so much for technical books.

Why? Because inevitably the code is going to be either wrapped, too tiny or overflowing. Furthermore, syntax highlighting is a complete utter mess in ebooks.

Reviews don’t lie. People don’t like it. And it’s obvious where ebooks shine and where they don’t.

Personally: I want proper typesetting and constancy in the layout. But with eReaders, ebooks work pretty well and PDFs don’t. With iPads, PDFs are better IMO. But for technical books PDFs set by a professional typesetter like Springer is fantastic. Great typography and layout.

Re:Beej's Guide to Unix IPC (2015) by kragen on Thursday January 06, 2022 @09:55PM (#29834227)
I think the problem with PDFs on ereaders is that the PDF layout is typically designed for a much larger physical page. I designed the PDF version of Dernocua (http://canonical.org/~kragen/dernocua) for comfortable reading on small screens, even including cellphones; if you're willing to try it, I'm curious to hear what your experience is with perusing it on your ereader.
Re:Beej's Guide to Unix IPC (2015) by systemvoltage on Thursday January 06, 2022 @10:13PM (#29834369)
This is simply brilliant. I've never seen anyone produce PDFs for small size (or large fonts). I just tried it on iPad mini and it is fantastic. I don't have my eReader handy but I can only imagine it would work well. I think you nailed the problem with PDFs and eReaders - its the choppy panning/zooming that's fatiguing to be able to read fonts at a legible size. This solves it.

I hope this idea catches on. ePub/Mobi files are no good IMO.

Re:Beej's Guide to Unix IPC (2015) by kragen on Thursday January 06, 2022 @10:33PM (#29834504)
Oh, thanks! I'm glad you liked it. I'm interested to hear how it works on the eReader too, since the iPad is a lot more capable of rapid scrolling, which makes it a significantly more forgiving environment for this kind of thing.
Re:Beej's Guide to Unix IPC (2015) by systemvoltage on Friday January 07, 2022 @12:22AM (#29835305)
It didn't work as well on Kindle, see [1]. The version of Kindle I have is from 2012 and it doesn't have a 'fit-to-width' feature. So, the PDF would need to be of correct aspect ratio.

[1] https://i.imgur.com/GbOASey.jpg

Re:Beej's Guide to Unix IPC (2015) by kragen on Friday January 07, 2022 @01:33AM (#29835758)
Thanks! Yeah, that looks pretty hard to read. I see it has 150%, 200%, 300%, and "actual size" options; do any of those make it usable? How about landscape mode?
Re:Beej's Guide to Unix IPC (2015) by systemvoltage on Friday January 07, 2022 @01:42AM (#29835812)
No, those options are worse. Tiny boxes that require panning in x and y direction. 100% is about half the width of the PDF.
Re:Beej's Guide to Unix IPC (2015) by kragen on Friday January 07, 2022 @01:44AM (#29835826)
Thank you very much!
Re:Beej's Guide to Unix IPC (2015) by Shared404 on Friday January 07, 2022 @01:35AM (#29835775)
I'm using a laptop mostly, but will be adding this to my reading list, thank you!
Re:Beej's Guide to Unix IPC (2015) by kragen on Friday January 07, 2022 @01:43AM (#29835821)
On a laptop you should probably use the HTML tarball; less of the formatting is broken that way. Unlike Dercuano there isn't SVG or anything in this version that gets lost in the PDF, but there are tables and "ASCII" Unicode art.
Re:Beej's Guide to Unix IPC (2015) by bee_rider on Thursday January 06, 2022 @11:50PM (#29835046)
Huh. I'm surprised there isn't a way to say "really don't split up this bit," like you would in LaTeX with a minipage (for example).
Re:Beej's Guide to Unix IPC (2015) by nemetroid on Friday January 07, 2022 @06:10AM (#29837740)
I'm pretty sure you can. But most e-readers have screens in the 6-7 inch range. You can't fit very wide lines in a readable font size, so the only way code samples work out in that format is if they are written to be narrow - say, no more than 40-50 characters wide.

So if the code you're writing is amenable to those constraints, it would probably work quite well, but AbstractWidgetLocalizerManagerFactoryBeans are right out.

Re:Beej's Guide to Unix IPC (2015) by beej71 on Thursday January 06, 2022 @07:18PM (#29832759)
I've considered it, but like systemvoltage said, it's tough to get code to look good on ereaders.

It's on my list of things to mess with after I get to version 1 of the C guide. :)

Re:Beej's Guide to Unix IPC (2015) by glitchc on Thursday January 06, 2022 @07:27PM (#29832854)
Unrelated:

Beej, so nice to see you on this site, such a fan of your work. Used your guide a decade ago to implement socket select() on a system-critical app. Mad props for doing some awesome work!

Re:Beej's Guide to Unix IPC (2015) by beej71 on Thursday January 06, 2022 @08:16PM (#29833345)
Thanks! :)
Re:Beej's Guide to Unix IPC (2015) by Icathian on Thursday January 06, 2022 @08:36PM (#29833546)
I just got through my Graduate Intro to OS course at Georgia Tech last year, and your networking guide is still handed from student to student every single semester to survive the first project. I didn't think I'd get the chance, but since you're hanging out here, thank you very much for making it!
Re:Beej's Guide to Unix IPC (2015) by kragen on Thursday January 06, 2022 @09:52PM (#29834191)
In Dercuano, Derctuo, and Dernocua, I was able to get what I thought was pretty reasonable formatting for 80-column code even on a cellphone screen in a PDF with the lmtlc font, which, despite the abbreviation, is called Latin Modern Mono Condensed Light; it's an extended version of Computer Modern Mono Condensed Light with some Unicode coverage. I wrote a little about this at https://news.ycombinator.com/item?id=21946327, and Dernocua is at http://canonical.org/~kragen/dernocua among other places if you want to see how it worked out.

I'm reasonably pleased with the Dercuano formatting, though some people hate it; it doesn't work very well on a laptop screen, but on a cellphone screen I think it's close to optimal, except where it's just broken. It's probably passable on a small ereader but would be painful on a large one, except maybe in landscape facing-pages mode. (I hacked together the HTML renderer to generate the PDF in a few days, and I didn't implement, for example, table layout; and when it has to fall back to a glyph that isn't in lmtlc, it screws up the column widths.)

I think I've said this before, but I really appreciate Beej's Socket Guide! Thank you for writing it!

Re:Beej's Guide to Unix IPC (2015) by kragen on Friday January 07, 2022 @02:19PM (#29843487)
*an extended version of Computer Modern Teletype Condensed Light
Re:Beej's Guide to Unix IPC (2015) by synergy20 on Thursday January 06, 2022 @05:39PM (#29831502)
Sounds great. It's hard to find nice tutorials for posix-ipc on the internet.
Re:Beej's Guide to Unix IPC (2015) by chasil on Thursday January 06, 2022 @06:58PM (#29832545)
Fun fact:

The more elaborate portions of System V IPC trace their origins to "Columbus UNIX" that was developed so a database could run on the platform.

https://en.wikipedia.org/wiki/CB_UNIX