Live data from Hacker News

Portable OpenBSD vi for Unix systems

github.com

1–10 of 29 posts

Re: Portable OpenBSD vi for Unix systems

#2
I'll be able to try a bit later, but does it handle UTF-8 correctly? I remember having some versions of nvi split characters through the middle when doing e.g. folding back in the day.

EDIT: Sorry, I'm a dum-dum, it's written in the README:

> No support for Unicode / UTF-8 / wide character display

> Multibyte support is planned, but is unfortunately non-trivial, […]

Re: Portable OpenBSD vi for Unix systems

#3
post #2

I'll be able to try a bit later, but does it handle UTF-8 correctly? I remember having some versions of nvi split characters through the middle when doing e.g. folding back in the day. EDIT: Sorry, I'm a dum-dum, it's written in the README: > No support for Unicode / UTF-8 / wide character display > Multibyte support is planned, but is unfortunately non-trivial, […]

“Multibyte characters are shown as individual bytes, rather than glyphs”

Re: Portable OpenBSD vi for Unix systems

#4
There are many unofficial efforts to bring OpenBSD software to other systems. For example, there are at least two maintained ports of OpenBSD ksh, https://github.com/dimkr/loksh (Linux) and https://github.com/ibara/oksh (cross-platform). There are also at least two of doas, https://github.com/slicer69/doas and https://github.com/nholstein/OpenDoas. I wish they were catalogued somewhere, like an "awesome list".

I would love to see portable OpenBSD cron. Features like random ranges with steps (https://undeadly.org/cgi?action=article;sid=20230507122935) and `-s` (https://man.openbsd.org/OpenBSD-7.2/crontab.5#s) put it ahead of almost every other. It could replace many uses of systemd timers on Linux.

Edit: Added doas ports.

Re: Portable OpenBSD vi for Unix systems

#5

There are many unofficial efforts to bring OpenBSD software to other systems. For example, there are at least two maintained ports of OpenBSD ksh, https://github.com/dimkr/loksh (Linux) and https://github.com/ibara/oksh (cross-platform). There are also at least two of doas, https://github.com/slicer69/doas and https://github.com/nholstein/OpenDoas . I wish they were catalogued somewhere, like an "awesome list". I wou…

What is so difficult in porting ? OpenBSD is a (duck) UNIX so it shouldn't be any issue.

Re: Portable OpenBSD vi for Unix systems

#7
post #2

I'll be able to try a bit later, but does it handle UTF-8 correctly? I remember having some versions of nvi split characters through the middle when doing e.g. folding back in the day. EDIT: Sorry, I'm a dum-dum, it's written in the README: > No support for Unicode / UTF-8 / wide character display > Multibyte support is planned, but is unfortunately non-trivial, […]

Nvi2 from packages/ports it's almost the same as core vi but with Unicode support.

Re: Portable OpenBSD vi for Unix systems

#9
post #5

There are many unofficial efforts to bring OpenBSD software to other systems. For example, there are at least two maintained ports of OpenBSD ksh, https://github.com/dimkr/loksh (Linux) and https://github.com/ibara/oksh (cross-platform). There are also at least two of doas, https://github.com/slicer69/doas and https://github.com/nholstein/OpenDoas . I wish they were catalogued somewhere, like an "awesome list". I wou…

What is so difficult in porting ? OpenBSD is a (duck) UNIX so it shouldn't be any issue.

It's really just the effort and time to understand the data structures and API considerations between the two systems. Saying something is a UNIX doesn't absolve you of the duty of knowing how the specific UNIX was implemented. Also, Linux has no UNIX heritage so relying on UNIX knowledge isn't as helpful as you might think and most of the commonalities are through things like POSIX standards which don't necessarily drive kernel internals directly. If the application relies on a specific kernel features, you might have a very complicated or impossible task ahead.

Also, OpenBSD really doesn't have a huge install base. It's a fairly niche project and the people that work on it really don't care about Linux at all. You'd have to find someone with the skills to be able to translate between the two, the time to do it, and the desire to do it. I have the skills and most of the desire but not the time otherwise I'd be working on projects like this. I've been getting pretty sick of the Linux eco-sphere for a while now so it'd be nice to have some saner production tools. Unfortunately I have to have a day job and no one at work even knows about OpenBSD.

Re: Portable OpenBSD vi for Unix systems

#10
post #5

There are many unofficial efforts to bring OpenBSD software to other systems. For example, there are at least two maintained ports of OpenBSD ksh, https://github.com/dimkr/loksh (Linux) and https://github.com/ibara/oksh (cross-platform). There are also at least two of doas, https://github.com/slicer69/doas and https://github.com/nholstein/OpenDoas . I wish they were catalogued somewhere, like an "awesome list". I wou…

What is so difficult in porting ? OpenBSD is a (duck) UNIX so it shouldn't be any issue.

Openbsd has some security related syscalls not present in say Linux and FreeBSD.
Post reply on HN