| Bytes | Lang | Time | Link |
|---|---|---|---|
| 074 | Zsh | 200131T165053Z | GammaFun |
| 034 | W n d | 200117T033709Z | user8505 |
| 3540 | Ruby | 200116T152841Z | IMP1 |
| nan | Ruby | 200121T224232Z | Value In |
| nan | PowerShell | 200118T192638Z | mazzy |
| 086 | Python 3 | 200116T022019Z | Benji |
| nan | PowerShell | 200118T155703Z | Andrei O |
| 075 | Perl 6 | 200120T005605Z | Jo King |
| nan | 05AB1E | 200116T150719Z | Grimmy |
| 096 | PHP | 200116T121356Z | Kaddath |
| 718 | Whitespace | 200116T212201Z | Kevin Cr |
| 070 | C# Visual C# Interactive Compiler | 200117T063536Z | Gymhgy |
| 033 | Keg | 200116T020335Z | lyxal |
| 065 | JavaScript JavaScript shell | 200116T053327Z | tsh |
| nan | Batch | 200116T231154Z | Neil |
| 120 | C clang | 200116T121652Z | Noodle9 |
| 084 | R | 200116T170916Z | karpfen |
| 025 | 05AB1E | 200116T084650Z | Expired |
| 081 | JavaScript Node.js | 200116T022035Z | Arnauld |
Zsh, 74 bytes
Output: 2178 (after removing newline delimiters) for a category 2 score of 2252 bytes
for p (echo print '<<<');for v ({1..7} {a..z})<<<"$v='I love you';$p \$$v"
Uses method from this Ruby answer, setting a unique variable before printing. In zsh, variables must be alphanumeric, so we limit to 33 names and then print out programs using echo, print, and <<< to get our 99.
There is optimization to be done for category 2, this tweak scores 77 + 2145 = 2222 bytes, and more can probably be found.
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 '
a146+ % Add the current item by 146
C % Convert the current item to a character
"C'" % Add a string C'
a73+C % Add the current item by 73 (creating a difference of 73)
"C-C@ love you@+"++++ % Prepend the string and join the whole stack
Program explanation
'ⁿC'JC- # Create the number 73
C" love you"+ # Convert to character and append "love you"
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 rotations of the string "I love you" to make (((8 * 4) + 1) * 3) = 99 irreducible programs.
Golfy Tricks
- Uses
%w[]as a whitespace-separated string array - Use
*""and*''instead of.join - Use different combinations of quotation marks (
"",'') instead of different combination of splitting a string (chars,split(//)), and just use the shorter (chars) - Use
putsinstead of$stdout<<as the third way of printing (I didn't think it would be allowed because it also appends a newline where the others don't, but maybe this is fine?)
Try it online! for the initial generator code.
Try it online! for the generated code.
This now has some "I love you"s appended with a newline, and some not. I hope this is okay.
EDIT: Saved lots of even more bytes thanks to Value Ink!
Ruby, 53 + 2375 bytes
This is the cheap way of using a unicode range as variable names.
(?ÿ..?š).each{|v|puts"#{v}='I love you';puts #{v}"}
Try it online! for the generator code.
Try it online! for the generated code.
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 score, but falls behind in standard scoring.
l="I love you"
(?A..?v).grep(/\w/){|i|puts"$><<<<"+i,l,i,"puts <<"+i,l,i}
puts"puts'#{l}'"
Old solution, 123 + 4247 bytes
Beats out IMP1's (non-Unicode) Ruby solution in the standard code golf department, but falls behind in combined code golf scoring. Unlike their use of multiple output solutions and rotation, I chose to shuffle the string after setting a seed with srand.
99.times{|i|srand i;puts"srand #{i};puts'#{[*0..9].shuffle.zip('I love you'.chars).sort.map(&:last)*''}'.chars.shuffle*''"}
PowerShell, 63 + 3167 = 3230
1..99|%{$z=$_%10;"''+(echo you $($_-$z)/10) love $z I)[4,2,0]"}
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]
PowerShell, 2575 = 101 + 2474
Inspired by Jo King's answer for Perl.
Minimal total output for Powershell (84+2153) was written by Andrei Odegov
So make sure to upvote them both as well!
1..99|%{$n=$_
'"I "+("'+-join(0..6|%{[char](($n-shr$_)%2*32+'LOVEYOU'[$_])
' '*!($_-3)})+'"|% *wer)'}
Sample output:
"I "+("lOVE YOU"|% *wer)
"I "+("LoVE YOU"|% *wer)
"I "+("loVE YOU"|% *wer)
"I "+("LOvE YOU"|% *wer)
...
"I "+("loVE You"|% *wer)
PowerShell, 2672 = 99 + 2573, bonus track
1..99|%{$p,$d="0$_"[-2,-1]
$e,$l,$c,$r='I love you'-split"^(.{$p})(.)"
"'$l$d$r'-replace$d,`"$c`""}
It generates 10 distinct programs for each char of the input string. The length of string I love you is 10 chars. This is enough for 99 iterations
Sample output:
'1 love you'-replace1,"I"
'2 love you'-replace2,"I"
'3 love you'-replace3,"I"
...
'8 love you'-replace8,"I"
'9 love you'-replace9,"I"
'I0love you'-replace0," "
'I1love you'-replace1," "
...
'I love yo8'-replace8,"u"
'I love yo9'-replace9,"u"
PowerShell, 94 + 2890, bonus track 2
1..99|%{$n=$_;$i=0
'"=I='+-join(' love you'|% t*y|%{$_+'='[1-($n-shr$i++)%2]})+'"-replace"="'}
Sample output:
"=I= =love you"-replace"="
"=I= l=ove you"-replace"="
"=I= =l=ove you"-replace"="
"=I= lo=ve you"-replace"="
"=I= =lo=ve you"-replace"="
...
PowerShell, 96 + 3094
Specially for those who love to turn 99 into 9. ٩(^‿^)۶
2..100|%{"-join('"+-join(('I love you '*$_)[($_+10)..$_])+"'*$(2+($_-$_%10)/10))[$($_+10)..$_]"}
Sample output:
-join(' I uoy evol'*2)[12..2]
-join('l I uoy evo'*2)[13..3]
-join('ol I uoy ev'*2)[14..4]
-join('vol I uoy e'*2)[15..5]
-join('evol I uoy '*2)[16..6]
-join(' evol I uoy'*2)[17..7]
-join('y evol I uo'*2)[18..8]
-join('oy evol I u'*2)[19..9]
-join('uoy evol I '*3)[20..10]
-join(' uoy evol I'*3)[21..11]
-join('I uoy evol '*3)[22..12]
-join(' I uoy evol'*3)[23..13]
...
-join(' uoy evol I'*10)[98..88]
-join('I uoy evol '*10)[99..89]
-join(' I uoy evol'*11)[100..90]
-join('l I uoy evo'*11)[101..91]
-join('ol I uoy ev'*11)[102..92]
-join('vol I uoy e'*11)[103..93]
-join('evol I uoy '*11)[104..94]
-join(' evol I uoy'*11)[105..95]
-join('y evol I uo'*11)[106..96]
-join('oy evol I u'*11)[107..97]
-join('uoy evol I '*11)[108..98]
-join(' uoy evol I'*11)[109..99]
-join('I uoy evol '*12)[110..100]
PowerShell, 123 + 3141
...and in a normal order. https://coub.com/view/27d6eh
$s='I love you';(2..122|%{"-join('"+-join(("$s "*$_)[-($_+10)..-$_])+"'*$(2+($_-$_%10)/10))[$($_-1)..$($_+9)]"})-notmatch$s
Sample output:
-join('u I love yo'*2)[2..12]
-join('ou I love y'*2)[3..13]
-join('you I love '*2)[4..14]
-join(' you I love'*2)[5..15]
-join('e you I lov'*2)[6..16]
-join('ve you I lo'*2)[7..17]
-join('ove you I l'*2)[8..18]
-join('love you I '*3)[9..19]
-join(' love you I'*3)[10..20]
-join('u I love yo'*3)[13..23]
-join('ou I love y'*3)[14..24]
-join('you I love '*3)[15..25]
...
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')
PowerShell, 85 + 2647 = 2732 83 + 2251 = 2334 79 + 1818 = 1897
0..226|?{[char]::isletterordigit($_)}|%{"`$$([char]$_)"}|%{"($_='I love you')"}
-398 thanks to mazzy
Sample output:
($0='I love you')
...
($â='I love you')
Perl 6, 75 bytes, 2178 + 75 = 2253
unique("'I love you'.tclc.say",{S:x(8)[\w]~^=' 'x 2.rand}...*)[^99+1]>>.say
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 base program
,{ }...* # Generate an infinite series of
S:x(8)[\w]~^= # String xor the first 8 letters
' 'x 2.rand # Randomly space or nothing,
# Essentially flipping the case
unique( ... ) # From the unique elements
[^99+1] # Take 99, skipping the first
>>.say # And print each
The reason I don't include the first unique element is so that a variant with correct casing isn't produced, since that would be reducible.
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 stack
Each subprogram looks like:
1 # 1 (N)
•«À¢ÒÙΓʒγ• # compressed integer 11971423964735158206
99 # 99 (100 - N)
O # sum the entire stack
₃B # convert to base 95
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";
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 do something else than port an existing answer. Got me into troubles with the 2 strings removing part, but I think this time it passes
(Edit: one line was missing, programs count was 98)
(Edit2: separator is now :, as - was in the code, and total count was wrong)
Edit3: This time I think it's OK (got much more complicated than planned):
- I had to remove all the intervals of the form
x99-x67that can be reduced by removing thex's - Had also to remove all the interval of the form
3xx-2xxthat can be reduced by removing thexx-andxx - Tried to keep only
--$i%100>67&&$i>299as a condition but unfortunately it goes to1003-971and a bit beyond that all can be reduced to the form103-71 - new code is manupulating
$iwith -- and ++ to avoid to add prenthesis and do($i-1)%100>67in test and"-".($i-1).")in display - no separator anymore, as per a question's comment
- removed the space after
echo(thanks to @Ismael Miguel answer)
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 S T N
_Push_1][S N
T _Swap][T T S _Store_1:n+1][S S S T N
_Push_1_newline][S N
S _Dupe_1_newline][S S S T S T T T N
_Push_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S S S N
_Push_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][N
S T N
_Call_Subroutine_PUSH_INTEGER][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][N
S T N
_Call_Subroutine_PUSH_INTEGER][S S S T N
_Push_1_newline][S S S T S T T T N
_Push_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S N
S _Dupe_1_newline][S T S S T S N
_Copy_0-based_2nd_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S S S T N
_Push_1_newline][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S T S S T S S N
_Copy_0-based_4th_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S T S S T S S N
_Copy_0-based_4th_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S T S S T S T N
_Copy_0-based_5th_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S S S N
_Push_0_tab][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S T N
_Push_1_newline][S T S S T N
_Copy_0-based_1st_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S T S S T T N
_Copy_0-based_3rd_23_space][S N
S _Dupe_23_space][S S S N
_Push_0_tab][N
S T N
_Call_Subroutine_PUSH_INTEGER][S S S T N
_Push_1_newline][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S N
S _Dupe_0_tab][S S S T S T T T N
_Push_23_space][S S S N
_Push_0_tab][S N
S _Dupe_0_tab][S T S S T S N
_Copy_0-based_2nd_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][N
S T N
_Call_Subroutine_PUSH_INTEGER][N
S N
S N
_Jump_to_Label_LOOP][N
S S T T N
_Create_Label_EXIT_WITH_PRINT][S N
N
_Discard_n][N
S S T N
_Create_Label_PRINT_LOOP][S S S T S S T N
_Push_9][T S S S _Add][T N
S S _Print_as_character][N
S N
T N
_Jump_to_Label_PRINT_LOOP][N
S S N
_Create_Subroutine_PUSH_INTEGER][S S S T N
_Push_1_newline][S S S N
_Push_0][S S S T N
_Push_1][T T T _Retrieve_1:n][T T S _Store_0:m][N
S S S S N
_Create_Label_TAB_LOOP][S S S N
_Push_0_tab][S N
S _Dupe_0][S N
S _Dupe_0][T T T _Retrieve_0:m][S S S T N
_Push_1][T S S T _Subtract][S N
S _Dupe_m-1][N
T S S T N
_If_0_Jump_to_Label_DONE_WITH_TAB_LOOP][T T S _Store_0:m-1][N
S N
S S N
_Jump_to_Label_TAB_LOOP][N
S S S T N
_Create_Label_DONE_WITH_TAB_LOOP][S S S T S T T T N
_Push_23_space][S N
S _Dupe_23_space][S N
S _Dupe_23_space][N
T N
_Return_from_Subroutine_PUSH_INTEGER]
Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
The output Whitespace programs are output without delimiter. Each program will be as follows, where the x is variable in the range [3,102].
[S S S (x_amount_of_T )N
_Push_n][S S S T T S T T T T N
_Push_constant_111][S S S (x_amount_of_T )N
_Push_n][T S S T ][T T S _store][S S S T T S N
_Push_6_u][S S S N
_Push_0_o][S S S T S T S N
_Push_10_y][S S T T S S T T T T N
_Push_-79_space][S S T T S T S N
_Push_-10_e][S S S T T T N
_Push_7_v][S S S N
_Push_0_o][S S T T T N
_Push_-3_l][S T S S T S S N
_Copy_0-based_4th_-79_space][S S T T S S T T S N
_Push_-38_I][N
S S N
_Create_Label_LOOP][S S S (x_amount_of_T )N
_Push_n][T T T _Retrieve][S S S (x_amount_of_T )N
_Push_n][T S S S _Add][T S S S _Add][T N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]
In the 1st program, x will be 3, so the four Push n parts will push the integer 7 (binary 111; three 1-bits); in the 15th program, x will be 18, so the four Push n parts will push the integer 262143 (binary 111111111111111111; eighteen 1-bits); etc. up to 5070602400912917605986812821503 (binary with 102 1-bits).
Try it online for the 15th program (with raw spaces, tabs and new-lines only).
I've used this Whitespace tip of mine to print the output I love you. The optimal constant 111 is generated by this Java program. In addition, I use one copy for the space to save bytes.
I've also used this same tip with a constant 9 in the generator program to output the Whitespace sub-programs. After that I've used loads of duplicates, as well as copies for the spaces where possible.
Explanation in pseudo-code:
Generator program:
Store n=0 at heap-address 1
Start LOOP:
Retrieve n from heap-address 1
n = n + 1
If(n == 100):
Call function EXIT_WITH_PRINT
Store the updated n+1 at heap-address 1
Push the codepoints of "NNSNSSNTSSSTSSST" minus 9 for the output program
Call subroutine PUSH_INTEGER
Push the codepoints of "TTT" minus 9 for the output program
Call subroutine PUSH_INTEGER
Push the codepoints of "NSSNNSTTSSTTSSNSSTSSTSNTTTSSNSSSNTTTSSSNSTSTTSSNTTTTSSTTSSNSTSTSSSNSSSNSTTSSSSTTTSST" minus 9 for the output program
Call subroutine PUSH_INTEGER
Push the codepoints of "NTTTTSTTSSS" minus 9 for the output program
Call subroutine PUSH_INTEGER
Go to the next iteration of LOOP
Function EXIT_WITH_PRINT:
Discard n that was still on the top of the stack
Start PRINT_LOOP:
Add 9 to the value at the top of the stack
Pop and print it as character
(this will fail with an error since there is nothing more to pop, when we're done with
the final character to stop the program)
Go to the next iteration of PRINT_LOOP
Subroutine PUSH_INTEGER:
Push the codepoint of "N" minus 9 for the output program
Retrieve n from heap-address 1
Integer m = n
Store m at heap-address 0
Start TAB_LOOP:
Push the codepoint of "T" minus 9 for the output program
Retrieve m from heap-address 0
m = m - 1
If(m == 0):
Call function DONE_WITH_TAB_LOOP
Store m-1 at heap-address 0
Go to next iteration of TAB_LOOP
Function DONE_WITH_TAB_LOOP:
Push the codepoints of "SSS" minus 9 for the output program
Return to the caller of the PUSH_INTEGER subroutine, and continue from there
Sub-program:
Variable as explained before is integer n (which has x amount of binary 1-bits).
Integer t = 111 - n
Store t at heap-address n
Push the codepoints of "uoy evol I" minus 111
Start LOOP:
Retrieve t from heap-address n
t = t + n
Add t (which is 111 again) to the value at the top of the stack
Pop and print it as character
(this will fail with an error since there is nothing more to pop, when we're done with
the final character to stop the program)
Go to the next iteration of LOOP
Since we use the variable n four times (t = 111-n; store t at heap-address n; retrieve t from heap-address n; t = t+n) with other pieces of relevant code in between the pushes, we need to remove four string-sequences in order to still have a valid I love you output, complying to the rule stating you can't remove one or two string-sequences.
C# (Visual C# Interactive Compiler), 70 bytes
for(char i='ÿ';i++<355;Write($"var {i}=\"I love you\";Write({i});"));
Keg, 33 bytes
Programs separated by :
Output is 1385 bytes
в&(c|&:&I+,&:&,`- love you:`,⑹
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 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 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 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 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 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 you:Ӝғ- love you:ӝҔ- love you:
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 trivial.
JavaScript allow escape sequence in variable name. console.lo\u0067('Hello world') is prefect valid. I don't think this feature is useful anyway. But...
No TIO link, since the TIO version is out-of-date. You may download JavaScript Shell from https://archive.mozilla.org/pub/firefox/releases/72.0.1/jsshell/ .
JavaScript (SpiderMonkey), 76 bytes
total: (76 + 2475 = 2551) bytes
for(i=99;i++<198;print(v+'="I love you";print('+v+')'))v=eval('"\\u0'+i+'"')
Output:
Ā="I love you";print(Ā)
ā="I love you";print(ā)
Ă="I love you";print(Ă)
ă="I love you";print(ă)
Ą="I love you";print(Ą)
ą="I love you";print(ą)
This one is shorter when counting total length. And it is much more trivial.
JavaScript (SpiderMonkey), 85 bytes
total: (86 + 36927 = 37013) bytes
for(n=99,p="(L='I love you')=>",q="print(L)";n--;p+='x=>')p='('+p,q+=')()',print(p+q)
Output:
((L='I love you')=>print(L))()
(((L='I love you')=>x=>print(L))())()
((((L='I love you')=>x=>x=>print(L))())())()
(((((L='I love you')=>x=>x=>x=>print(L))())())())()
((((((L='I love you')=>x=>x=>x=>x=>print(L))())())())())()
This is my original solution.
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 after echo, which can usually (as here) be any of 11 characters, but five of them need quoting to use in a for command, so I've omitted space and (. The programs are all irreducible because they need to get the word love to appear in the output.
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;}
Fixed pristine-errors kindly pointed out by Expired Data.
Fixed pristine-errors kindly pointed out by Kaddath.
Saved 50 bytes thanks to gastropner!!!
Prints 99 unique lines like:
main(){printf("%c Love You",3^74);}
R, 84 Bytes
for(x in 1:99){cat("assign(intToUtf8(",x,"),'I love you');get(intToUtf8(",x,"))\n")}
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
Optimised for Combined Score
05AB1E, 32 30 27 bytes
Combined Score: 27 + 1980 = 2007
…I„΀îœт£¦v'"y'""œ{•B‹<•è"J
This may take a while to run...
Explanation
…I„΀î # Compressed string "I love you"
œ # Get the permutations of this string
¦ # Remove the first one ("I love you")
v # loop over these and do...
'"y'" # the string with the value in (e.g. "I love yuo"
"œ{•B‹<•è" # string literal with œ{•B‹<•è value
J # join these and print e.g. "I love yuo"œ{•B‹<•è
Explanation of the output programs:
"I love yuo" # a string which is a permutation of "I love you"
œ{ # get the sorted permutations of this string
•B‹<•è # get the value at index 750832 which is "I love you"
JavaScript (Node.js), 81 bytes
Output: 4275 bytes
for(n=100;--n;)console.log(`console.log('I lo'+Buffer([${n}^${118^n}])+'e you')`)