News for hackers. Stuff that matters.
Re:Bus1: a new Linux interprocess communication proposal by chubot on Thursday August 18, 2016 @02:10AM (#12310686)
I'm very sympathetic to that point of view -- UNIX is a paradox where everybody uses it but most people don't really know how to use it.

But this paper makes a good quantitative case for POSIX not meeting the needs of modern computing: https://news.ycombinator.com/item?id=11652609

A good example is that Linux distros, Android, and OS X all have their own non-POSIX IPC mechanisms. Applications are somehow voting with their feet and not using Unix domain sockets and pipes.

It leaves me scratching my head because I don't think serialization is that hard a problem. But it seems that most people want IPC with structured data. Android is a bit of a special case because it's a single-language OS.

"Traditional POSIX threading models, IPC interfaces, and file system access are being replaced by platform and vendor-specific APIs and frameworks such as Grand Central Dispatch [18], Binder [29], DBus [25], and SQLite [1]."

Re:Bus1: a new Linux interprocess communication proposal by naasking on Thursday August 18, 2016 @08:46AM (#12312047)
> It leaves me scratching my head because I don't think serialization is that hard a problem.

It is a hard problem, at least if you want to achieve concision, make it parseable, and support schema upgrade.

> "Traditional POSIX threading models, IPC interfaces, and file system access are being replaced by platform and vendor-specific APIs and frameworks such as Grand Central Dispatch [18], Binder [29], DBus [25], and SQLite [1]."

And good riddance. File systems are almost universally terrible [1]. Threading with shared state is also a terrible idea because it's too general, not to mention the poor APIs used to manage them.

IPC is something that's still unfortunately undergoing constant revision, and the structured binary vs. text wars unfortunately both have merit. I think structured text output via a domain-specific language (DSL) is really the proper answer, somewhat like how a REPL works. This DSL is ultimately simple to construct within C since it would be lisp-like in its structure so it doesn't need an IDL compiler, although its textual syntaz shouldn't be lisp-like.

stdin can then nicely format DSL output for the user. Best of all worlds between text, binary, and structured formats.

[1] https://danluu.com/file-consistency/

Re:Bus1: a new Linux interprocess communication proposal by goalieca on Thursday August 18, 2016 @10:12AM (#12312581)
Serialisation is its own problem. Should have nothing to do with IPC. Layered architectures out the window in favour of systemd like monoliths.
Re:Bus1: a new Linux interprocess communication proposal by naasking on Thursday August 18, 2016 @10:55AM (#12312929)
> Serialisation is its own problem. Should have nothing to do with IPC.

Yes and no. There's significant utility to standardizing serialization in your IPC layer. IPC consists of exchanging domain-specific messages, so the message types can be specified in a header shared between endpoints, and data gets serialized in a standard format.

The IPC API then simply reduces to sending/receiving data to/from endpoints, like channels in CPS. And ideally it should be higher-order so you can send an endpoint to another endpoint.

So you don't need to standardize the serialization, but then you just get a plethora of incompatible formats.

Re:Bus1: a new Linux interprocess communication proposal by pjmlp on Thursday August 18, 2016 @04:44AM (#12311154)
> UNIX is a paradox where everybody uses it but most people don't really know how to use it.

Specially when the majority nowadays has the idea that GNU/Linux == UNIX and never tried to write an actual portable UNIX application.

Re:Bus1: a new Linux interprocess communication proposal by saynsedit on Thursday August 18, 2016 @08:42AM (#12312012)
Eh? The majority of modern POSIXy software runs on at least Linux, Mac OS X, and FreeBSD.

In fact, Mac OS X is the most widely deployed UNIX-like system ever. What you're a claiming to be true probably more applies to Mac OS X than Linux.

I honestly haven't seen a recent package that was accidentally not portable in the long-term across the various modern UNIX-like systems because of confusion of Linux for POSIX.

Re:Bus1: a new Linux interprocess communication proposal by cgag on Thursday August 18, 2016 @02:29PM (#12315126)
Have you used FreeBSD? Having played with Free/Open/DragonflyBSD, I came away shocked at how non-portable most software is.
Re:Bus1: a new Linux interprocess communication proposal by saynsedit on Thursday August 18, 2016 @03:23PM (#12315606)
Any examples? Even Debian packages include custom patches.
Re:Bus1: a new Linux interprocess communication proposal by pjmlp on Thursday August 18, 2016 @09:30AM (#12312315)
There are more UNIX flavours than those ones.
Re:Bus1: a new Linux interprocess communication proposal by saynsedit on Thursday August 18, 2016 @09:51AM (#12312433)
Irrelevant, if the vast majority of modern packages work with the big three, it's highly likely they work with other conforming POSIX systems.
Re:Bus1: a new Linux interprocess communication proposal by pjmlp on Thursday August 18, 2016 @11:09AM (#12313051)
The keyword being likely.

I don't miss my days of writing portable POSIX code across DG/UX, Solaris, HP-UX, Aix, FreeBSD, Red-Hat, Debian and the respective #ifdefs.

Re:Bus1: a new Linux interprocess communication proposal by saynsedit on Thursday August 18, 2016 @11:21AM (#12313156)
This is still irrelevant.

You were asserting that the majority of programmers think Linux == UNIX and have never tried to write a portable application.

Thst is clearly false as the majority of programmers probably confuse Mac OS X for UNIX and most modern unix-like software is portable to at least Linux, Mac OS X, and FreeBSD. Portable is more general than "portable across every UNIX that has existed."

Increasing the specificity of your argument mid-way to avoid the incorrectness of your initial general argument isn't very genuine.

But yes, your revised second statement is probably correct: most UNIX programmers have never tried writing portable code across "DG/UX, Solaris, HP-UX, Aix, FreeBSD, Red-Hat, Debian" exactly because there is no practical reason for it.

Re:Bus1: a new Linux interprocess communication proposal by pjmlp on Thursday August 18, 2016 @02:13PM (#12314987)
Other than sell software to enterprise customers.
Re:Bus1: a new Linux interprocess communication proposal by saynsedit on Thursday August 18, 2016 @03:22PM (#12315584)
Sure, you're correct on that. Thanks for staying on topic.