Skip to main content
+= explaining one bit or two...
Source Link
user19214
user19214

DC, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

Unrolled:

[   # start string constant
z   # push stack length (0 on 1st cycle)
z   # push stack length (1 on 1st cycle)
p   # print top of stack
A>L # if 10(decimal) < tos: execute L
]   # end string constant, push it
d   # duplicate the string
sL  # store a copy in L
x   # execute tos (which is the other string copy)

One of the z (push stack length) operations has no corresponding operation which takes it from the stack. This way the stack grows with each iteration by one. This is abused as the loop counter.

This loop starts with an empty stack, so the 1st z pushes 0 in the 1st iteration so the printing happens after the 2nd z which correspond to duplicating the result of 1+d in the version below. This way the comparison needs to test for bigger than 10 here instead of bigger than 11 below.


DC, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

Unrolled:

1   # push 1
[   # start string constant
p   # print top of stack
1+  # add 1 to tos
d   # push tos (duplicate)
B>L # if 11(decimal) < tos: execute L
]   # end string constant, push it
d   # duplicate the string
sL  # store a copy in L
x   # execute tos (which is the other string copy)

DC, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

DC, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

DC, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

Unrolled:

[   # start string constant
z   # push stack length (0 on 1st cycle)
z   # push stack length (1 on 1st cycle)
p   # print top of stack
A>L # if 10(decimal) < tos: execute L
]   # end string constant, push it
d   # duplicate the string
sL  # store a copy in L
x   # execute tos (which is the other string copy)

One of the z (push stack length) operations has no corresponding operation which takes it from the stack. This way the stack grows with each iteration by one. This is abused as the loop counter.

This loop starts with an empty stack, so the 1st z pushes 0 in the 1st iteration so the printing happens after the 2nd z which correspond to duplicating the result of 1+d in the version below. This way the comparison needs to test for bigger than 10 here instead of bigger than 11 below.


DC, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

Unrolled:

1   # push 1
[   # start string constant
p   # print top of stack
1+  # add 1 to tos
d   # push tos (duplicate)
B>L # if 11(decimal) < tos: execute L
]   # end string constant, push it
d   # duplicate the string
sL  # store a copy in L
x   # execute tos (which is the other string copy)
added 88 characters in body
Source Link
user19214
user19214

dcDC, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

dcDC, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

dc, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

dc, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

DC, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

DC, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx
I'm mean... and I like it!
Source Link
user19214
user19214

dc, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

dc, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

dc, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx

dc, 12 bytes

...a little bit mean now...

[zzpA>L]dsLx

dc, 14 bytes

Just straight forward...

1[p1+dB>L]dsLx
Source Link
user19214
user19214
Loading