#V, 11 Bytes
V, 11 Bytes
é1@añYpñdd
Since this contains nasty UTF-8 and unprintables, here is a reversible hexdump:
00000000: e931 4061 f159 7001 f164 64 [email protected]
V is an unfinished language I wrote, but this is working as of commit 19. This answer was a little more verbose than I'd like, but that's mostly because V has no knowledge of integers, only strings. So it's a decent answer! This will work up to 2^64, but it will probably take a very long time.
To make my explanation easier to read/write, I will work with this "Human readable form", which is actually how you would type this in vim.
<A-i>1@a<A-q>Yp<C-a><A-q>dd
Explanation:
'Implicit: register "a" == arg 1, and any generated text is printed.
<A-i>1 'Insert a single character: "1"
@a ' "a" times,
<A-q> <A-q> 'Repeat the following:
Yp<C-a> 'Duplicate the line, and increment it
dd 'Delete the last line, since we have one too many.
If loopholes are allowed, here's a shorter version that prints 1 to n, but also prints a 0 (8 bytes):
é0@añYp
And in readable form:
<A-i>1@a<A-q>Yp<C-a>
This is shorter because the <A-q>
at the end is implicit, so we don't need it if we don't have to delete the last line.