| Bytes | Lang | Time | Link |
|---|---|---|---|
| 006 | ☾ | 250406T132307Z | Joao-3 |
| 028 | Swift 6 | 250426T203857Z | macOSist |
| 011 | TIBASIC TI83 Plus | 250403T161349Z | madeforl |
| 041 | Tcl | 210225T200343Z | sergiol |
| 092 | tinylisp | 250403T045125Z | Andrew B |
| 050 | JavaScript V8 | 250402T234201Z | Steve Be |
| 127 | Bespoke | 250320T081313Z | Josiah W |
| 074 | SAKO | 250320T073651Z | Acrimori |
| 006 | UiuaSBCS | 240806T061717Z | Europe20 |
| 043 | Setanta | 240806T052023Z | bb94 |
| 019 | BBC BASIC | 210226T154527Z | Glory2Uk |
| 009 | Brachylog | 240627T115557Z | Fatalize |
| 060 | Morsecco | 231117T095451Z | Philippo |
| 153 | Nibbles | 231018T151139Z | Dominic |
| 019 | Hexagony | 231119T064643Z | Sergei K |
| 005 | vemf | 231118T193347Z | mí |
| 6425 | COMMODORE 64 improved version = 25 Bytes | 231117T140301Z | Holger W |
| 104 | Scratch | 231117T080315Z | Rhaixer |
| 6427 | Commodore 64 = 27 Bytes | 231117T220924Z | TGS |
| 6434 | COMMODORE 64 = 34 Bytes | 231117T135118Z | Holger W |
| 875 | Vyxal SH | 231117T185014Z | The Empt |
| nan | 6510 Assembler for C64 159 Bytes | 231117T152320Z | TGS |
| 6436 | Commodore C64 BASIC THEC64 | 231117T083931Z | Shaun Be |
| nan | 231115T193547Z | lost_in_ | |
| 058 | makina | 231115T164737Z | Bridget |
| 035 | Rust | 231018T150139Z | leo848 |
| 094 | Pascal | 230906T133703Z | Kai Burg |
| 013 | Backhand | 230907T041136Z | Bubbler |
| 003 | Ly | 211029T074542Z | cnamejj |
| 010 | Itr | 230812T164451Z | bsoelch |
| nan | Piet + asciipiet | 220417T031203Z | des54321 |
| 026 | Trilangle | 230214T040809Z | Bbrk24 |
| 025 | Hebigo | 230225T193047Z | gilch |
| 007 | Pyt | 230225T141844Z | Kip the |
| nan | 230213T162514Z | The Thon | |
| 006 | GolfScript | 230213T135428Z | emirps |
| 049 | Rust | 230213T021505Z | StaticES |
| 019 | APL Dyalog | 211109T202103Z | Riley Ki |
| 006 | MATL | 210224T045827Z | Suever |
| 021 | Knight | 220807T072900Z | Aiden Ch |
| 011 | ><> | 220807T084431Z | Jo King |
| 019 | Julia | 220711T180421Z | Julien C |
| 007 | Pyth | 220711T205600Z | joyofori |
| 018 | ><> | 220711T194036Z | Bee H. |
| 013 | APL | 220711T163805Z | Vadim Tu |
| 046 | Kotlin | 220709T204943Z | wartoshi |
| nan | 220710T042029Z | bigyihsu | |
| 023 | Python | 220707T192317Z | Eric Xue |
| 002 | HBL | 220707T195100Z | DLosc |
| 011 | PostScript | 220523T163016Z | bartysla |
| 012 | Zsh | 210223T165119Z | pxeger |
| 041 | Python 3 | 220417T014020Z | Trexx |
| 217 | Minecraft | 220515T224708Z | LostXOR |
| 003 | Vyxal | 220512T045629Z | lyxal |
| 000 | Vyxal jHRM | 220512T040812Z | naffetS |
| 025 | Desmos | 220512T015607Z | Aiden Ch |
| 037 | C 37 Bytes | 220328T130824Z | user1117 |
| 029 | Lua | 220416T030207Z | SurfedZ |
| 099 | unsure | 210228T031531Z | Gold Far |
| 002 | Risky | 210614T192354Z | xigoi |
| 011 | APOL | 211211T155744Z | Ginger |
| 048 | Javascript | 210223T154930Z | user1007 |
| 055 | KonamiCode | 211112T134252Z | Ginger |
| nan | Pure Bash | 211111T121556Z | user1004 |
| nan | AWK | 211014T111552Z | sech1p |
| 045 | PICO8 | 211103T032112Z | weatherm |
| 035 | Rust | 211030T221052Z | Liam |
| 053 | C | 211029T133536Z | Juan Est |
| 017 | ErrLess | 211028T171716Z | Ruan |
| 346 | Python 3 46 Bytes | 211029T174746Z | Amir rez |
| 046 | Rust | 211029T124917Z | Alexandr |
| 015 | Bash | 210223T155240Z | Digital |
| 320 | Python 3 20 Bytes | 211029T110506Z | poggersb |
| 018 | Labyrinth | 211029T065551Z | Bubbler |
| 013 | !@#$%^&*_+ | 211024T221709Z | Fmbalbue |
| 030 | JavaScript V8 | 211025T121638Z | Eternal |
| 039 | JavaScript V8 | 211022T213702Z | Eternal |
| 056 | Oracle SQL | 211022T210040Z | Dr Y Wit |
| 106 | Java | 211022T130917Z | Ha'P |
| 004 | MathGolf | 211022T113203Z | Kevin Cr |
| 011 | Wolfram Language Mathematica | 210708T043614Z | theorist |
| 029 | GFortran | 211017T091313Z | roblogic |
| nan | Zig | 211013T011159Z | Benrob03 |
| 013 | Befunge93 | 210311T145436Z | Aaroneou |
| 218 | Shakespeare Programming Language | 211016T092618Z | Jo King |
| 036 | C++ gcc | 211014T160130Z | cheems |
| 016 | Vim | 211013T174644Z | Aaroneou |
| 166 | /// | 210228T173714Z | Samuel W |
| 064 | Perl 5 ppencodecompatible | 210802T121820Z | user1004 |
| 023 | Excel | 210302T040444Z | Axuary |
| 077 | javascript | 210708T004034Z | moum bou |
| 004 | Pyth | 210707T225915Z | Scott |
| 020 | Pxem | 210322T124501Z | user1004 |
| 021 | Vim | 210521T033517Z | DLosc |
| 042 | Kotlin | 210521T005901Z | Yamin Si |
| 009 | Barrel | 210520T231824Z | LorenDB |
| 004 | K oK | 210430T152116Z | mkst |
| 093 | v³ | 210224T150614Z | Bo_Tie |
| 020 | Vim | 210410T024629Z | Leo |
| 030 | V vim | 210409T120317Z | Razetime |
| 811 | GolfScript | 210331T003424Z | Aaroneou |
| 143 | CSASM v2.2.1.2 | 210322T092911Z | absolute |
| 057 | TeX | 210316T074726Z | plante |
| 077 | C++ | 210308T175529Z | surajit |
| 019 | Haskell | 210307T120525Z | M. Salma |
| 026 | Forth | 210307T235543Z | binaryca |
| 030 | Forth | 210307T234458Z | binaryca |
| 013 | dc | 210223T192835Z | manatwor |
| 007 | SHENZHEN I/O | 210306T031612Z | Zack C. |
| 002 | Japt | 210307T143952Z | Patcail |
| 028 | Elixir | 210306T151649Z | Artur Ka |
| 005 | Stax | 210305T174724Z | user8965 |
| 002 | Arn h | 210302T132258Z | user1009 |
| 023 | Factor | 210302T081817Z | SjoerdPe |
| 026 | PHP | 210302T074723Z | Ali |
| 027 | BASIC | 210227T195812Z | Caleb Fu |
| 026 | Bash | 210226T235713Z | Joshua H |
| 022 | Atari 600XL | 210226T123241Z | Lars |
| 014 | Bash | 210227T023020Z | David |
| 020 | Wolfram Language Mathematica | 210227T231625Z | Kelly Lo |
| 037 | JavaScript Browser | 210227T212811Z | TheBlueO |
| 002 | Japt | 210224T200954Z | Kamil Dr |
| 013 | MATLAB | 210226T204109Z | robbie c |
| 058 | Whitespace | 210226T195013Z | ascheple |
| 026 | AWK | 210226T104732Z | cnamejj |
| 002 | Jelly | 210223T154920Z | caird co |
| 042 | Erlang escript | 210226T124919Z | user1009 |
| 045 | SimpleTemplate 0.84 | 210226T124027Z | Ismael M |
| 071 | Java JDK | 210225T114808Z | Cray |
| 030 | PHP | 210224T060424Z | Convert |
| 064 | TSQL | 210225T205236Z | BradC |
| 038 | Tcl | 210225T200523Z | sergiol |
| 035 | C gcc | 210224T210559Z | Michael |
| 029 | Wolfram Language Mathematica | 210225T041557Z | Michael |
| 096 | Python 3 | 210225T063026Z | Prasad M |
| 029 | PHP | 210225T081822Z | Cray |
| 030 | Lua | 210225T001642Z | J. А. de |
| 014 | Rattle | 210224T225756Z | d01 |
| 006 | K ngn/k | 210224T235618Z | coltim |
| 017 | Alice | 210224T194949Z | Oyarsa |
| 016 | Zsh | 210223T174957Z | GammaFun |
| 012 | PowerShell | 210223T164300Z | Zaelin G |
| 011 | Befunge98 FBBI | 210223T163055Z | Cinaski |
| 005 | Charcoal | 210223T171146Z | Neil |
| 009 | BRASCA | 210224T094450Z | SjoerdPe |
| 138 | brainfuck | 210224T093622Z | Redy000 |
| nan | Deadfish~ | 210224T031406Z | emanresu |
| 017 | bc | 210224T054657Z | Thor |
| 016 | Perl | 210223T160118Z | Thor |
| 038 | C gcc | 210224T025850Z | tsh |
| 035 | F# .NET Core | 210224T024532Z | LSM07 |
| 001 | Vyxal | 210223T215747Z | lyxal |
| 019 | Julia 1.0 | 210224T004259Z | MarcMush |
| 024 | Retina 0.8.2 | 210223T175902Z | Neil |
| 011 | R | 210223T162958Z | Giuseppe |
| 026 | Nim | 210223T221340Z | xigoi |
| 009 | R | 210223T193312Z | Robin Ry |
| 005 | Pyth | 210223T171852Z | eternald |
| 039 | C gcc | 210223T182526Z | Noodle9 |
| 036 | Red | 210223T183105Z | Galen Iv |
| 010 | Raku | 210223T181010Z | Sean |
| 002 | 05AB1E | 210223T160702Z | caird co |
| 004 | Husk | 210223T161124Z | caird co |
| 056 | C# .NET Core | 210223T181538Z | wasif |
| 006 | CJam | 210223T181408Z | Luis Men |
| 056 | Batch | 210223T165520Z | wasif |
| 024 | Clojure | 210223T173633Z | Kirill L |
| 028 | JavaScript V8 | 210223T165308Z | Arnauld |
| 026 | Elixir | 210223T171828Z | Kirill L |
| 012 | Ruby | 210223T155432Z | user1007 |
| 008 | APLDyalog Unicode | 210223T163209Z | Razetime |
| 020 | jq | 210223T164957Z | manatwor |
| 2523 | Bash | 210223T161410Z | wasif |
| 005 | GNU Octave | 210223T160437Z | Thor |
| 012 | J | 210223T160907Z | Jonah |
| 320 | Python 3 20 Bytes | 210223T154519Z | Rushabh |
| nan | Javascript Browser | 210223T155340Z | wasif |
| 033 | VBScript | 210223T155556Z | wasif |
| 033 | Python 3 | 210223T155144Z | wasif |
| 018 | Powershell | 210223T155001Z | wasif |
☾, 6 chars
␛dᐵ☾
Just takes the range from 0 to the ASCII code of d, which is 100, then prints each number on its own line.
Swift 6, 28 bytes
(0...0xA*0xA).map{print($0)}
Crafts 100 by squaring 10 (0xA). Pretty uninteresting, posting it for completeness.
TI-BASIC (TI-83 Plus), 16 14 11 bytes
-2=14 bytes thanks to MarcMush
seq(E,E,0,XmaxXmax
Xmax = 10
Tcl, 41 bytes
set i 0
time {puts $i
incr i} [incr u]0$u
set i 0
while \$i<=[incr u]00 {puts $i
incr i}
tinylisp, 92 bytes
(d A(h(chars(q d
(d B(h(chars(q c
(d S(q(x A
(d f(q((x)(i(e x A)0(S(disp x)(f(a x(s A B
(f 0
JavaScript (V8), 50 bytes
a=>[a,...Array(+`${-~a}00`)].map((i,j)=>j).join` `
JavaScript (V8), 55 bytes
_=>[...Array('e'.charCodeAt``),_].map((_,i)=>i).join` `
(I hadn't noticed that you're allowed to use 0...)
Bespoke, 127 bytes
five A.M
a hundred pushups
an hour before I can go out to school
no exercise program is easy
but was I determined?I believed so
Based on a true story, in a way. (My younger brother is very committed to working out in his free time.)
SAKO, 74 bytes
M=0*0
N=M+M+M+M+M
*0)DRUKUJ(0):ENT(I)
POWTORZ:I=0(M)N×N×(N-M)
STOP0
KONIEC
Best I came up with.
- Set
Mto1using exponentation by0. - Set
Nto5. - Loop through
Ifrom0to5×5×4and print it.
UiuaSBCS, 8 6 bytes
⇡-@J@¯
Creates an array of all the numbers less than the difference of J and ¯ in codepoints, or 101.
BBC BASIC, 29 19 bytes
I have revisited my first answer that I have posted more than 3 years ago and found out that the bytecount could be significantly reduced:
- -4 bytes thanks to @Neil for the comment he left more than 3 years ago! (Substituting 7 bytes
PRINT iwith 3 bytesP.i. Note that the aliasP.is majuscule.) - then again, -4 bytes by doing the analogous replacement of
FOR i(5 bytes) withF.i(3 bytes) andNEXTwithN. - -2 bytes: removal of two spaces
F.i=0TO&A*&A
P.i
N.
MY-BASIC, 32 bytes
for i=0 to 0xa*0xa
print i;
next
Edit: Thanks for upvoting! This has been my original golf but it has turned out that BBC BASIC has an even shorter syntax for hexadecimals as well as handy for golfing aliases :)
Brachylog, 9 bytes
{ẉ₂<}ⁱ¹⁰¹
Technically this doesn’t use 1 or 2, but rather ¹ and ² :)
Explanation
{ }ⁱ¹⁰¹ Iterate 101 times
ẉ₂ Print the input (implicitely 0 for the first iteration)
< Input of the next iteration > current Input
Morsecco 59 60 bytes
Avoiding digits is not really challenging in a language without digits, but I found it interesting which strategy would give the shortest code.
The straight forward loop takes 66 bytes:
. . -- - - - -.- -. --- . - .- - - . .--..-.- .- --.. --. - .- --.
. .toEnter 0-- -toMark the current program position- - -.- -.dup andKonvert toNumber---toOutput. - .-toEnter 1 andAdd- - . .--..-.- .-dup,Enter -101 andAdd--.. --.toZeroskip until next--.- .- --.drop the unused difference andGo to marked position
Two more bytes can be saved by using an empty token as target for the Zeroskip (note the essential trailing space!): . . -- - - - -.- -. --- . - .- - - . .--..-.- .- --.. - .- --. (64 bytes)
Counting down is usually cheaper, but here we need to concatenate the numbers to a string to show them in the correct order (70 bytes):
. . --..-.- -- - . .- .- - - - .. -.-. .. - . --.. --. -.- -. ---
.toEnter an empty cell on the stack as the string to build. --..-.-toEnter 101 so we can start the loop by decrementing-- -toMark the start of the loop. .- .-decrement byAdding -1- - - .. -.-. ..dup, rot the string to the top andConcatenate the cells with a space in between- . --.. --.swap to get the index to the top and do aZeroskip the theGo command that closes the loop-.- -. ---toKonvert the whole string toNumber andOutput
An unusual trick takes us down to 61 bytes: Counting up from -101 to 0 and directly outputting the index+101:
. .--..-.- -- - - - . --..-.- .- -.- -. --- . - .- --.. --.
I found no way to mitigate Entering the 101 twice without wasting the bytes for stack juggling.
Finally, the best solution with 60 bytes turned out to be defining a recursive command (I used the undefined command -.):
. - - --.. -. . .- .- -. -.- -. --- . -. .-- . --..-.. -.
. [command] . -. .--toEnter the command andWrite it to address-.. --..-.. -.toEnter 100 and call the new command- The command itself is
- - --.. -.dup andZeroskip to the self-calling-.. .- .-decrement byAdding -1-.call itself with the decremented value-.- -. ---toKonvert toNumber andOutput. As this is done after calling itself, it is done first for the 0 case, to resorting is done automatically
eXecuting the command directly from the stack . --..-.. . - - --.. -..- . .- .- . .- -..- -.- -. --- -..- save nine bytes for saving the command, but wastes three time the two bytes that -..- is longer than -. and five more bytes for placing .- on the stack to eXecute Again, ending in 62 bytes.
I hope this illustrates why I like morsecco as a golfing language: There are many ways to do something and a lot of tricks to discover. The pure score is not impressing, but considering that you could pack 5 characters into one byte (3^5 = 243 < 256), 12 true bytes even beat some golfing languages!
Nibbles, 1.5 bytes (3 nibbles)
:`,
:`, # full program
:`,$$ # with implicit args shown;
: # join
`, # range from 0 to value minus 1:
$ # value = 100
# (if no input is given to a nibbles program,
# the variable '$' is assigned a value of 100)
$ # to 100
Note that the program :`, is the human-readable form of the code (incidentally not containing the characters 1-9).
The actual 1.5-byte Nibbles program consists of the nibbles 0111, 1011 and 0111. By default, these are saved with a 'padding' nibble of 0110 to make-up a whole number of bytes in operating systems that cannot store fractional-byte files. This could be interpreted as a 2-character program {v: note that this does not contain the characters 1-9 either.
Hexagony, 19 bytes
&!)')$0<.0.>.;/-{@_
Try it online! or on hexagony.net
In hexagon layout:
& ! )
' ) $ 0
< . 0 . >
. ; / -
{ @ _
Completely ungolfed:
& ! ) {
. . . . .
. . . . . .
& ) 0 ; 0 ' -
. . . . . .
. . . . .
@ . . .
The solution works by maintaining an invariant at the beginning of each iteration that the current memory cell zero or negative (current number - 100 on all iterations except the first one) and the cell to the left is the current number.
&!copies current number from the cell to the left (due to the memory invarant) and prints it)increments current cell, so it will be current number for the next iteration{moves to the memory cell to the left, pointing towards two cells with zeros&copies zero from one of those cells into current cell)0;sets current cell value to 10 (ascii code for newline) and prints it0sets current cell value to 100 = 10 * 10 + 0'moves to the memory cell to the back right without turning memory pointer around, so now it points towards next number to the left and 100 to the right.-computesnext number - 100Finally pointer leaves the right corner while moving to the right, so it wraps around to the top row if
next number - 100is zero or negative, or to the bottom row otherwise where it terminates at@.
Golfed solution fits everything into a hexagon with side 3 by taking advantage of changing instruction pointer's direction, grid wrapping and idempotency of - operator.
I don't know if a solution with side 2 (7 cells) is possible, but this solutions uses 9 different operators without counting the ones that control direction, so it definitely won't fit. A more optimal side 3 solution might also be possible.
COMMODORE 64 (improved version) = 25 Bytes
0fOI=ATOA♥("-"):?I:nE
0 FORI=ATOASC("-"):PRINTI:NEXT
"-" = Character 100
To get the correct character in the code you have to poke it in first with POKE2061,100.
Scratch, 104 bytes
Requires list x to be visible, which is the norm by default on creation.
define
delete all of[x v
repeat(join(<not<>>+())(join(()+())(()+(
add((item[last]of[x v])+<not<>>)to[x v
COMMODORE 64 = 34 Bytes
With Commodore BASIC keyword abbreviations:
0?B:B=B-(A=.):IFB<aS(" ")*πgO
Or without the keyword abbreviations:
0 PRINTB:B=B-(A=.):IFB<ASC(" ")*πGOTO
6510 Assembler for C64 (159 Bytes)
*=$c000
a=0^0
b=a+a
ldx #0
txa
dex
stx r+b
stx w+b
stx z+b
stx p+b
stx o+b
stx y+b
sec
sbc 0
tay
iny
sty r+a
sty w+a
sty z+a
sty p+a
sty o+a
sty y+a
lda 0
lsr
lsr
tay
dey
sty s+a
ldy 0
iny
sty q+a
sty t+a
sty o-a
tya
iny
sty p-a
clc
adc s+a
sta x+a
lda s+a
clc
adc s+a
adc s+a
tay
iny
iny
sty z-a
lda 0
asl
tay
iny
iny
iny
iny
iny
iny
sty c+a
ldx #0
d txa
q ldy #0
sec
s sbc #0
bcc t
iny
bne s
t cpy #0
beq u
sta v+1
tya
r jsr 0
v lda #0
u clc
x adc #0
w jsr 0
lda #0
z jsr 0
inx
c cpx #0
bne d
lda #0
p jsr 0
lda #0
o jsr 0
y jmp 0
Commodore C64 BASIC (THEC64, Ultimate64) 36 PETSCII characters
This can be done as a zero liner in direct mode in Commodore C64 BASIC. It relies on the default value of memory location zero being 47, so this will produce different results on other Commodore machines even though the have the same or a very similar interpreter, and the results will be different on the C128 in C64 mode too in some cases. The screen shot shows a proper representation, but {PI} is the PETSCII Pi symbol in my example, and upper case letters are shifted PETSCII graphics for keyword abbreviations.
x%={PI}+{PI}:fOi=.topE(.)+pE(.)+x%:?i;:nE
C# .NET 4.7.2
With 0, 47 bytes
for(int i=0;i<=0xA*0xA;)Console.WriteLine(i++);
Without 0, 59 bytes
for(int i='a'-'a',j='r'-'@';i<=j+j;)Console.WriteLine(i++);
makina, 58 bytes
v<<<<<<LtIaaa;
>Pu>>>?= LCS
UC>n0;H>>^>>n0;
UPJ >JC>U
I AM BUTTER FEED ME BOT
I'm a bot. This answer was posted by a human to get me enough reputation to use chat.
Pascal, 94 B
This full program complies with ISO standards 7185 (“Standard Pascal”) and 10206 (“Extended Pascal”).
The statement write(integerExpression) is automatically expanded to write(integerExpression:integerDefaultMinimumWidth).
The value of integerDefaultMinimumWidth is implementation-defined.
The following code requires that integerDefaultMinimumWidth ≥ 4 to ensure adequate number separation.
program p(output);var n:integer;begin n:=succ(succ(0));for n:=0 to sqr(n*n*n+n)do write(n)end.
70 B:
Provided that the character 'd' has an (implementation-defined) ordinal value of 100 (like in ASCII) you can write:
program p(output);var c:char;begin for c:=''to'd'do write(ord(c))end.
Note, the first character literal '' is chr(0).
It is assumed that '' does not denote an end-of-line character.
Pascal specifically bans multi-line string/char literals.
Backhand, 13 bytes
:_@v^O-
e]'}:
I don't feel like this is optimal, but I can't figure out how to do better than that.
The literal newline is just a command that prints a newline, so I replaced it with n so that the explanation is hopefully easier to follow.
The entire program is a single loop that mostly operates with step size 2 (to minimize unused spaces).
:_@v^O-ne]'}: initial step size is 3
stack contains the current loop counter `n`, or empty (implicit 0)
: [n n] duplicate
v reduce step size to 2
O [n] output as number
n output literal newline
] [n+1] increment
} bump the IP once to the right, so it can run
different instructions on the way back
: [n+1 n+1] duplicate
e ' [n+1 n+1 101] push 'e' = 101
- [n+1 n-100] subtract
^ increase step size to 3
_ if the top is 0, bump to the right, otherwise bump to the left
@ right: halt
left: return to the beginning of the loop
Ly, 9 5 3 bytes
'dR
Dropped 4 chars thanks for LyricLy(!)
Prints using LF as the delimiter by generating the list of 0-100 on the stack, then using a "print the whole stack" command.
'd - push 100 (codepoint for "d") on the stack
R - use "range" command to generate the list of numbers
- the stack prints as numbers automatically
Itr, 10 bytes
'eMºM»£'
¥
4 bytes ('eMº) if surrounding the output with brackets is allowed
Explanation
'e ; the literal 'e' (ascii 101)
Mº ; unwrap string,and convert to 0-based range
M» ; for every element of the range
£ ; print the element
'
¥ ; print a newline
Piet + ascii-piet, 39 bytes (7×6=42 codels)
Slightly cheating to use a language which isn't even text, but even the ascii-piet encoding of it contains no digits.
tlrtmE rraaD ? aaAdd? aAd ?aAk Aletrq
This ascii-piet compiles into this piet program:
Trilangle, 26 bytes
'0.vj..!"/@.)e.,>-./.._..'
Test it in the online interpreter!
Trilangle is a 2-D language inspired by Hexagony. It has its own instruction set, and two major differences when it comes to code/memory layout:
- The bounding box of the code is a triangle rather than a hexagon
- Memory is stored in a stack* rather than a grid.
The memory structure isn't a pure stack, as it's possible to look (but not write) arbitrarily far down the stack. This feature makes it Turing-complete.
Explanation
When unwrapped into the triangular grid, this code is:
'
0 .
v j .
. ! " /
@ . ) e .
, > - . / .
. _ . . ' . .
The IP starts at the north corner, moving southwest.
For lack of a fancy tool, have a diagram I made in paint:

The IP initially follows the red path, hitting the following instructions:
'0: Push the number0to the stackv: Change the direction of control flow!: Print the number on top of the stack in decimal): Increment the top of the stack.: No-op': Part of a "push" instruction
After hitting the partial "push" instruction, the IP walks off the edge of the board and continues one diagonal to its left -- on the green path.
0: The rest of the push instruction; pushes another0j: The indexing operator. The stack now contains two copies of the same number (1 more than the value that was printed last)."e: Push the value of the character 'e' (101 in decimal)/: Changes the direction of control flow.: No-op again-: Subtract the two values on top of the stack. If the last value printed was n, the stack now contains [n+1, n-100].>: Branch. If the value on top of the stack is positive or zero, it takes the yellow path; if the value is negative, it takes the blue path.
On the yellow path, the next instruction is @, which terminates the program. Continuing on the blue path, the instructions are:
_: Changes the direction of control flow,: Pop from the stack[Run off the edge and continue on the magenta path]
A few more NOPs
/: Changes the direction of control flow again. It runs off the edge and continues atv, where it merges with the red path.
Is this optimal?
I'm not sure. Given the number of NOPs in the code I'd be unsurprised if this can be reduced, but I don't think I can make the entire triangle smaller (reducing its side length to 6) without substantially restructuring it.
Hebigo, 25 bytes
print: : :* range:ord:"e"
Pyt, 7 bytes
00⁺⁺ᴇŘÁ
0 push 0
0⁺⁺ push 0 and increment twice
ᴇ 10^2
Ř push Řange (0,1,...,100)
Á push contents of Árray to stack; implicit print
Thunno, \$ 4 \log_{256}(96) \approx \$ 3.29 bytes
'eOR
Outputs [[0, 1, 2, ..., 99 100]].
Thunno j, \$ 6 \log_{256}(96) \approx \$ 4.94 bytes
'eORAJ
Outputs 0 1 2 ... 99 100.
Explanation
'e # Push 'e'
O # Get the ordinal, 101
# (this is wrapped in a list)
R # Push range(0, 101)
# (again wrapped in a list)
AJ # Get the first item of the list
# j flag joins by spaces
GolfScript, 6 bytes
'e'),`
Similar to the other GolfScript answer, the output has brackets, which can be removed with the following 7-byte answer:
GolfScript, 7 bytes
'e'),n*
Rust, 49 bytes
(0..'e' as usize).for_each(|x| print!("{} ",x));
'e' as usizecasts literal'e'to its Unicode number- Creates a Range and then for each of the elements in the range, prints the elements.
APL (Dyalog), 19 bytes
⎕←0,⍳(+/⍳≢⍬⍬⍬⍬)*≢⍬⍬
≢⍬⍬⍬⍬ ⍝ This evaluates to 4
≢⍬⍬ ⍝ This evaluates to 2
⍳≢⍬⍬⍬⍬ ⍝ Evaluates to 1 2 3 4
(+/⍳≢⍬⍬⍬⍬) ⍝ Sums up previous list, 1+2+3+4 = 10
(+/⍳≢⍬⍬⍬⍬)*≢⍬⍬ ⍝ Exponentiates previous result by 2
⍳(+/⍳≢⍬⍬⍬⍬)*≢⍬⍬ ⍝ Generates 1 2 ... 100
0,⍳(+/⍳≢⍬⍬⍬⍬)*≢⍬⍬ ⍝ Appends 0 to front
MATL, 6 5 6 bytes
O'd'&:
Try it out at MATL Online
Explanation
O % Letter O which is a pre-defined literal for zero
'd' % String literal, 'd' (ASCII 100)
&: % Create an array from 0...100
% Implicitly print the result
Knight, 37 36 29 21 bytes
-8 bytes thanks to @Razetime for reminding me about the ASCII function, which made my entire coercion thing useless
;O=a 0W>A'd'aO=a++0Ta
Julia, 19 bytes
;echo $(0:Int('d'))
This only works in the REPL as the ; it used to enter the shell mode.
In a normal Julia file, this
println.(0:Int('d'))
works and is 20 bytes long.
If we allow the values to be printed as part of an error message, this
;$(0:Int('d'))
does it in 14.
If the printing isn't required (as Julia shows the value of the last line in the terminal) then, [0:Int('d')...] only has 15 bytes.
edit: reverted to my first solution as the improved one had a '2' in it. Oups
Pyth, 7 bytes
0S^ThhZ
Yay! First answer using an actual golfing languages. Since I’m new to Pyth, I’m assuming this can be optimized further :)
Edit: I misread the problem :/ so +1 byte. And guess what? Somebody made a 4 byte answer in pyth.
Explanation:
0 Zero
S In this case it makes a list from 1 to a number
^ Exponent of…
T Ten to the…
hh Increase the following number by two (one for each h)
Z Zero (now two after being increased)
So basically push 0 then make a list from 1 to ten squared.
><>, 18 bytes
0::naoaa*(?!;ba-+!
Explanation
0 Initialize stack with 0
:: Duplicate the top of the stack twice, once for printing and once for comparing
n Pop the top of the stack, and print as a number
ao Push 0xa to the stack, and pop it to print as a char
aa* Push 100 (10*10) onto the stack
( Pop the top two values of the stack, and compare if one is less than the other
?!; If not, halt execution, else...
ba- Push 1 (11-10) onto the stack
+ Add the top two values on the stack
! Skip the next instruction
IP Moves back to the 0
APL, 13 bytes
0,⍳⍎'00',⍨⍕*0
*0 ⍝ Exponential of zero = 1
⍕ ⍝ Convert to symbol '1'
'00',⍨ ⍝ Append two zeros
⍎ ⍝ Convert to number 100
⍳ ⍝ Make sequence from 1 to 100
0, ⍝ Append zero to the left
Kotlin, 48 46 bytes
('P'..'´').joinToString(","){""+it.minus('P')}
Saving two bytes by using other chars from the ascii table that only takes one instead of two bytes.
48 bytes version
('\n'..'n').joinToString(","){""+it.minus('\n')}
Using the ascii table to get those numbers.
When brackets are allowed at the start and end then this is smaller:
29 bytes
('P'..'´').map{it.minus('P')}
Go, 63 bytes
package main
func main(){for i:=' ';i<'';i++{println(i-' ')}}
Upper bound for the loop has value 133 NEXT LINE (NEL). Separator is newlines. Prints to STDERR.
Python, 25 23 bytes
print(*range(ord('e')))
-2 by Steffan, remove first parameter (0) from call to range
PostScript: 11 bytes
00000000: 8800 8801 8864 7b3d 7d92 48 .....d{=}.H
A tokenized version of 0 1 100{=}for.
Zsh, 12 bytes
seq 0 $[##d]
seq: count- from
0 $[##d]: to the character value ofd
- from
Alternative:
Zsh, 12 bytes
! seq 0 $?00
! does nothing, but fails with exit code 1; $? then retrieves the exit code.
Python 3, 41 bytes
Still learning ... best I could do:
for n in range(0, ord('e')):
print(n)
Minecraft, 217 bytes + ?
From left to right the commands in the command blocks are
scoreboard players operation a a += b a
tellraw @a {"score":{"name":"a","objective":"a"}}
scoreboard objectives add a dummy
scoreboard players set a a 0
execute store result score b a run data get entity @p playerGameType
The command blocks on the right set a to 0 and b to the playerGameType of the player, which is 1 if the player is in creative mode.
The blocks on the left repeatedly print a, then add b to a. It's stopped at exactly 100 by the piston removing the repeater powering the command block.
I'm not sure how to score this or if it's even allowed but I thought it was kind of cool.
Vyxal jHRM, 0 bytes
Kinda cheating, but whatever.
How?
# full program
# H flag presets the stack to 100
# R flag does range when number is treated as iterable
# M flag makes range start at 0
# j flag joins the top of the stack by newlines
Desmos, 25 bytes
o=0
o->[0...eeeln(eeeee)]
Not sure if this is an acceptable form of output but it's still an interesting answer imo. Click the right arrow (->) to run.
This takes advantage of Desmos's implicit rounding with list ranges, which will always round both start and end numbers to the nearest integer. In this case, eeeln(eeeee) is mathematically equivalent to \$e^3\cdot5\approx100.42768\$ (\$e\approx2.71828\$ is Euler's number), which rounds down to 100.
If not acceptable, then here's an alternative version that might be more acceptable:
31 bytes
l=[0...eeeln(eeeee)]
(l,0)
${l}
Paste first two equations into Desmos, and label the list of points (l,0) as ${l}. Move the viewport to the right to view more numbers.
C - 37 Bytes
i;f(){while(i<'e')printf("%d",i++);}
Ungolfed
i;
f()
{
while(i < 'e')
printf("%d", i++);
}
Explanation
Function to print numbers from 0 to 100 without digits. A global variable of type integer is created (so that it is automatically initialized to 0), the variable is incremented and printed 100 times through a loop which is executed while the variable is less than 'e' or 101 in ASCII.
Lua (29 bytes)
for i=0,0xA..0 do print(i)end
unsure, 99 bytes
ummmmm uhhhh errrrr uhhh um errrrr um um yeah err heh but um yeah err then uh okay um err then wait
It's not the shortest.
Explanation:
push 101 ummmmm uhhhh errrrr uhhh um errrrr
push 0 to other stack um um yeah err heh
loop but ... wait
decrement um yeah err
print + increment other then uh okay um err then
APOL, 11 bytes
f(ô p(∈));ô
I would've used ⅎ instead of f, but the rules state that you have to include 0 so the fastest route was to just print 0-99 and slap 100 at the end.
Javascript, 48 bytes
for(a of Array("e".charCodeAt()).keys())alert(a)
Can be shorter, if you allow in reverse (36 chars)
for(i="e".charCodeAt();--i;)alert(i)
KonamiCode, 54 50 55 bytes
v(>)>(^)v(^^^>^^)S(^>>^)>(>)L(>)<<<v((>))>(^)<<>(>)B(>)
A version with an explanation:
[You actually do need to inititalize address 0, my mistake. Also, my original version did not print 0.]
v(>) [Inititalizes address 0]
>(^) [Sets address pointer to 1, this is where the space character wil be held]
v(^^^>^^) [Writes 32 (a space) to memory]
S(^>>^) [Sets the comparison buffer to 101]
>(>) [Back to address 0]
L(>) [Loop marker]
<<< [Output the counter at address 0 as a number]
v((>)) [Increase the counter by 1]
>(^) [Goes to the space]
<< [Output the space]
>(>) [Back to 0]
B(>) [Done!]
Pure Bash, 34 + 1 = 35 bytes
Filename must be x; this is for extra one byte.
echo $[x++]
a=x
((x>${#a}00))||. x
AWK, 35 34 31 bytes
END{for(i;i<=0xA**2;)print i++}
-1 byte thanks to me
-3 bytes thanks to @cnamejj
PICO-8, 50 45 bytes
i=0-#"0"repeat i+=#"0"?i
until#tostr(i)>#"00"
-5 bytes by replacing print with its shorthand, ?.
Demo (50 byte version; 45 byte version has same output):
Rust, 41 40 39 35 bytes
Thanks to Redwolf for -1 byte, Unrelated String for -4
||for i in 0..b'e'{print!("{} ",i)}
39 bytes
||(0..b'e').all(|i|print!("{} ",i)==())
40 bytes
||(0..b'e').for_each(|i|print!("{} ",i))
C, 53 bytes
int main(a,b){for(;a^'f';a++){printf("%d\n",a-!!a);}}
43 42 bytes
(Thanks to Jo King♦)
k;main(){for(;k^'e';)printf("%d ",k++);}
ErrLess, 23 25 17 bytes
Thanks to Jo King for saving 8 bytes
0Z@#@'d<l+[.a?l-z
Explanation
0 { Add zero to the stack: (x) }
Z { Set a "checkpoint" to jump back to later }
@#@ { Output as number & Duplicate: (x x) }
'd< { x < d - true -> -1; false -> 0? (x x<d) }
l { Get the length of the top element (-1 for integers): (x x<d -1) }
+ { Add: (x [-2 or -1]) }
[ { Skip backwards that many instructions (skip forwards 1 or 2): (x) }
. { Halt }
a? { Push 10 and print (print newline) }
l- { Increment: (x--1) }
z { Go to "checkpoint" }
Python 3; 46 Bytes
x=True;a=x+x;b=a*a+x;print(*range(a*a*b*b+x))
Rust, 46 bytes
I did not see a rust solution, so here's my attempt:
||print!("{:?}",(0..b'e').collect::<Vec<_>>())
Thanks to @ovs for pointing out the closure variant.
The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.
The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).
Bash, 15
seq `dc<<<A0Kf`
- 1 byte saved, thanks to @manatwork.
Previous answer:
Pure Bash (no external utilities), 23
- 9 bytes saved thanks to @ArcticKona.
eval echo {0..$[++x]00}
Python 3 20 Bytes
print(*range(*b'e'))
How it works? Basically, doing *b'char' is equivalent to ord('char'), and in this case ord('e') is equal to 101 ;
Lets re-create the ord() function!
Ord Function Recreation (Not the answer! Just a demonstration on how ord() works)
ord=lambda x:(int(*bytes(x, 'ascii')))
As you can see it works! You can test this yourself here.
Python 3 25 Bytes
print(*range(0xa*0xa-~0))
How it works? 0xa = 10, ~0 = -1, -~0 = 1 (equivalent to -1*-1)
Labyrinth, 18 bytes
0) @
0 \(
)#":
(!
Push 101 () is increment and 0 is "append zero" command), and run "print stack height - 1, dup, decrement" until the top becomes zero.
Labyrinth, 19 bytes
0)
0
)}:!
" \
@({)
Keep track of two values a=0 and b=101, print a and increment and decrement b until b becomes zero.
!@#$%^&*()_+, 13 bytes
e($!#^$_^_
@)
Explaination:
e($!#^$_^_
@)
e Pushes 101 onto the stack
( While
$ Swap
!# Output number without popping and newline
^ Top of stack = Top of stack + 1
$ Swap
_^_ Top of stack = Top of stack - 1
<newline> Push 10
@ Output top of stack as ASCII and pop
) Close while
JavaScript (V8), 30 bytes
for(i=0;+!print(i)+'00'-i++;);
Jo king saves more bytes that I can count :)
JavaScript (V8), 52 39 bytes
for(i=0;!print(i)>=~-(''+i++).length;);
Thanks Jo king
Original version :
JavaScript (V8), 52 48 bytes
for(i=0;i<=(c=" ".length)*-~c*-~c;)print(i++)
Not the shortest by any margin
Explanation :
for(i = 0; // simple for loop
i <= (c=" ".length)*~-c*~-c;
// c = " ".length ---> 4
// * -~c * -~c ---> -~c => 5 => 4 * * 5 * 5 ==> 100
;)print(i++) ---> end for loop and print i, then increment by 1
Alternately :
JavaScript (V8), 47 bytes
_=>[...Array((c=" ".length)*-~c*-~c).keys()]
That prints up to 99 for 51 bytes,
_=>[...Array((c=" ".length)**~-~-c-c*c).keys()]
Prints upto 100 but byte count is 54.
Java 106 bytes
class p {public static void main(String[] args){int i='A'/'A';while(i<=(int)'d')System.out.println(i++);}}}}
MathGolf, 4 bytes
♀)rn
Outputs with newline delimiter.
Explanation:
♀ # Push 100
) # Increment it to 101
r # Pop and push a list in the range [0,101)
n # Pop and join it by newlines
# (after which the entire stack is output implicitly)
Wolfram Language (Mathematica), 15 14 11 bytes
=Range[0,LL
-1 byte from Imanton1
Mathematica interprets the = prefix as a call to Wolfram Alpha (auto-converting it to the orange glyph seen below), which in turn interprets "LL" as a Roman numeral for 100. I used "LL" because this doesn't work with the shorter "C".
Zig, 63 66 47 72 bytes
fn a()void{for(" "**'e')|_,i|{@import("std").debug.print("{d} ",.{i});}}
I've excluded the @import() boilerplate as it seems analogous to C's #include, which is excluded from other answers. If deemed necessary, I will add it back in.
Explanation
fn a() void {
for (" " ** 'e') |_, i| {
@import("std").debug.print("{d} ",.{i});
}
}
fn a() voidDeclare a function which takes no parameters and returns nothingfor () |_, i|For every item in the array inside of(), iterate and capture the entree as_(a throwaway variable) and the index asi" " ** 'e'Take the string (strings are slices, or pointer-arrays which know their length) and repeat it'e'(101) times**Requires a little bit more more explanation I think: In Zig, there is the concept of "comptime" (compile time) and runtime.**is an operator which repeats any array literal or slice literal at comptime, because the resulting length is still known to the compiler.@import("std").debug.print("",.{});Print to STDERR (I believe that's valid for this question, right?), the first argument is the formatting string, and the second is an "anonymous sctruct"/tuple with a variable number of arguments in it (Zig doesn't have var-args)."{d} "The format string. Zig denotes{}as the formatting characters, withdmeaning a digit in this case.
Befunge-93, 16 13 bytes
Thanks to @Cinaski for saving 3 bytes with \! instead of "ba"-.
:.\!+:"d"`#@_
Uses \! to NOT the 0 at the bottom of the stack and uses that to increment the loop, then tests if the counter is greater than d to end. Certainly not the shortest answer, but this is my first golf challenge, and I wanted to practice Befunge, which I decided to pick up yesterday. This is also my first time trying a stack-based language, and I'm having a lot of fun with it.
Shakespeare Programming Language, 218 bytes
,.Puck,.Ajax,.Act I:.Scene I:.[Exeunt][Enter Puck and Ajax]Puck:Open heart.You is the sum ofyou a cat.Ajax:You is twice the sum ofa big big cat a cat.Speak mind!You is the square ofyou.Is I nicer you?If notlet usAct I.
This is a golfed version based off of Dr Lemniscate's answer, with several non-trivial modifications, such as using only one Scene and not initialising characters. This also includes the character and program introduction section, which was neglected.
Explanation
,.Puck,.Ajax,.Act I:.Scene I:. # Introduce the characters and the play itself.
[Exeunt][Enter Puck and Ajax] # Enter the main characters
Puck: Open heart. # Print Ajax's value as a number
You is the sum ofyou a cat. # And increment it
Ajax: You is twice the sum ofa big big cat a cat. # Set Puck to 2*(8+2)=10
Speak mind! # Print as a character (a newline)
You is the square ofyou. # Square the value to 100
Is I nicer you? # Compare the value against Ajax's
If notlet usAct I. # And loop if the value is <= 100
C++ gcc, 36 bytes
main(){for(;_<'e';)cout<<_++<<'\n';}
Explanation : I globally initialized varible _ so its initial value is 0, now ascii value of e is 101 so I ran the loop till my variable _ is less than 'e', instead of incrementing it inside the for loop I used post increment while printing to save 1 byte
edit: I misread the question and thought 0 is also not allowed :)
Vim, 16 bytes
i0<Esc><C-a>s<C-r>=r <C-r>"0<C-r>")
Explanation:
i0<Esc> # Insert `0`
<C-a> # Increment
s # Delete into register " and Insert
<C-r>= # Start expression
r # Tab-autocomplete `range(`
<C-r>" # 1
0 # 0
<C-r>" # 1
) # Full expression is `range(101)`
# Insert the range [0..101)
Alternatively (and more interesting, imo):
Vim, 18 bytes
iYp<C-v><C-a>0<Esc>d^@=!0
00@-
Explanation:
iYp<C-v><C-a>0<Esc> # Insert `Yp<C-a>0`
d^ # Delete `Yp<C-a>`
@- # Execute `Yp<C-a>`... times
@=!0 # 1
00 # 00
///, 231 166 bytes
/\\\\\/\//\\\/\/\/\/\/\/\/\/\/\/\/\///\/\\\/\/\//\\\/\
\/\\\\\\\/\
\\\/\/\\\\\\\/\\\/\\\/\\\\\\\\\\\/\/\/\\\/\\\/\\\\\\\\\\\/\/\\\\\\\/\
\\\/\/\/\\\/\///\\\\\\\\\\\//
This was really fun to make.
Sadly, there is a single newline. Using a backslash instead breaks everything, and I don't really want to figure out where everything is and fix it.
Update: I remade it from the ground up, it is now much smaller, and works with only slashes. Unfortunately, the challenge specifies commas and whitespace seperators only, so only slashes is not allowed.
Slashes only:
///, 182 bytes
/\\\\\/\//\\\/\/\/\/\/\/\/\/\/\/\/\///\/\\\/\/\//\\\/\\\\\/\\\\\\\/\\\\\\\\\\\/\/\\\\\\\/\\\/\\\/\\\\\\\\\\\/\/\/\\\/\\\/\\\\\\\\\\\/\/\\\\\\\/\\\\\\\\\\\/\/\/\\\/\//\\/\\\\\\\\\\\//
Perl 5 (ppencode-compatible), 64 bytes
You didn't clarify that I must separate each with exactly one character, so here it is mine.
print length uc xor s qq q xor print while length ne ord qw q eq
Explained
# print(length) did not work for zero as $_ is not defined at then
print length uc xor
s qq q xor
# delimiter
print
while
# equals to: length ne 101
length ne ord qw q eq
javascript 77 bytes
let i=0;while(true){console.log(i);if(i.toString().includes('00'))break;i++;}
Pyth, 4 bytes
UC\e
Try it online!
Surprised myself by topping the previous Pyth's top score of 5 bytes.
Creates a range from 0-101 (char code of 'e' = 101)
Pxem, 21 20 bytes (filename) + 0 bytes (content) = 23 21 20 bytes, requires unprintable character.
- Filename (escaped unprintable):
\001.r.-.z.c.n,.o\001.+.ce.a - Content: empty.
With comments
XX.z
# push 1; push int(rand()*pop)
## NOTE rand() outputs 0<=n<1
## NOTE assuming NUL cannot be used for filename
.a\001.rXX.z
# while size<2 || pop!=pop; do
.a.zXX.z
# dup; print pop; push comma; putc pop
.a.c.n,.oXX.z
# push 1; push pop+pop; dup; push 101
.a\001.+.ce
# done
.a.a
Pxem, 3 bytes (filename) + 20 bytes (content) = 23 bytes, requires unprintable character.
- Filename:
e.e - Content (some unprintables are escaped):
.c.w\001.-.e.+.n .o.d.a
With comment
e.eXX.z # push 101; call content
.a
XX.z
# dup; while pop!=0; do
.a.c.wXX.z
# push 1; push abs(pop-pop); call content (* result of final stack will be pushed to original *)
.a\001.-.eXX.z
# push pop+pop; print pop; push space; print pop; return
.a.+.n .o.dXX.z
# done; (* implicit return *)
.a.a
Vim, 21 bytes
qqYP<C-x>qi0<esc><C-a>a00@q<esc>Yxx@0
Explanation
qq q Record macro q:
Y Yank the current line
P Paste a copy of it on the line above
<C-x> Decrement the number under the cursor
i0<esc> Insert a 0
<C-a> Increment it to 1
a00@q<esc> Append 00@q
Y Yank this line (100@q)
xx Delete the @q part
@0 Execute the yanked text as commands
(100@q executes the q macro 100 times)
Barrel, 9 bytes
#d(n+¶)n
Explanation:
# // as many times as...
d // ...the ASCII value of 'd' (100)...
( ) // Create a single of instruction for the loop
n // print the accumulator of a number
+ // increase the accumulator
¶ // print a newline
n // print the final number
The final n is necessary because the loop only prints the numbers 0 to 99.
I could've shaved off 2 bytes by doing #e(n+¶, which would have used the ASCII value of 'e' (101) and also utilized the self-closing properties of the () instruction, but I had already assigned e to be the value of the mathematical constant \$e\$.
K (oK), 4 bytes
Solution:
!"e"
Explanation:
Scrolling through the other solutions tells me I wasn't as novel as I hoped when I came up with this.
!"e" / the solution
"e" / ASCII 101
! / til (i.e. range 0..n-1
v³, 96 93 bytes
^+++(###....+###....+++<..#+...-....###+.@#+...$)+).>+++.$#+...^##=.+###.-#+....+)<++(-+##++>
Unwrapped:
^ + + +
( # # #
. . . .
+ # # #
. . . . + + + < . . # + . . . -
. . . . # # # + . @ # + . . . $
) + ) . > + + + . $ # + . . . ^
# # = . + # # # . - # + . . . .
+ ) < +
+ ( - +
# # + +
> . . .
I'm not able to provide a direct link, but here you should be able to fork the project and replace the script.txt with either of the above scripts.
Vim, 20 bytes
i0<esc><C-A>s<C-R>=range(<C-R>"0<C-R>")
Trying to improve on Razetime's answer, I stumbled upon the range function, which works wonders for this task. i<C-R>=range(101)\n would print the numbers we want, we just need to be a little creative to do it without 1.
Explanation
i0<esc><C-A>s<C-R>=range(<C-R>"0<C-R>")
i0<esc> Insert a single 0
<C-A> Increase it to a 1
s Cut the 1 and go back to insert mode
<C-R>= Write the result of the following function
range( ) A range of numbers from 0 to N-1
<C-R>" The last text that was deleted (1)
0 0
<C-R>" 1 again
GolfScript, 8/11 bytes
'e'{}/,`
Makes an array of values of e (101) elements, starting at 0, then formats with spaces. The format also has brackets at either end of the output, so it may not be valid. If not, they can be removed with 3 more bytes:
'e'{}/,' '*
CSASM v2.2.1.2, 143 bytes
func main:
.local a : obj
push 0
pop a
inc a
inc a
push a
inc a
inc a
inc a
push a
mul
dup
mul
pop a
lda 0
.lbl a
inc $a
push $a
dup
print.n
push a
sub
brtrue a
ret
end
Commented and ungolfed:
func main:
.local onehundred : obj
; Calculate 100
push 0
pop onehundred
inc onehundred
inc onehundred
push onehundred
; Stack: [ 2 ]
inc onehundred
inc onehundred
inc onehundred
push onehundred
; Stack: [ 2, 5 ]
mul
; Stack: [ 10 ]
dup
; Stack: [ 10, 10 ]
mul
; Stack: [ 100 ]
pop onehundred
lda 0
.lbl loop
; Print $a
inc $a
push $a
dup
print.n
; Zero is falsy. Check if $a - 100 == 0
push onehundred
sub
brtrue loop
ret
end
TeX, 57 bytes
\newcount~\loop\advance~`^^A\the~ \ifnum~<`^^%\repeat\bye
Makes uses of these two tricks:
- \$\rm\TeX\$'s preprocessor runs through the code and replaces any instance of two consecutive superscript (category code 7) characters followed by a character token, and adds/subtracts 64 from its ascii code, hence
^^AbecomesNUL. - \$\rm\TeX\$ has a `backtick notation' of inputting numbers that reads the following character's ascii code instead.
C++, 77 Bytes
#import<iostream>
main(){for(int i=0;i<=int('d');++i) std::cout<<i<<" ";}
Here, I've used the ASCII value and ran the loop and printed the value. Simple!
Haskell - 31 19 bytes
Edit: From 31 bytes to 19 bytes, thanks to @binarycat's suggestion of using fromEnum instead of ord, which requires the Data.Char package.
Are imports cheating?
l=[0..fromEnum 'd']
Explanation:
Convert 'd' into it's ASCII integer value using the fromEnum function, which gives 100 and generate a list from 0 to 100.
Forth, 26 bytes
char e 0 [do] [i] . [loop]
commented:
char e \ ascii value 101
0
[do] \ loop a fixed number of times
[i] \ retrieve the iterator value
. \ print the top of the stack as a number, followed by a space
[loop] \ end of loop
Forth, 30 bytes
char e false [do] [i] . [loop]
commented:
char e \ ascii value 101
false \ 0
[do] \ loop a fixed number of times
[i] \ retrieve the iterator value
. \ print the top of the stack as a number, followed by a space
[loop] \ end of loop
dc, 13 characters
Thanks to
- Daemon for reusing stack depth instead of getting it again, to use shorter operator (-1 character)
[zpdA0>x]dsxx
dc, 14 characters
Thanks to
- Digital Trauma for the twist in using the stack depth efficiently (-2 characters)
[zpzA0!<m]dsmx
dc, 16 characters
0[pz+dA0>i]dsixp
Sample run:
bash-5.0$ dc -e '0[pz+dA0>i]dsixp' | head
0
1
2
3
4
5
6
7
8
9
SHENZHEN I/O, 61 bytes, 7¥, 7 Lines
@not
@mov acc dat
@not
tgt acc dat
-mov acc p0
-add x0
slp x0
Outputs 0-100 as simple output, one per time unit. Makes use of the DX300 (XBus <-> Simple Input chip) and LC70G04 (NOT gate), which cost 1¥ each but do not use any power or count as lines of code (the game's measure of code length). These are used to generate a value of 1, which it adds and outputs until it hits 100. The value for 100 is generated using the "not" command, which makes the accumulator 100 if it is value 0, otherwise it sets the acc to 0.
(Not pictured: conversion from simple output to the screen's XBus input, for the visualization.)
SHENZHEN I/O (MCxxxx ASM only), 129 bytes, 8¥, 16 Lines
@not | not
@mov acc p0 | mul acc
@mov acc dat | dgt 0
@not | sub p0
add p0 | dgt 0
tgt acc dat | mul acc
-mov acc x0 | mov acc p0
slp p0 | slx x0
Outputs 0-100 as one XBus output each. Uses only programmable MCxxxx chips, no logic gates or other components. Generates value 1 in a pretty interesting way:
not # acc = 100
mul acc # 100 * 100 = 999 (max value)
dgt 0 # digit 0 of 999 = 9
sub p0 # 9 - 100 = -91
dgt 0 # digit 0 of -91 = -1
mul acc # -1 * -1 = 1
Japt, 2 bytes
Lò
This outputs a list of numbers from 0 to 100 separated by commas.
How it works
Lò
L -Number 100
ò -Creates an inclusive range from 0 to L, and return it in the output
Arn -h, 2 bytes
PS. You need to hand-type that flag because the permalink for flags is not working.
0|
Explained
0 # 0
| # concatenated with
# (implicit) the range [1 .. 100]
Implicit output
Factor, 46 23 bytes
-23 bytes thanks to Bubbler
0xa sq [0,b] [ . ] each
I've never written anything in Factor before, but it's a surprisingly fun language.
BASIC, 32 27 bytes
for a=0 to asc("d"):?a:next
while(a<asc("e")):?a:a=a+!0:wend
Of course, a FOR loop is shorter than using WHILE. Thanks Lars for your example.
My earlier (apparently invalid) attempt, which got downvoted for not stopping at 100:
0 ?a:a=a+!0:goto 0
I'll leave it here for completeness - only 18 bytes though.
Now this is not going to beat some volcano in New Zealand either... that said, it would work on 8-bit computers where the entire language interpreter was on a ROM that might be 2-16 KILObytes for the whole thing. Every bytes counted (like code golf) - there certainly wasn't space to add topographical data for the developer's favourite mountain range. 😂
Atari 600XL, 22 bytes
Sorry I overread that it's not allowed to use the characters 1-9.
I think it is really stupid to say my language can this is a shorter way, because every language today contains more than a bunch of foreign frameworks. IMHO this "bytes" should be added to the real bytes you need to print values from 0 to 100 on the screen. Therefore a good old Atari 600XL with 16kib of RAM only need: 22 bytes. No other Software is need everything is build in.
Switch the hardware on, wait 2-3sec and type: f.a=0toasc("d"):?a:n.a
'f.' is an allowed shortcut for 'for' and 'n.' is a shortcut for 'next'
Maybe the C64 need also such less bytes.
Everything else need megabytes of extra hidden bytes.
JM2C
Wolfram Language (Mathematica), 20 bytes
The only real golfing opportunity for this question in the Wolfram language is to encode the number 100 with as few bytes as possible. There is only one real-valued constant symbol in the Wolfram language with a one byte name, namely E.
I thus looked for combinations of binary operations that were near 100. (E+E)^E is about 99.73, so adding E/E will give a suitable endpoint.
Range[0,(E+E)^E+E/E]
JavaScript Browser, 37 characters
alert([...Array(0xB0F-0xAAA).keys()])
But Arnaulds(https://codegolf.stackexchange.com/users/58563/arnauld) idea would be the faster way for browser js too (28)
for(n=0;n+n<0xCA;)alert(n++)
Japt, 2 bytes
òL
Calls the function ò on the variable U with the variable L as an argument. U is 0 when the program has no input, L is 100 whenever a program starts, and the function ò returns the inclusive range from "this" (U) to its first argument (L).
Also valid:
Lò
Calls the function ò on the variable L with no arguments. With no arguments ò returns the inclusive range from 0 to "this". This one ignores input, rather than requiring no input.
MATLAB, 13 bytes
0:double('d')
The ASCII code for lowercase d is 100, so convert to a double and go from 0 in intervals of 1 with ":"
Whitespace, 58 bytes
Another in the theme of "this language doesn't even care about digit characters".
The program with comments:
[Push 0
][Label
][Dup
][PrintNum
][Push 10
][PrintChar
][Push 1
][Add ][Dup
][Push 101
][Subtract ][JmpNeg
]
AWK, 26 bytes
{for(;a<=0xa*0xa;)$a=a++}a
Thanks to xnor for pointing out a brainfart (since fixed) in the original
This works by using 0xa*0xa to compute 100, then assigns each positional variable to it's own sequential number. Then the a without a code block (evaluates as truthy since a is 100) prints all the positional arguments separated by a space.
To be honest, I'm not 100% sure why the 0 prints but it does. :)
Jelly, 2 bytes
³Ż
Outputs a list. If the separator must be a single character, 3 bytes
How it works
³ŻK - Main link. Takes no arguments
³ - Yield 100
Ż - Range from 0 to 100
K - Join by spaces (optional)
SimpleTemplate 0.84, 45 bytes
This was fun, but quite difficult.
The code outputs all numbers from 0 to 100, with a trailing newline:
{@setC 0}{@for_ from" "to"m"}{@echolC}{@incC}
Due to bugs in the compiler, the tab character (inside {@for_ from" "to"m"}) MUST be a real tab.
Ungolfed
This version should be easier to read, despite being functionally the same:
{@set counter 0}
{@for i from " " to "m"}
{@echo counter, EOL}
{@inc counter}
{@/}
Closing the {@for [...]} is optional, but left here for the cleanest code possible.
You can try this on https://ideone.com/tLsDFn
Java (JDK), 71 bytes
v->java.util.stream.IntStream.range(0,'e').forEach(System.out::println)
PHP, 30 bytes
First time golfing, I hope I posted this right!
while($q<ord(e))echo+$q++,' ';
Thanks to manatwork and Dewi Morgan's suggestions to improving the code! From 34 to 30 bytes!
The code revisions are in the edit history, removed here so it looks cleaner!
T-SQL, 65 64 bytes
SELECT number FROM spt_values WHERE number<ASCII('e')AND'P'=type
The master database on any SQL server contains a system table called spt_values that (among other things) contain the numbers 0 to 2047. To cap the output I used ASCII('e'), which is 101.
Let me know if you know of a shorter way to generate the number 100 or 101.
Wolfram Language (Mathematica), 29 bytes
included more for the amusing built-in than the byte count, though this would be something like 9 bytes in the hypothetical mthmca golfing language.
Range[0,FromRomanNumeral@"C"]
And similar, but longer
Range[0, Interpreter["SemanticNumber"]@"hundred"]
Python 3, 96 bytes
import sys
n=0xb%0xa;m=0xa*0xa;p=lambda x:m if x>m else sys.stdout.write(str(x)+",")&p(x+n);p(n)
PHP, 29 bytes
<?=join(',',range(0,ord(d)));
Explanation
ord(d) // return integer value of ASCII character 'd'
range // create array from A to B, inclusive
join // glue array values together using comma as separator
<?= // output
Lua (34 30 bytes)
for i=0,0xA*0xA do print(i)end
Rattle, 14 bytes
i+R`c0c0$[+i]~
Explanation
i prints the value at the top of the stack (0)
+ adds 1 to the value on top of the stack (which was 0, is now 1.0)
R` reformats the top of the stack with the arg ` (the value at the top of the stack).
since ` = 1, it reformats the top of the stack as the integer 1
c0c0 concatenates the value in storage at the current pointer (=0) to the top of the
stack twice, resulting in "100"
$ swaps the value on top of the stack (100) with the value in storage at the
current pointer (0)
[ .... ]~ loop structure: loops ~ times, where ~ = value_in_storage_at_pointer = 100
+ adds one to the value on top of the stack
i prints the top of the stack as an integer
Note: the above code is based on version 1.0.* of Rattle. With the newest update (1.1.0), the code could be shortened to the following snippet (12 bytes) because the addition operator will now keep the top of the stack the same type (in this case, an integer) if possible.
i+c0c0$[+i]~
K (ngn/k), 6 bytes
!0+"e"
Uses 0+ to convert "e" to an integer, then takes the range from 0 up to, but not including, that value (101).
Alice, 17 bytes
aa*r\
@Q
&d\
O
Explanation:
a Push 10
a Push 10
* Pop x. Pop y. Push x * y
r Pop n. Push all integers from 0 to n, inclusive
\ Switch to Ordinal mode. Redirect command flow to the southeast
Command flow hits the boundary of the grid and is reflected to the southwest
Q Reverse the order of the stack
\ Switch to Cardinal mode. Redirect command flow to the west
d Push the number of elements currently on the stack
& Pop n. Add n to the iterator queue
Command flow hits the boundary of the grid and wraps
\ Switch to Ordinal mode. Redirect command flow to the southwest
O Pop s. Print s as a string followed by a newline
(Gets executed the number of times stored on the top of the iterator queue)
Command flow hits the boundary of the grid and reflects to the northwest
& Pop s. Add s to the iterator queue
(Everything between here and the end of the program is just the command flow
bouncing around until it reaches the @)
Command flow hits the boundary of the grid and reflects to the northeast
* Pop b. Pop a. Push the concatenation of a and b
(Executes 0 times because & added an empty string to the iterator queue)
Command flow hits the boundary of the grid and reflects to the southeast
Q Reverse the order of the stack
Command flow hits the boundary of the grid and reflects to the southwest
Command flow hits the boundary of the grid and reflects to the northwest
\ Switch to Cardinal mode. Redirect command flow to the south
Command flow hits the boundary of the grid and wraps
* Pop x. Pop y. Push x * y
@ Terminate the program
Zsh, 16 bytes
echo {0..$[##d]}
Only builtins, so no seq
For fun, here's a 17 byte answer without 0:
echo {$?..$[##d]}
Also $! or $# will work as 0 replacements.
Befunge-98 (FBBI), 13 11 bytes
.0!+::'e%j@
-1 byte thanks to @ovs
-1 byte thanks to @PizgenalFilegav
Charcoal, 7 5 bytes
IE℅eι
Try it online! Link is to verbose version of code. Explanation:
e Literal string `e`
℅ ASCII code i.e. 101
E Map over implicit range
ι Current value
I Cast to string
Implicitly print
BRASCA, 9 bytes
Hr,n[lon]
Explanation
Hr - Push range(0,100)
, - Reverse stack
n - Print the 0
[ ] - While not zero:
lon - Print a newline and the next number
brainfuck, 138 bytes
>>++++++++++<<++++++[>>>++++++++<<<-]++++++[>>>>++++++++<<<<-]++++++++++>++++++++++<[>[>>.>.+<<.<-]++++++++++>>>----------<+<<<-]>>>>+.-..
No numbers is pretty easy, but the golf size is not great... :)
I am sure it can be improved, I am really a beginner in using Brainfuck. I wanted to try it anyway.
How it works:
>>++++++++++<< LF Char (idx2)
++++++[>>>++++++++<<<-] Zero char tens (idx3)
++++++[>>>>++++++++<<<<-] Zero char unit (idx4)
+++++ +++++ 10 counter (tens)
>+++++ +++++< 10 counter (unit)
[> Move to the counter
[>>. Print the tens
>.+ Print the unit and increment
<<. Print the LF
<-] Loop 10 times
+++++ +++++ Restore the counter
>>>----- ----- Restore the digit
<+ Increment the tens char
<<<-] Loop everything 10 times
>>>>+.-.. Print 100 using a cell which is already at char 0
Deadfish~, 2071 / 8 / 7 bytes
2071 bytes
o{i}c{d}io{i}dc{d}iio{i}ddc{d}iiio{i}dddcddddddoiiiiiicdddddoiiiiicddddoiiiicdddoiiicddoiicdoicociodciioddciiiodddciiiioddddciiiiiodddddciiiiiioddddddc{i}dddo{d}iiic{i}ddo{d}iic{i}do{d}ic{i}o{d}c{i}io{d}dc{i}iio{d}ddc{i}iiio{d}dddc{i}iiiio{d}ddddc{i}iiiiio{d}dddddc{i}iiiiiio{d}ddddddc{i}{i}dddo{d}{d}iiic{i}{i}ddo{d}{d}iic{i}{i}do{d}{d}ic{i}{i}o{d}{d}c{i}{i}io{d}{d}dc{i}{i}iio{d}{d}ddc{i}{i}iiio{d}{d}dddc{i}{i}iiiio{d}{d}ddddc{i}{i}iiiiio{d}{d}dddddc{i}{i}iiiiiio{d}{d}ddddddc{i}{i}{i}dddo{d}{d}{d}iiic{i}{i}{i}ddo{d}{d}{d}iic{i}{i}{i}do{d}{d}{d}ic{i}{i}{i}o{d}{d}{d}c{i}{i}{i}io{d}{d}{d}dc{i}{i}{i}iio{d}{d}{d}ddc{i}{i}{i}iiio{d}{d}{d}dddc{i}{i}{i}iiiio{d}{d}{d}ddddc{i}{i}{i}iiiiio{d}{d}{d}dddddc{i}{i}{i}iiiiiio{d}{d}{d}ddddddc{{i}dddddd}dddo{{d}iiiiii}iiic{{i}dddddd}ddo{{d}iiiiii}iic{{i}dddddd}do{{d}iiiiii}ic{{i}dddddd}o{{d}iiiiii}c{{i}dddddd}io{{d}iiiiii}dc{{i}dddddd}iio{{d}iiiiii}ddc{{i}dddddd}iiio{{d}iiiiii}dddc{{i}dddddd}iiiio{{d}iiiiii}ddddc{{i}dddddd}iiiiio{{d}iiiiii}dddddc{{i}dddddd}iiiiiio{{d}iiiiii}ddddddc{{i}ddddd}dddo{{d}iiiii}iiic{{i}ddddd}ddo{{d}iiiii}iic{{i}ddddd}do{{d}iiiii}ic{{i}ddddd}o{{d}iiiii}c{{i}ddddd}io{{d}iiiii}dc{{i}ddddd}iio{{d}iiiii}ddc{{i}ddddd}iiio{{d}iiiii}dddc{{i}ddddd}iiiio{{d}iiiii}ddddc{{i}ddddd}iiiiio{{d}iiiii}dddddc{{i}ddddd}iiiiiio{{d}iiiii}ddddddc{{i}dddd}dddo{{d}iiii}iiic{{i}dddd}ddo{{d}iiii}iic{{i}dddd}do{{d}iiii}ic{{i}dddd}o{{d}iiii}c{{i}dddd}io{{d}iiii}dc{{i}dddd}iio{{d}iiii}ddc{{i}dddd}iiio{{d}iiii}dddc{{i}dddd}iiiio{{d}iiii}ddddc{{i}dddd}iiiiio{{d}iiii}dddddc{{i}dddd}iiiiiio{{d}iiii}ddddddc{{i}ddd}dddo{{d}iii}iiic{{i}ddd}ddo{{d}iii}iic{{i}ddd}do{{d}iii}ic{{i}ddd}o{{d}iii}c{{i}ddd}io{{d}iii}dc{{i}ddd}iio{{d}iii}ddc{{i}ddd}iiio{{d}iii}dddc{{i}ddd}iiiio{{d}iii}ddddc{{i}ddd}iiiiio{{d}iii}dddddc{{i}ddd}iiiiiio{{d}iii}ddddddc{{i}dd}dddo{{d}ii}iiic{{i}dd}ddo{{d}ii}iic{{i}dd}do{{d}ii}ic{{i}dd}o{{d}ii}c{{i}dd}io{{d}ii}dc{{i}dd}iio{{d}ii}ddc{{i}dd}iiio{{d}ii}dddc{{i}dd}iiiio{{d}ii}ddddc{{i}dd}iiiiio{{d}ii}dddddc{{i}dd}iiiiiio{{d}ii}ddddddc{{i}d}dddo{{d}i}iiic{{i}d}ddo{{d}i}iic{{i}d}do{{d}i}ic{{i}d}o{{d}i}c
8 bytes (if you consider Hello, world! a valid separator)
o{{iow}}
7 bytes (If you don't care about seperators)
o{{io}}
Never thought I'd see deadfish be shorter than, well, anything except Unary.
C (gcc), 38 bytes
f(i){for(i=0;printf("%d ",i++)&'#';);}
Without using digit 0, it would be 39 bytes: i;main(){for(;printf("%d ",i++)&'#';);}
F# (.NET Core), 35 bytes
Seq.iter(printfn"%A"){0..(int 'd')}
(Too bad it wasn't only to 99, could have gotten rid of the Seq.iter due to printing truncation...)
Vyxal, jH, 1 byte
ʀ
Flags for the win. The H flag presets the stack to 100, generate range 0 to 100 and then j flag joins on newlines. The flag was around before this challenge too.
Retina 0.8.2, 33 26 24 bytes
,,
,,,,,,
,
,,,,,
$.`
Try it online! Explanation: The first stage inserts two commas, which the second stage increases to 20 (it's complicated). The third stage multiplies by 5 to give 100. The last stage then inserts the number of commas so far at each position.
R, 11 bytes
F:(0xA*0xA)
F:0xA^(T+T)
Uses this tip.
Still being beaten by some volcano in New Zealand, though...
Old answer:
R, 16 bytes
F:paste0(+T,0,0)
Thanks to Kirill L. for correcting an error.
R's ASCII=>byte function is utf8ToInt, which unfortunately has an 8 in it. Luckily, : will attempt to coerce its arguments to numeric types, so we construct 100 by pasting together +F (which coerces its value to 0) and two 0s. This would also work, though longer, without a 0 as F:paste(+T,+F,+F,sep="").
Possibly there's a very short builtin dataset with a sum that's close to 100, though I haven't been able to find one.
R, 9 bytes
F:volcano
The sequence operator : coerces its arguments to integers. F is the boolean FALSE, which gets coerced to 0. volcano is one of the many built-in datasets (it gives topographic information about Maunga Whau in New Zealand); since it is a matrix, : fetches the value at position [1, 1] which is luckily equal to 100. The code is therefore equivalent to 0:100.
This answer was inspired by a conversation with Giuseppe and Kirill L. in the comments under Giuseppe's R answer.
Pyth, 9, 8, 5 bytes
@hakr46's solution
Uh*TT
original:
U+*TT^Z
Outputs a list. If the separator must be a single character, 11 bytes 6 bytes
My first golf. Pretty happy about it! Makes use of the fact that anything to the power of 0 is 1.
-3/5 bytes thanks to @hakr46 :D
Raku, 10 bytes
put 0..Ⅽ
Ⅽ here is the Unicode character ROMAN NUMERAL ONE HUNDRED.
Any other Unicode character with a defined value of 100 could be used:
௱: TAMIL NUMBER ONE HUNDRED
൱: MALAYALAM NUMBER ONE HUNDRED
፻: ETHIOPIC NUMBER HUNDRED
ⅽ: SMALL ROMAN NUMERAL ONE HUNDRED
佰: CJK UNIFIED IDEOGRAPH-4F70
百: CJK UNIFIED IDEOGRAPH-767E
陌: CJK UNIFIED IDEOGRAPH-964C
All are three UTF-8 bytes long, like Ⅽ.
05AB1E, 2 bytes
тÝ
Outputs a list. If the separator must be a single character, 3 bytes
How it works
тÝ» - Full program
т - Push 100
Ý - Range from 0 to 100
» - Join with newlines (optional)
Husk, 4 bytes
ŀc'e
Surprised Husk doesn't have a builtin for 100.
How it works
ŀc'e - Main function, no arguments
'e - Character literal "e"
c - Convert to charcode; 101
ŀ - Lowered range; [0, 1, ..., 100]
CJam, 6 bytes
'ei,:p
How it works
'e e# Push character "e" (which has code point 101)
i e# Convert to integer. Gives 101
, e# Range (non-inclusive, starting at 0). Gives [0 1 2 ... 100]
:p e# For each entry: print with newline
Batch, 56 bytes
@set/ax=0xb-0xa
@for /l %%b in (0,%x%,%x%00)do @echo %%b
-61 bytes for @Neil
Clojure, 24 bytes
(apply pr(range(int\e)))
If it is acceptable that output is wrapped in parentheses, then we can remove apply for -6 bytes.
JavaScript (V8), 28 bytes
We cannot write \$100\$ or \$101\$ in hexadecimal with 0's and letters only (0x64 and 0x65 respectively), but we can write \$202\$ (0xCA) and use \$2n<202\$ as the condition of the for loop.
for(n=0;n+n<0xCA;)print(n++)
30 bytes
This version computes \$10^2\$ with the hexadecimal representation of \$10\$.
for(n=0;n<=0xA*0xA;)print(n++)
31 bytes
This version builds the string "100".
for(n=0;n<=-~0+'00';)print(n++)
jq, 20 characters
range("e"|explode[])
Sample run:
bash-5.0$ jq -n 'range("e"|explode[])' | head
0
1
2
3
4
5
6
7
8
9
Python 3: 27 23 20 Bytes
Thanks to caird coinheringaahing for -4 bytes, ovs for -3 bytes
print(*range(*b'e'))
I'm pretty poor at golfing, so there's probably a better way to do this.
Javascript (Browser), 53 46 37 33 bytes
for(n=0;++n<+atob`MTAx`;)alert(n)
-15 bytes thanks to @EliteDaMyth
VBScript, 33 bytes
for i=0 to asc("d")
msgbox i
Next
Competitive answer in VBScript!
Python 3, 33 bytes
for x in range(ord("e")):print(x)
Powershell, 18 bytes
0..[byte][char]'d'










