« first day (2 days earlier)
next day →
last day (1809 days later) »
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:04
HAI
Dr Green Eggs and Ham DJ
HAI
Eᴀsᴛᴇʀʟʏ Iʀᴋ
Prefix, postfix, or infix?
Dr Green Eggs and Ham DJ
Uh...
Yes?
Eᴀsᴛᴇʀʟʏ Iʀᴋ
...
command then args, args then command, or arg command arg
<command><args> is prefix (command = pre/before args)
<args><command> is postfix (post/after)
Dr Green Eggs and Ham DJ
I know the difference, I'm just not sure which one V is.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:07
...
Dr Green Eggs and Ham DJ
It will probably be postfix once I add mathematical functions, but right now it doesn't have any.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
okay
so how to print output?
Dr Green Eggs and Ham DJ
Implicitly.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
Okay.
Dr Green Eggs and Ham DJ
Do you know vim?
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:08
yes
sorta
Dr Green Eggs and Ham DJ
Okay. Underneath the hood, it
IS
vim.
Actually, neovim
so most of the commands are the same.
For example:
v.tryitonline.net/#code=&input=SGVsbG8
Whoops, wrong link.
v.tryitonline.net/#code=ZHc&input=SGVsbG8gSGVsbG8gV29ybGQh
Eᴀsᴛᴇʀʟʏ Iʀᴋ
what does d and w do?
w = write
d = ?
@DrGreenEggsandHamDJ
Dr Green Eggs and Ham DJ
'd' is the command "delete". 'w' is a motion, "word"
Eᴀsᴛᴇʀʟʏ Iʀᴋ
okay
so delete the first item and word the second?
what does word do?
Dr Green Eggs and Ham DJ
Word moves forward one word, unless it's the argument to a command.
In this case, d takes an argument, 'w'
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:13
okay?
Dr Green Eggs and Ham DJ
Any motion works as an argument to 'd'. For example, 'd$', 'd/foo', 'db', 'de'
Eᴀsᴛᴇʀʟʏ Iʀᴋ
oh
so delete the word motion?
And then implicitly output the last item on the stack or such?
or not that
Dr Green Eggs and Ham DJ
Pretty much.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
okay
Dr Green Eggs and Ham DJ
It's an infinite 2d array of strings though, not a stack.
And the starting value is the input.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:14
so
[...,'', '', <input1>,<input2>...]
Dr Green Eggs and Ham DJ
Whoops, not quite.
It's finite, but you can add an arbitrary number of new lines.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
oh
Dr Green Eggs and Ham DJ
v.tryitonline.net/…
Eᴀsᴛᴇʀʟʏ Iʀᴋ
cool
so newline separates input is V or TIO?
Dr Green Eggs and Ham DJ
V
Hey, I gtg.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
23:17
lol same
Dr Green Eggs and Ham DJ
If you want to learn more, type vimtutor into your terminal.
Eᴀsᴛᴇʀʟʏ Iʀᴋ
thanks for starting the lessons!
Dr Green Eggs and Ham DJ
Yeah, no probs!
Eᴀsᴛᴇʀʟʏ Iʀᴋ
@DrGreenEggsandHamDJ cool command
BAYIASDADASDASDAADSAASDA7
@DrGreenEggsandHamDJ do you play nethack?
It uses the vim keys to move.
Dr Green Eggs and Ham DJ
23:31
@EᴀsᴛᴇʀʟʏIʀᴋ no, I don't although I've been meaning to. That's cool. =D
Eᴀsᴛᴇʀʟʏ Iʀᴋ
-D
er
CYCLOPS
Dr Green Eggs and Ham DJ
@EᴀsᴛᴇʀʟʏIʀᴋ I suppose now that I think about it, it's definitely prefix. It's just weird to think of it that way since commands are only dyads or monads, and most command links won't be more than 3 or 4 commands long.
The longest one I can think of is 4: 3diw
Eᴀsᴛᴇʀʟʏ Iʀᴋ
@DrGreenEggsandHamDJ oh okay
Dr Green Eggs and Ham DJ
Wait, no there's a longer one: "a3diw
Or hey, you could even do ģregex/ń"a3diw
« first day (2 days earlier)
next day →
last day (1809 days later) »
all rooms
Transcript for
May
29
Jun '16
1
Jun
2
Vim-golf
Discussion about golfing in Vim/V.
vim.org/download.php
github...
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile