Live data from Hacker News

Portable software is more complex than you think

sporks.space

1–10 of 25 posts

Re: Portable software is more complex than you think

#2
It took a while for me to fully appreciate the OpenSSH approach to portability:

They primarily develop OpenSSH purely for OpenBSD, using all (including non-portable) facilities of OpenBSD, including crypto and whatnot.

Then, a separate team manages the "portable" version of OpenSSH, which add stubs and does everything else needed to make OpenSSH compile on as many operating systems as possible.

I'm aware that OpenSSH is not the only project using that approach to portability. Nevertheless, I think it is fair to say this is an unusual approach used only on a minority of projects.

I was always puzzled on why they are doing this. This always struck me to be "just" a side effect of project politics and historically grown project structures.

But over the years I started to see some interesting benefits of that approach as well. I'm still not convinced by this model, but I have to admit that, more generally speaking, the OpenBSD project does many things against the mainstream, but quite often they turn to be right.

Re: Portable software is more complex than you think

#4
This article describes why portability is hard even across Unix-like operating systems, which are for the most part actually trying to implement standards in good faith.

But for my money, where portability really gets hard is when you try to make something work across platforms where the platform vendors are actively, strategically dedicated to sabotaging portability.

Software engineers who want their skills to be as valuable as possible will forever be at odds with platform vendors who do everything to lock them in.

Re: Portable software is more complex than you think

#7
post #2

It took a while for me to fully appreciate the OpenSSH approach to portability: They primarily develop OpenSSH purely for OpenBSD, using all (including non-portable) facilities of OpenBSD, including crypto and whatnot. Then, a separate team manages the "portable" version of OpenSSH, which add stubs and does everything else needed to make OpenSSH compile on as many operating systems as possible. I'm aware that OpenSSH…

You mention being puzzled. Could you elaborate on why? What do you see as the natural way of doing it instead?

Re: Portable software is more complex than you think

#8
post #2

It took a while for me to fully appreciate the OpenSSH approach to portability: They primarily develop OpenSSH purely for OpenBSD, using all (including non-portable) facilities of OpenBSD, including crypto and whatnot. Then, a separate team manages the "portable" version of OpenSSH, which add stubs and does everything else needed to make OpenSSH compile on as many operating systems as possible. I'm aware that OpenSSH…

This is how many large OSS libraries that aim for portability operate. I don't see how this is novel.

Re: Portable software is more complex than you think

#9
post #5

Portability of software is a language problem. Some languages make it extremely easy. Others, like C and Go, make it difficult to be correct across all platforms.

> Portability of software is a language problem

I think this is one of those statements that sounds good at face value but doesn't stand up to scrutiny.

Re: Portable software is more complex than you think

#10
post #5

Portability of software is a language problem. Some languages make it extremely easy. Others, like C and Go, make it difficult to be correct across all platforms.

Hard disagree there. Trying to write cross distro cli tools can get really hairy really fast when you need to deal with distro inconsistencies in file locations, default configs/permissions, systemd vs not (maybe that one is past now), etc...
Post reply on HN