16
votes
Reverse the polyglot, change the language
JavaScript, HTML, 68 bytes
HTML
JavaScript
Normal
<!---->HTML<!--!<tpircSavaJ>--
alert`JavaScript`//`LMTH`trela
<!--!<
...
16
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
05AB1E, 3 bytes
?R\
?R\ - Try it online.
\R? - .enilno ti yrT
...
15
votes
Repeat your program to print Fibonacci numbers
R, 12 bytes, no header/footer
+(F=+T)->T;F
Try it once online!
Try it twice
Try it three times
Try it five times
Try it \$n\$ times
Right-hand assignment ...
14
votes
Reverse the polyglot, change the language
Python + ><>, 49 bytes
#o<"><>"
print("python")#)"><>"(tnirp
"nohtyp"<o#
Try it:
Python
...
14
votes
Repeat your program to print Fibonacci numbers
Piet + ascii-piet, 19 bytes (12×4=48 codels)
_TLDJdAaAQIbcr_cc _
Try Piet online!
Try Piet online! (x6)
...
13
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
Charcoal, 3 bytes
θ⮌ω
Try it online! Reversed:
ω⮌θ
Try it online! Palindromised:
θ⮌ωω⮌θ
...
13
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
JavaScript, 70 bytes
(x=>x.at?x:y=>y+z(y))//)y+)y(z>=y:``nioj.)(esrever.]x...[?ta.x>=x=z(
Try it online!
12
votes
11
votes
Reverse the polyglot, change the language
05AB1E and Y, 15 bytes
"Y"gxg"E1BA50"R
Try it online in 05AB1E.
Try it online in Y (you'll have to copy-paste ...
11
votes
Repeat your program to print Fibonacci numbers
Python, 34 bytes
a='x';b=''
print(end=a);a,b=b,a+b#
Attempt This Online!
Outputs in unary.
How?
Streamlined version of OP's example code
11
votes
Repeat your program to print Fibonacci numbers
Thunno 2, 4 bytes (no header/footer)
Ɓ+1|
Try it online!
2x
3x
Nx
Explanation
...
10
votes
Repeat your program to print Fibonacci numbers
Itr, 5 4 bytes (no header or footer)
â+1w
online interpreter
2x
3x
Nx
(uses F operator to repeat sequence input number of times)
...
10
votes
Repeat your program to print Fibonacci numbers
T-SQL 171 160 159 bytes (no header or footer)
-1 byte thanks to @MickyT
...
10
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
Python, 51 bytes
-2 bytes, thanks to tsh
-2 bytes, thanks to Jakque
s=input()#)]1-::[s=dne(tnirp
print(end=s)#)(tupni=s
Attempt This Online!
Python, 55 bytes
<...
9
votes
Reverse the polyglot, change the language
Python + Javascript(Node.js) 150 bytes
Uses the differences between javascript objects and python dicts to change code passed to eval in both languages. Uses both ...
8
votes
8
votes
Repeat your program to print Fibonacci numbers
Cascade, 6 bytes
#|
\?
Try it online! (prints 0)
Try it online!Try it online!Try it online! (prints ...
8
votes
Repeat your program to print Fibonacci numbers
Piet + ascii-piet, 53 bytes (15×7=105 codels), no header/footer
ttlddtN ub?fnNssSkKCVrTtTLcfkdtlElt?l??T lL sdD S??
Program as picture:
Output in unary.
Try ...
7
votes
Reverse the polyglot, change the language
PHP Perl 4 or 5, 45 43 41 bytes
print-true?php:perl;#;php:lrep?eurt-tnirp
Try it online PHP
Try it online Perl
A simple take at it, I assumed it was not mandatory ...
7
votes
Repeat your program to print Fibonacci numbers
05AB1E, 4 bytes (no header/footer)
¼¾Åf
Try it online or verify the first ten iterations.
Explanation:
...
7
votes
Repeat your program to print Fibonacci numbers
C (gcc), 84 bytes (no header/footer)
t
#ifndef A
,b;main(a){
#define At
#define A printf("%d",a);}
#endif
t=a;a=a+b;b=t;A
Try it online!
This really ...
7
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
Vyxal, 3 bytes
₴Ḃ_
Try!
!yrT
Try!!yrT
!yrTTry!
+1 very hard
You uh sure about that?
Explained
...
6
votes
6
votes
Repeat your program to print Fibonacci numbers
Ruby, 26 21 bytes
[a=$.+$.=a||1];p *[a]
Try it online!
Thanks Value Ink, Jo King and Sisyphus for the improvements.
In short
When it's repeated, it will just ...
6
votes
Repeat your program to print Fibonacci numbers
Brain-Flak, 16 bytes
(()[[]]({})<>{})
Try it online!
...
6
votes
Repeat your program to print Fibonacci numbers
Uiua, 89 36 25 19 bytes, no header/footer/tag
:try(+,e)(1 0;)
e=
Try it online!
Try it online!Try it online!
Try it online!Try ...
6
votes
I (rev)?(pal)? the source code, you (rev)?(pal)? the input!
R, 92 88 86 bytes
Edit: -2 bytes thanks to Jakque's comment
x=utf8ToInt(scan(,''))#)))x(ver(8ftUoTtni(tac
cat(intToUtf8(x))#))'',(nacs(tnIoT8ftu=x
Attempt This ...
5
votes
Repeat your program to print Fibonacci numbers
Ruby, 29 23 bytes
Dug around for a bit until I found this magical function called at_exit/END that could be used to ensure the ...
5
votes
Repeat your program to print Fibonacci numbers
Vyxal, no headers, no footers, just 3 bytes
!∆f
Try it Online!
or a test suite of the first 1 to 9 repetitions
Hello to everyone who ports this in another stack ...
5
votes
Repeat your program to print Fibonacci numbers
Nekomata, 4 bytes (no header/footer)
ˣ+1I
Attempt This Online!
Attempt This Online!×2
Attempt This Online!×3
Attempt This Online!×4
A port of @The Thonnu's ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
source-layout × 189code-golf × 118
code-challenge × 48
string × 36
quine × 27
restricted-source × 18
printable-ascii × 14
cops-and-robbers × 13
kolmogorov-complexity × 11
popularity-contest × 10
hello-world × 9
radiation-hardening × 8
number × 7
permutations × 6
math × 5
integer × 5
primes × 5
whitespace × 5
decision-problem × 4
palindrome × 4
multiple-holes × 4
self-scoring × 4
matrix × 3
polyglot × 3
code-bowling × 3