New answers tagged

1

Ruby, 123 + 4247 94 90 + 2124 bytes Heredoc abuse. Takes 49 different alphanumerics (A-Z, _, a-v) and constructs 2 programs that print the text using the appropriate heredoc. That's only 98 programs, though, so it adds one more print at the end. Each program is 3 lines long, except the last one. This beats IMP1's Ruby solution in the combined code golf ...


2

Perl 6, 75 bytes, 2178 + 75 = 2253 unique("'I love you'.tclc.say",{S:x(8)[\w]~^=' 'x 2.rand}...*)[^99+1]>>.say Try it online! Outputs variants of: 'I love you'.tclc.say string part has a randomised unique case. tclc is short for "title case, lowercase", which capitalises the first letter and lowercases the rest. "..." # Starting from the ...


2

PowerShell, 63 + 3167 = 3230 1..99|%{$z=$_%10;"''+(echo you $($_-$z)/10) love $z I)[4,2,0]"} Try it online! Sample output: ''+(echo you 0 love 1 I)[4,2,0] ''+(echo you 0 love 2 I)[4,2,0] ... ''+(echo you 1 love 0 I)[4,2,0] ''+(echo you 1 love 1 I)[4,2,0] ''+(echo you 1 love 2 I)[4,2,0] ... ''+(echo you 9 love 8 I)[4,2,0] ''+(echo you 9 love 9 I)[4,2,0] ...


1

PowerShell, 85 + 2647 = 2732 83 + 2251 = 2334 79 + 1818 = 1897 0..226|?{[char]::isletterordigit($_)}|%{"`$$([char]$_)"}|%{"($_='I love you')"} -398 thanks to mazzy Try it online! Sample output: ($0='I love you') ... ($â='I love you') Try it online!


1

C# (Visual C# Interactive Compiler), 70 bytes for(char i='ÿ';i++<355;Write($"var {i}=\"I love you\";Write({i});")); Try it online!


1

W n d, 34 bytes Different programs are separated as different list items. The n flag joins the input with newlines. ÷u⒀`⊂!=¶ȷl⑨G⒄⒁Ï←e≥/.⑧⟱{ëcÏ⑫)ŠȘk0ⁿF Uncompressed 99''a146+C"C'"a73+C"C-C@ love you@+"++++M Explanation 99 M % Map in the range from 1 to 99 '' % A single quote ' ...


6

Batch, 131 + 3564 bytes @for %%a in (a b c d e f g h i j k)do @for %%b in (. / \ "," ";" [ ] + "=")do @echo @for %%%%%%a in (love)do @echo%%~bI %%%%%%a you This produces 99 variants of the same code: @for %%k in (love)do @echo=I %%k you The for variable (here k) loops over the 11 values a to k, while the other character that changes is the separator ...


9

Whitespace, 718 bytes, score: 34180 (33462+718) [S S S T N _Push_1][S S S N _Push_n=0][T T S _Store_1:n][N S S S N _Create_Label_LOOP][S S S T N _Push_1][S N S _Dupe_1][T T T _Retrieve_1:n][T S S S _Add][S N S _Dupe_n+1][S S S T T S S T S S N _Push_100][T S S T _Subtract][N T S T T N _If_0_Jump_to_Label_EXIT_WITH_PRINT][S S ...


1

R, 84 Bytes for(x in 1:99){cat("assign(intToUtf8(",x,"),'I love you');get(intToUtf8(",x,"))\n")}


3

Ruby, 200 181 172 165 + 3992 3828 3540 bytes m="I love you";q=?",?';%w[print $><< puts].map{|e|q.product(q){|c,d|8.times{|i|puts e+c+"#{m.chars.rotate(~i)*""}#{c}.chars.rotate(#{i+1})*#{d*2}"}};puts e+"'#{m}'"} This combines different ways of printing (print, $stdout <<, puts), different ways of quoting the string ('', ""), and different ...


4

05AB1E, 23 bytes (combined score 1688 bytes) тGN"•«À¢ÒÙΓʒγ•"тN-…O₃BJ Try it online! or try one of the output programs. тG # for N from 1 to 99: N # N "•«À¢ÒÙΓʒγ•" # string "•«À¢ÒÙΓʒγ•" тN- # 100 - N …O₃B # "O₃B" J # join the entire ...


5

C (clang), 87 \$\cdots\$ 160 120 bytes Output: 3822 bytes (Total: 3942 bytes) i;main(j){for(;i<99;printf("main(){printf(\"%%c Love You\",%d^%d);}\n",j,j^73))j=3+i++*4,j=strchr("$,2MOPW]_",i)?6*j:j;} Try it online! Fixed pristine-errors kindly pointed out by Expired Data. Fixed pristine-errors kindly pointed out by Kaddath. Saved 50 bytes thanks to ...


4

PHP, 96 bytes Output: 2516 bytes (total 2612) <?php for(;($i+=2)<773;)if($i<99||--$i%100>67&&$i>299)echo"I<?=chr(".(33+$i++)."-$i)?>love you"; Try it online! Example program: I<?=chr(35-3)?>love you Still quite new at code golf, hope I get this right. Wanted to encode the space as 32 is the lowest number and wanted to ...


3

05AB1E, 34 31 30 28 25 bytes Combined Score: very very big (25 + no. permutations of "I love you"*20) -3 bytes thanks to @KevinCruijssen …I„΀v'"y'""œ{•B‹<•è"J Try it online! Optimised for Combined Score 05AB1E, 32 30 27 bytes Combined Score: 27 + 1980 = 2007 …I„΀îœт£¦v'"y'""œ{•B‹<•è"J Try it online! This may take a while to run... ...


18

JavaScript (JavaScript shell), 65 bytes total: (64 + 3366 = 3450) bytes for(i=99;i++<198;)print(`\\u0${i}="I love you";print(\\u{${i}})`) \u0100="I love you";print(\u{100}) \u0101="I love you";print(\u{101}) \u0102="I love you";print(\u{102}) \u0103="I love you";print(\u{103}) \u0104="I love you";print(\u{104}) \u0105="I love you";print(\u{105}) It is ...


7

JavaScript (Node.js), 81 bytes Output: 4275 bytes for(n=100;--n;)console.log(`console.log('I lo'+Buffer([${n}^${118^n}])+'e you')`) Try it online!


5

Python 3, 86 bytes 86 code + 10289 output = 10375 total x=0 while x<99:print(f"print(chr(len('{(bin(x)[2:8]).zfill(73)}'))+' love you')");x+=1 sample segment of output: print(chr(len('0000000000000000000000000000000000000000000000000000000000000000000110000'))+' Love you')


3

Keg, 33 bytes Programs separated by : Output is 1385 bytes в&(c|&:&I+,&:&,`- love you:`,⑹ Try it online! Programs: ѻв- love you:Ѽг- love you:ѽд- love you:Ѿе- love you:ѿж- love you:Ҁз- love you:ҁи- love you:҂й- love you:҃к- love you:҄л- love you:҅м- love you:҆н- love you:҇о- love you:҈п- love you:҉р- love you:Ҋс- love you:ҋт- love ...


Top 50 recent answers are included