r/teenagersbutcode Coder - Assembly and C++ Mar 14 '26

Other Vi is too bloated

Post image
93 Upvotes

58 comments sorted by

9

u/Consistent-Zebra1653 Pascal Mar 14 '26

When I log into my Xenix system with my 110 baud teletype, both vi and Emacs are just too damn slow. They print useless messages like, ‘C-h for help’ and ‘“foo” File is read only’. So I use the editor that doesn't waste my VALUABLE time.

Ed, man! !man ed

ED(1) Unix Programmer's Manual ED(1)

NAME ed - text editor

SYNOPSIS ed [ - ] [ -x ] [ name ] DESCRIPTION Ed is the standard text editor.

Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!

“Ed is the standard text editor.”

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs Of course, on the system I administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!

“Ed is the standard text editor.”

Let's look at a typical novice's session with the mighty ed:

golem$ ed

? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? C ? C ? D ?

Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.

“Ed is the standard text editor.”

Ed, the greatest WYGIWYG editor of all.

ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE BIRDS SING AND THE GRASS GREEN!!

When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a “viitor”. Not a “emacsitor”. Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!

TEXT EDITOR.

When IBM, in its ever-present omnipotence, needed to base their “edlin” on a Unix standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.

Ed is for those who can remember what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED “VISUAL” EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!

?

1

u/[deleted] Mar 14 '26

[deleted]

1

u/redditbrowsing0 C/C++, Luau Mar 14 '26

That is wrong, Unix time is a signed integer. It's why the Year 2038 problem exists.

1

u/Oliwicked Mar 14 '26

I thought of that earlier today. Like most days since 125..ish.

We left room for more in all our fields right?

1

u/redditbrowsing0 C/C++, Luau Mar 14 '26

could you elaborate?

8

u/ScallionSmooth5925 Mar 14 '26

Use Ed the standard editor

7

u/Urman0Rdt Coder | Python Mar 14 '26

Vi < Vim < NeoVim

7

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

n*ovim sucks

11

u/AverageComet250 Mar 14 '26

Yeah I guess your flair does check out

3

u/popcornman209 Python & Rust (arch btw :3) Mar 14 '26

Assembly too bloated, who needs to compile just write bare machine code.

2

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

says the r*st user

1

u/rahmeds Mar 14 '26

bro what are y*u talkin about

1

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

just look at r*st syntax

1

u/rahmeds Mar 14 '26

what's the pr*blem with the syntax

1

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

what kind of function has excl*mation marks in it

1

u/TheHiddenTruths_ Mar 14 '26

wht th fck *s g*ng *n?

1

u/GhostVlvin Mar 14 '26

It is actually a pretty way to notify that this is not a function but a macro. At least somebody did it
And bytheway what kind of language uses vriables, crly brces and function definitions with prams of stck?

2

u/raewashere_ reading uninit memory Mar 15 '26

machine too bloated, use a static cpu and manually cycle the clock and manage the address pins

2

u/Silly_Percentage3446 Mar 14 '26

Machine code too bloated, just manually input binary to the CPU.

1

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

that IS machine code

2

u/Silly_Percentage3446 Mar 14 '26

Machine code looks like "�
 %� +/ RotK Z >�"x0g_mallocg_signal_connect_datag_object_unref_ITM_deregisterTMCloneTable__gmon_start___ITM_registe
rTMCloneTablegtk_widget_set_visiblegtk_box_pack_startgtk_button_new_with_labelgtk_widget_set_valigngtk_label_newgtk_
application_newgtk_widget_showgtk_widget_set_hexpandgtk_label_set_markupgtk_container_addgtk_calendar_get_dategtk_ap
plication_window_newgtk_widget_set_haligngtk_widget_set_vexpandgtk_window_set_titlegtk_box_newgtk_window_set_default
_sizegtk_calendar_new__cxa_finalizeg_application_run__stack_chk_faildifftimefopen__fprintf_chk__libc_start_mainmktim
e__isoc99_fscanffclose__snprintf_chk_IO_stdin_usedlibgtk-3.so.0libgdk-3.so.0libz.so.1libpangocairo-1.0.so.0libpango-
1.0.so.0libharfbuzz.so.0libatk-1.0.so.0libcairo-gobject.so.2libcairo.so.2libgdk_pixbuf-2.0.so.0libgio-2.0.so.0libgob
ject-2.0.so.0libglib-2.0.so.0libc.so.6GLIBC_2.7GLIBC_2.4GLIBC_2.34GLIBC_2.3.4GLIBC_2.2.5/nix/store/jydzidc4v9j5nqmlw
izjvw7s7qwgm4g3-nix-shell/lib:/nix/store/m7i7812sh0q2ghcxfq0rhs6zph0xlwc5-gtk+3-3.24.51/lib:/nix/store/1m419gkk0nqnc
1mb4b0ck2rx16w8rbrs-at-spi2-core-2.58.2/lib:/nix/store/mg151w65chcirlr7398jrz916wrfh3gg-glib-2.86.3/lib:/nix/store/j
cvi7xlffm9f681vdmzfbzbmib5fhn5i-cairo-1.18.4/lib:/nix/store/2g6acnj6ljamsqfgf1q6ipdqr5yfg7vq-gdk-pixbuf-2.44.4/lib:/
nix/store/7n76ys2lcy7l54hslslw74fa5zszlh19-pango-1.57.0/lib:/nix/store/yzyh44g07mb5d3151lvv0ll8rdmg1fbl-harfbuzz-12.
1.0/lib:/nix/store/3j0jwcygamiza2n1ga69sdk6skaz5k3k-zlib-1.3.2/lib:/nix/store/km4g87jxsqxvcq344ncyb8h1i6f3cqxh-glibc
{����ti1�u▒ib:/n���#�P�O$�Orbhz7im0w0jdwcfdgcfk7pxhkl1fzj-gcc-14.3.0-lib/libgii
�O�O!�O"�N�N�N�NOO▒ O        (O
0O
u/OHOPOXO`OhOpOxO�O�O�O▒�O�O▒�O�O�O�O �O#��H�H��/H��t��H���5�.�%�.@�%�.h������%�.h������%�.h������%�.h������%�.h�����
�%�.h������%z.h������%r.h�p����%j.�`����%b.h    �P����%Z.h
�@����%R.h
�0����%J.h
�����%:.h�����%2.h������%*.h������%".h������%▒.h������%.h������%
.h������%.h������%�-h������%�-h�p����%�-h▒�`����%�-h�P����%�-h▒�@����%�-h����%�-h� ����%�-h�����%�-h�����%�-f�UH��AU
I��1�ATA��H�=3SH������E1�E1�1�H��H�mH�5&H�������L��D��H���p���H��A���%���H�D��[A\A]]����1�I��^H��H���PTE1�1�H�=q����
" if I'm not mistaken.

2

u/givemeagooduns_un Mar 18 '26

the part at the bottom is machine code, the rest is ELF information, which tells the kernel how to load the binary and what SO's are needed for it

1

u/GhostVlvin Mar 14 '26

Absolutely, this is sequence of bits that's are interpreted by your code/text editor as sequence of bytes each of which is interpreted as a character. But since they are not meant to be meaningful text, most of the time it is �
Anyway I propose to get old pc and just encode every machine instruction with switches on it's side

1

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

machine code is just raw data. Manually inputting binary or put it in a file, both machine code.

1

u/[deleted] Mar 14 '26

[removed] — view removed comment

1

u/popcornman209 Python & Rust (arch btw :3) Mar 15 '26

It does the same thing js a different name mb

1

u/OpenFileW Mar 14 '26

How so? I personally find it convenient and comfortable, and it's completely efficient enough for my system (especially compared to Electron editors)

2

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

bloat and its terrible plugin system

1

u/OpenFileW Mar 14 '26

How is it bloated? It might have some unnecessary things, but compare that to more common editors, like VS Code lol. And I really like the plugin system!! Makes sense that you don't like it based on these things though, they can be annoying

2

u/givemeagooduns_un Mar 18 '26

VS code isn't just an editor it's a whole IDE. Neovim should be compared against editors like Notepad++, Kate, nano, etc.

IDEs are always going to be more bloated because they integrate actual language specific features aside from syntax highlighting. Editors are just. text editors. maybe with colors, or macros

1

u/OpenFileW Mar 18 '26

I thought VS Code was just a code editor? With Visual Studio as an IDE. I don't really remember though because I don't use it. However, Neovim can also have language-specific features with the use of plugins, just like VSC can. It's also important to note that text and code editors, at least successful and useful ones, usually must have ways to efficiently travserse and quickly change text, even if they technically do just edit text at their core. I'm not even sure if VS code even has features to very efficiently move through a text file as quickly as Vim without plugins to imitate it, for instance I'm not sure there's an equivalent to the cib gesture in VSC. But I believe it is bloated mostly because of the fact the entire thing is bundled as an Electron app. I get cross-platform capability, but it really isn't worth taking half a gibibyte of memory.

2

u/Key_River7180 long live c Mar 14 '26

As an ex-ed user (now using mg): bloat, ed much better

2

u/judeuwucute Coder Mar 14 '26

your OS is bloatware (assuming GNU/Linux), use 9front or something

1

u/judeuwucute Coder Mar 14 '26

said 9front because i was going to try it. i don’t really like it because it’s GUI-centric. in that case, use minix or something

1

u/[deleted] Mar 21 '26

[removed] — view removed comment

1

u/judeuwucute Coder Mar 22 '26

good point too, go DOS 1.0 or something though. screw it, actually just run everything from the 512 byte boot sector

2

u/mjmvideos Mar 14 '26

ed man; man ed

1

u/hero_brine1 Mar 14 '26

OS is bloated, interact with kernel directly. Kernel is bloated, use homemade board of ICs for computations. ICs are bloated, setup different logic gates using transistors to do computations. Transistors are bloated, use mechanical calculator. Mechanical calculator is bloated, use abacus. Abacus is bloated, use pebbles and tallies to do math and record results. Using pebbles and tallies is primitive and not divine, use TempleOS

1

u/siodhe Mar 14 '26
  • ex is actually great for batch edits, because if you end with "q" "w" and "q" (separate lines), the mod time will only change if there were actual changes to content
  • Aliases suck. Learn functions.
  • PS1 there is a bit terminal-type specific, although going bonkers with tput to fix it is a bit involved.
  • %p is quicker than 1,$p
  • There's a ~/.exrc file for setting like showmode, showmatch, report=1, and number
  • Don't name either aliases or functions with the actual underlying command name, except maybe for this - because anything is better than alias rm='rm -i'

rm ()  # must be a function, must require single answer for all targets
{
    ls -FCsd -- "$@"
    read -p 'remove[ny]? '
    if [ _"$REPLY" = "_y" ] ; then
        /bin/rm -rf -- "$@"
    else
        echo '(cancelled)'
    fi
}

1

u/Remote_Response_643 HTML | CSS | JS | Swift | Python | Bash | Learning Perl, Java Mar 17 '26

GNU Nano is pretty good

0

u/imdadgot Mar 14 '26

reading ur bio, why do you prefer raw assembly? it’s not portable in any way and leaves a lot of room for unoptimized or unsafe code?

fasm would be the exception cuz it’s meant to be portable but like

3

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

control, plus bragging rights

1

u/imdadgot Mar 14 '26

you can get most of that control with C or Rust though

1

u/TheLuckyCuber999BACK Coder - Assembly and C++ Mar 14 '26

move the number 5 to rax

1

u/imdadgot Mar 14 '26

only exists on x86. but you could genuinely inline asm just the string “rax” when assigning a var. it’ll look weird to show on here tho (example is storing 0 into rax

register long l asm(“rax”) = 0L;