zlacker

[parent] [thread] 2 comments
1. mustac+(OP)[view] [source] 2022-09-10 19:19:16
> Now the posix APIs feels like the worst of both worlds.

I think, like anything, it depends on what you're doing, and how you're doing it.

> The "everything is a text file" interface is not great anymore, either.

Text doesn't seem markedly different from a JSON API? Perhaps "worse is better" more often when you are composing several programs/apps to make one system? Even complex distributed systems.

> But it feels like some of the core posix APIs and interfaces just aren't a great fit

And I think these APIs can thrive on top of (the good parts of) POSIX. I'm not so certain we need to fundamentally rethink this layer, because this layer seems to work pretty well at what it does well. It should be pruned occasionally, but I'm not sure we need a whole new abstraction.

FWIW, I think this what the article is saying. Let's create some new interfaces where the old interfaces don't model the hardware well[0].

[0]: https://queue.acm.org/detail.cfm?id=3212479

replies(2): >>dc-pro+cm >>jeff-d+BC
2. dc-pro+cm[view] [source] 2022-09-10 22:40:15
>>mustac+(OP)
There is the alternative of an object based interface like Windows offers.

I thought it was an interesting idea until I actually got around to experimenting with Powershell recently. The ergonomics are more akin to Python than any of the GNU tools. I can’t help but wonder why not just use a language like Python rather than a heavyweight scripting language if it’s a similar LOE (speaking in general, I’m aware of CLR)? The benefit of the text based interface to me is the expediency of performing one-off CLI actions. I inclined think an object interface actually impedes this goal.

3. jeff-d+BC[view] [source] 2022-09-11 01:51:40
>>mustac+(OP)
"Text doesn't seem markedly different from a JSON API?"

Json would be terrible as a primitive.

I was imagining something more like erlang, which is very OS-like. The types are very permissive/fleixble, and there's lots of ways to transform and manipulate results or feed it into something else without feeling code-heavy. It still feels comfortable to do ad-hoc stuff. The advantage is that in erlang you usually don't worry about basic stuff like record and field separators.

"Perhaps "worse is better" more often when you are composing several programs/apps to make one system?"

That's probably true as you zoom out. But even basic utilities in posix within the same system require a bunch of parsing. Imagine if a function call in a programming language required an intermediate text format. That's how unix feels sometimes.

[go to top]