7 ms·
Portable OpenBSD vi for Unix systems
- ainar-g 3y agoI'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, […]
- cpach 3y ago“Multibyte characters are shown as individual bytes, rather than glyphs”
- anthk 3y agoNvi2 from packages/ports it's almost the same as core vi but with Unicode support.
- rahen 3y agoIf you want a small, portable vi with Unicode, you can static build the version from Busybox. That's what I do.
- networked 3y agoThere 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 https://github.com/dimkr/loksh (Linux) and https://github.com/ibara/oksh https://github.com/ibara/oksh (cross-platform). There are also at least two of doas, https://github.com/slicer69/doas https://github.com/slicer69/doas and https://github.com/nholstein/OpenDoas 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 https://undeadly.org/cgi?action=article;sid=20230507122935) and `-s` (https://man.openbsd.org/OpenBSD-7.2/crontab.5#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.
- hulitu 3y agoWhat is so difficult in porting ? OpenBSD is a (duck) UNIX so it shouldn't be any issue.
- pravus 3y agoIt'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.
- SoftTalker 3y ago> It's a fairly niche project and the people that work on it really don't care about Linux at all. Maybe true for the core OS, but they provide portable OpenSSH, OpenSMTPD, OpenNTPD, LibreSSL and a few others.
- DougMerritt 3y agoI started with Bell Labs Unix, transitioned through many variations, and then when I came to OpenBSD and Linux, they were both pretty straightforward compared with, say, porting to or from System V Unix. I don't think you're wrong about anything. It's true that one may need to pore over kernel code, and yes, often you have the "duty of knowing how the specific Unix was implemented". I just that that you're over-emphasizing the difficulty. Life is hard (including programming), but that's where we calibrate our zero setting.
- anthk 3y agoMost OpenBSD users with Unicode needs will use nvi2 from ports.
- ninjin 3y agoIndeed, but it would be nice to have that support in the base install. Sadly I do not have the skill set to work towards it.
- suprjami 3y agoYou mean to tell me vi from the 1970s doesn't support LSP? This is an outrage!
- DougMerritt 3y agoOk, you're joking, but still, are you referring to the 1987 Liskov Substitution Principle? https://en.wikipedia.org/wiki/Liskov_substitution_principle https://en.wikipedia.org/wiki/Liskov_substitution_principle
- andrewjf 3y agoLanguage Server Protocol - https://langserver.org https://langserver.org
- DougMerritt 3y agoThank you; that does make more sense.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]