Conversation
Notices
-
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Tuesday, 31-Dec-2024 14:42:10 JST pistolero @kirby @lanodan Mandatory? Like, are you joking or is this a POSIX thing now? -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 31-Dec-2024 14:42:07 JST Haelwenn /элвэн/ :triskell: @p @kirby Nah, ed is still in POSIX, after all you need ed for some scripts (like the kind that I write sometimes lol). feld likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 31-Dec-2024 14:47:41 JST Haelwenn /элвэн/ :triskell: @sj_zero @kirby @p 300 loc won't even give you ed. -
Embed this notice
sj_zero (sj_zero@social.fbxl.net)'s status on Tuesday, 31-Dec-2024 14:47:44 JST sj_zero Maybe I'm just ignorant, but I feel like vi should be like 300 loc max -
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Tuesday, 31-Dec-2024 14:47:45 JST pistolero @lanodan @kirby patch(1) still emits ed scripts.
I don't mind busybox's vi, it's fine. (It's the default vi on half these machines because vim is impossible to use nowadays and litters the filesystem with "I wish this was TOPS-20 on a VAX" bullshit metadata files with undo history, and nvi doesn't always build. You can get 1980s vi to build on $current_year Linux, all I had to tweak was the makefile, so I don't know what nvi's excuse is.) -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 31-Dec-2024 14:50:26 JST Haelwenn /элвэн/ :triskell: @p @kirby Yeah vim isn't my favorite, I tend to use vis which sometimes litters files a bit but it's very rare.
I should try to diagnose why at some point, I think it's because it uses small mmap chunks and avoids allocating a gigantic buffer, which allows to use it to edit bigger-than-ram files. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 31-Dec-2024 15:03:52 JST Haelwenn /элвэн/ :triskell: @p @kirby At least to me it's comparable to like how rsync will have temporary files starting with a dot while it's copying files, which can sometimes means a bit of old cruft laying around.
Meanwhile vim actively litters. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 31-Dec-2024 15:10:46 JST Haelwenn /элвэн/ :triskell: @RedTechEngineer @kirby @p Nah, not at all POSIX is a userspace standard. -
Embed this notice
RedTechEngineer (redtechengineer@fedi.lowpassfilter.link)'s status on Tuesday, 31-Dec-2024 15:10:47 JST RedTechEngineer @p @kirby @lanodan wait, ed is in the kernel? -
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Wednesday, 01-Jan-2025 03:44:12 JST pistolero @sj_zero @lanodan @kirby Well, an entire ed plus the vi commands, plus screen-handling routines. I think a few thousand is reasonable. nvi is 77k but they have, apparently, a Perl interface, Tcl/Tk bindings. Just the regex code is 3,778 lines.
sam is 7,294 lines, but it's cheating, kind of: Plan 9 has a regex library, standard UI library, etc., things like that. It's hard to get more compact than ken's code, so I'm pretty comfortable treating that figure as being near the lower limit for a full-featured editor. So, several thousand lines. Linus maintains a personal fork of uemacs, a small emacs (haven't used it but it's 19,538 lines.
If we include just the C code, vim 7.4 is 417k lines and vim 8.2 is 510k lines. GNU emacs is 359k if we just count the C code, or if we include all the .el files, a little over a million lines. Way at the other end, we have https://archive.vector.org.uk/art10501320 :
> It began badly. We were walking along the South Downs Way in early summer, the sun glittering on the English Channel on our right, the Weald of Sussex stretching away to our left. “How big,” asked Arthur, “should a text editor be?”
> I’ve known Whitney most of my life. I know what he does. I know his stupid questions. And still I can’t resist trying to give helpful answers. “I don’t know. One could find out, surely? What do Emacs and Vim weigh – tens of megabytes?”
> “I’ve got a text editor in four lines of K. Just need to add Copy and Paste.”Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Wednesday, 01-Jan-2025 03:45:04 JST pistolero @lanodan @kirby
> Meanwhile vim actively litters.
And never cleans up half of them. If it put it somewhere in ~/.vim it wouldn't be as annoying but you get a bunch of .bullshit.un~ shit in /etc.Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Wednesday, 01-Jan-2025 03:45:41 JST pistolero @RedTechEngineer @kirby @lanodan Nah (not that it would be large enough to notice), just it's in the POSIX specification for the userspace, which says what you've got to have and where and what options it has to take and how it has to behave. The reason you've gotta type `grep -E` or `egrep` to get "extended" regexes is that POSIX specifies that grep regexes have to behave a certain way. Even GNU stuff doesn't follow POSIX exactly ( https://wiki.wlug.org.nz/POSIX_ME_HARDER ):
> To have an excuse to say that we still support the spec, if you define the environment variable, POSIX_ME_HARDER was the original way. Then a slightly prudish board member convinced me to change it to POSIXLY_CORRECT which I now think was a mistake. I should have left it as POSIX_ME_HARDER.Haelwenn /элвэн/ :triskell: likes this.
-
Embed this notice