Arte ASCII para interface do usuário torrent


30

Problema

Recrie a interface do usuário de um programa torrent

Não havendo entrada, produza o seguinte:

+----------+----------+----------+
|a.exe     |##########|seeding   |
+----------+----------+----------+
|b.exe 10% |#         |leeching  |
+----------+----------+----------+
|c.exe     |##########|seeding   |
+----------+----------+----------+
|d.exe 20% |##        |leeching  |
+----------+----------+----------+
|e.exe     |##########|seeding   |
+----------+----------+----------+
|f.exe 30% |###       |leeching  |
+----------+----------+----------+
|g.exe     |##########|seeding   |
+----------+----------+----------+
|h.exe 40% |####      |leeching  |
+----------+----------+----------+
|i.exe     |##########|seeding   |
+----------+----------+----------+
|j.exe 50% |#####     |leeching  |
+----------+----------+----------+
|k.exe     |##########|seeding   |
+----------+----------+----------+
|l.exe 60% |######    |leeching  |
+----------+----------+----------+
|m.exe     |##########|seeding   |
+----------+----------+----------+
|n.exe 70% |#######   |leeching  |
+----------+----------+----------+
|o.exe     |##########|seeding   |
+----------+----------+----------+
|p.exe 80% |########  |leeching  |
+----------+----------+----------+
|q.exe     |##########|seeding   |
+----------+----------+----------+
|r.exe 90% |######### |leeching  |
+----------+----------+----------+
|s.exe     |##########|seeding   |
+----------+----------+----------+
|t.exe     |##########|seeding   |
+----------+----------+----------+
|u.exe     |##########|seeding   |
+----------+----------+----------+
|v.exe     |##########|seeding   |
+----------+----------+----------+
|w.exe     |##########|seeding   |
+----------+----------+----------+
|x.exe     |##########|seeding   |
+----------+----------+----------+
|y.exe     |##########|seeding   |
+----------+----------+----------+
|z.exe     |##########|seeding   |
+----------+----------+----------+

O progresso dos programas é:

b=10% d=20% f=30% h=40% j=50% l=60% n=70% p=80% r=90%

quantidade de #programas para sanguessugas éprogress/10

o resto é tudo seedingcom barras de progresso completas.

Regras

  • Novas linhas iniciais e finais são permitidas.
  • Os espaços à esquerda e à direita são permitidos, desde que não alterem a forma da saída.
  • stdout e funções para saída permitida.
  • O menor código em bytes ganha

5
Você sabe que baixar .exede torrents não é a coisa mais brilhante a se fazer, não é?
Robau

14
@RobAu, de que outra forma eu obteria f.exenão consigo encontrar uma cópia dele em nenhum outro lugar.
LiefdeWen

9
f.exevem com o f_readme.txtque diz, "executar como administrador". Parece legítimo.
Magic Octopus Urn

@ RobAu Eu não sabia, eu baixo rotineiramente distribuições Linux, que contêm executáveis, incluindo alguns que instalam gerenciadores de inicialização, com torrents!
Pascal Cuoq 03/03

Respostas:


5

Carvão, 98 85 83 bytes

F³B⁻³⁴×¹¹ι³M↘ .exeM⁶→×#χ|seeding⸿F²⁵C⁰¦²↗Fβ↓⁺ι-F⁹«J⁷⁺³×⁴ι⁺⁺ι¹0% |#P⁺× ⁹|leeching×#ι

Eu pensei que copiar um modelo me pouparia muito código, mas tudo parece acrescentar de alguma forma, embora eu tenha conseguido salvar 13 bytes usando um único loop para corrigir as 9 linhas sanguessugas. Explicação:

F³B⁻³⁴×¹¹ι³             Make the top row of boxes
M↘ .exeM⁶→×#χ|seeding⸿  Print .exe, the 10 #s and seeding
F²⁵C⁰¦²                 Make 25 copies of the boxes
↗Fβ↓⁺ι-                 Put the letters in at the start
F⁹«                     For the 9 leeching files
   J⁷⁺³×⁴ι              Move the cursor to the percentage column
   ⁺⁺ι¹0% |#            Print the percentage and the first # of progress
   P⁺× ⁹|leeching       Erase the rest of the progress and change the status
   ×#ι                  Print the desired amount of progress

(Nota: pareço ter descoberto um bug no Charcoal; |é um caractere ASCII, mas também é contado como uma flecha para os fins de Multiprint, então você não pode Multiprint.)


Não é um bug, você pode escapar se quiser
apenas ASCII

@ Somente ASCII Ah certo, infelizmente o deverbosifier não sabe disso.
274 Neil

Oh verdade, obrigado por me lembrar
apenas ASCII

12

Perl 5 , 130 bytes

print$e=("+"."-"x10)x3 ."+
";printf"|$_.exe%4s |%-10s|%-9s |
$e",$|--&&$@++<9?("$@0%","#"x$@,leeching):("","#"x10,seeding)for a..z

Experimente online!

Espero que haja alguns bytes que possam ser jogados no golfe, mas fiquei sem inspiração.

Explicações breves:
$econtém a linha de separação ( +----------+----------+----------+); sua construção é direta ( ("+"."-"x10)x3 ."+\n").
Em seguida, alterno os caracteres de apara z:
Toda vez, imprima "|$_.exe%4s |%-10s|%-9s |\n$e; esse é um padrão printfcom espaços reservados para cadeias de caracteres ( %s) e cadeias de preenchimento à esquerda ( %-9s).
if $|--&&$@++<9for true ( $|é uma variável especial que contém 0 ou 1, e diminui-la alterna seu valor), a porcentagem não é 100% e os três valores na impressão são "$@0%","#"x$@,leeching( $@0%na verdade, é apenas $@ . "0" . "%"lembre-se de que $@foi incrementado anteriormente) caso contrário, os três valores são "","#"x10,seeding).


6

Python 2 , 182 177 bytes

Agradecemos a @officialaimm por reduzir 5 bytes, alterando o formato da condição.

r=("+"+10*"-")*3+"+"
for i in range(26):z=i/2+1;print r+"\n|"+chr(97+i)+".exe "+["    |"+10*"#"+"|seeding ",`10*z`+"% |"+z*"#"+(10-z)*" "+"|leeching"][i%2and i<19]+"  |"
print r

Experimente online!



1
Agradável! Eu já vi isso algumas vezes, mas não pensei em usá-lo nesse caso. Posso atualizar minha resposta com sua solução?
Fedone

Claro, você pode atualizá-lo. ;)
officialaimm


6

SOGL V0.12 , 90 89 88 bytes

ēz{L┌* +3ΟQķ|;o".exe ”oēI»L*"% |”e» #*lLκ@*"┌5%8'Ω⅞█≡θ¹‘++++e'³>e2\+?X"⅓m÷Ko→∆)№(¤^▒«‘}o

Experimente aqui!

Explicação:

ē                                 push variable E (default = input, which default is 0) and increase it after (next ē call will result in 1, or next e call - 2)
 z{                               iterate over the lowercase alphabet
   L┌*                            push 10 dashes
       +                          push "+"
        3Ο                        encase 3 copies of the dashes in pluses
          Q                       output in a new line, without popping and without disabling auto-output
           ķ|                     output in a new line "|"
             ;o                   output the current iteration (the alphabet letter)
               ".exe ”o           output ".exe "
                       ē          push E and increase the variable after
                        I         increase it
                         5*       multiply by 5 (every 2 ē calls this gets called)
                           "% |”  push "% |"

e»                                  push (E)/2
   #*                               get that mant "#"s
     l                              get the length of that string
      Lκ                            push 10-length
        @*                          push that many spaces
          "..‘                      push "|leeching  |"
              ++++                  add all those strings on the stack together ((e+1)*5, "% |", "#..#", " .. ", "|leeching |") (done this way to leave the "+-+-+-+" on the stack)
                  e'³>              push e>19
                      e2\           push e divides by 2
                         +          add together (here works like OR)
                          ?         if that then
                           X          remove the added-together string
                            "..‘      push "    |##########|seeding   |"
                                }   END
                                 o  output POP (either the added string or full/seeding version)
implicitly output POP (since none of tTpP were called), which is the separator line

SOGL bate .... Carvão ?!
Mr. Xcoder

1
@ Mr.Xcoder É o cenário mais comum.
Erik the Outgolfer

Por que o voto negativo?
Dzaima 27/06

4

Javascript, 232 230 228 226 bytes

(s='+----------'.repeat(3),p=0)=>[...'abcdefghijklmnopqrstuvwxyz'].map((c,i)=>(b=i%2,p=b?p+10:p,x=b&p<91,`${s}+'
|${c}.exe ${x?p+'%':'   '} |${'#'.repeat(x?p/10:10).padEnd(10)}|${x?'leeching':'seeding '}  |`)).join`
`+`
${s}+`
  • -2 Bytes thanks to @Stephen S - Using default function parameters
  • -2 Bytes thanks to OP - Replacing some spaces
  • -2 Bytes thanks to @Shaggy - Destructuring alphabet string

Demo


The last line is missing. Also, the submission and the Snippet differ; "leeching" is missing from the submission, for example.
Shaggy

@Shaggy Answer updated - Thanks for the follow
Weedoze

-2 bytes by moving s and p to default function parameters, removing the need for ()s around the function body: Fiddle
Stephen

I'm not sure but can't you change ${x?'leeching ':'seeding '}| to the following: ${x?'leeching':'seeding '} |?
LiefdeWen

@LiefdeWen You are right ! Thanks
Weedoze

3

PHP, 179 bytes

without input

for($a=a;$x<53;++$x&1?:$a++)printf($x&1?"
|$a.exe%4s |%-10s|%-10s|
":str_pad("",34,"+----------"),($y=$x%4>2&$x<36?++$z:"")?$y."0%":"",str_repeat("#",$y?:10),$y?leeching:seeding);

Try it online!

PHP, 176 bytes

with input

for($a=a;$x<53;)printf($x&1?"
|$a.exe%4s |%-10s|%-10s|
":str_pad("",34,"+----------"),($y=strstr($argn,++$x&1?:$a++)[2])?$y."0%":"",str_repeat("#",$y?:10),$y?leeching:seeding);

Try it online!


Save 9 bytes from the first version: remove ++ from ++$x&1 (-2), use $y=++$x%4|$z>9?"":++$z."0%" as second printf parameter (-9) and insert $z before :10 (+2)
Titus

2

Python 3, 255 bytes

I'm sure this can be golfed, updating soon:

e,l='.exe ',('+'+10*'-')*3+"+";print(l)
for i in zip(['|'+chr(z)+e+'    |'+"#"*10+'|seeding   |'if z%2or z>115else'|'+chr(z)+e+str((z-96)//2*10)+'% |'+(z-96)//2*"#"+(10-(z-96)//2)*" "+"|leeching  |"for z in range(97,123)],[l]*26):print(i[0],i[1],sep="\n")

Try it online!


instead of leeching | and seeding | , can't you change it into leeching and seeding +" |"?
LiefdeWen

@LiefdeWen I'm afraid that's 8 bytes longer...
Mr. Xcoder

Come on, "updating soon"? Anyway 246 bytes with list splat and and/or.
user202729

Also, //2*10 is just *5 and 10-(z-96)//2 is just 58-z//2.
user202729

2

Ruby, 141 bytes

puts s=(?++?-*10)*3+?+,(?a..?z).map{|c|["|#{c}.exe%4s |%-10s|%-9s |"%(c.ord%2>0||($.+=1)>9?["",?#*10,:seeding]:["#$.0%",?#*$.,:leeching]),s]}

Try it online!


2

Java (OpenJDK 8), 244 229 228 227 226 224 222 218 217 bytes

o->{String x="----------+",z="+"+x+x+x,s=z;for(int c=96,p;++c<123;s+=s.format("%n|%c.exe%4s |%-10s|%-10s|%n"+z,c,p>9?"":p+"0%","##########".substring(0,p),p>9?"seeding":"leeching"))p=(p=c/2-48)>9|c%2>0?10:p;return s;}

Try it online!

-2 bytes thanks to @KevinCruijssen!


Your leeching and seeding are right aligned.
LiefdeWen

Wow, fast comment! I just saw after posting and was busy fixing it :p
Olivier Grégoire

Sorry for being a nuissance, I just get excited seeing readable good
LiefdeWen

Nuisance? No, you weren't :)
Olivier Grégoire

1
Dangit.. While I was fixing and adding an explanation to my answer you've beat me to it.. And 34 bytes shorter I might add.. I see some simularities, but smart use of the .format and 0%, +1! Btw, you can golf your answer some more by starting with s=z instead, like this: o->{String x="----------+",z="+"+x+x+x,s=z;for(int c=96,p;++c<123;)s+=s.format("%n|%c.exe %3s |%-10s|%-10s|%n"+z,c,(p=(c%2>0|c/2-48>10)?10:c/2-48)<10?p+"0%":"","##########".substring(0,p),p<10?"leeching":"seeding");return s;} (225 bytes)
Kevin Cruijssen

2

Python 2, 172 170 162 bytes

-8 bytes thanks to Lynn

for i in range(2,28)+[id]:print('+'+'-'*10)*3+'+';a=i/2;b=i%2*(i<20);print('|'+'%-10s|'*3)%('%c.exe '%(95+i)+'%d0%%'%a*b,'#'*(a*b or 10),'sleeeedcihnign g'[b::2])

Try it online!


162 and exit via crash: tio.run/…
Lynn

1

Braingolf, 673 655 bytes

9..#+[#-]#+[#-]#+[#-]"+
|"!&@V"a.exe     |"!&@V9[##]"|seeding   |
"!&@v!&@v<1+>!&@V8##[# ]"|leeching  |
"!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<$_##>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<$_##>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<$_##>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<$_##>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<$_##>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<$_##>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<$_##>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<<$_##>>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<<<$_##>>>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv$_!&@;

Try it online!

I've said it before and I'll say it again: Braingolf is bad at ASCII art.

At least this is only 1/3rd of the bytes it would take to actually hardcode the output


1

V, 107 bytes

¬azÓ./|&.exeò
ddÎAµ |±°#|seeding³ |
ÙÒ-4ñr+11lñddç^/P
jp4G9ñ8|R00%3l10r llRleeching4jñV{10g
çä/WylWl@"r#

Try it online!

Hexdump:

00000000: ac61 7ad3 2e2f 7c26 2e65 7865 f20a 6464  .az../|&.exe..dd
00000010: ce41 b520 7cb1 b023 7c73 6565 6469 6e67  .A. |..#|seeding
00000020: b320 7c0a d9d2 2d34 f172 2b31 316c f164  . |...-4.r+11l.d
00000030: 64e7 5e2f 500a 6a70 3447 39f1 387c 5230  d.^/P.jp4G9.8|R0
00000040: 3025 1b33 6c31 3072 206c 6c52 6c65 6563  0%.3l10r llRleec
00000050: 6869 6e67 1b34 6af1 567b 3130 6701 0ae7  hing.4j.V{10g...
00000060: e42f 5779 6c57 6c40 2272 23              ./WylWl@"r#

1

Japt, 121 bytes

;'++(-p10 +'+ ³
1
U+R+C£W=Yv ªY>20?10:Y¥1?1:V±1"|{X}.exe {4î hW>9?S:W+"0%"}|{10î h'#pW}|{10î hW<10?`äƒÊA`:`Ð:ˆg`}|"+R+U+R

Try it online!


1

Japt, 98 bytes

;27Æ4î+ ¬q-pU=10ÃíC¬£'|²¬q[X+".exe {W=Yu ©°T<U©T*U ?W+'%:P}"'#pW/UªU `äÊA Ð:g`¸g!W]m!hUî)q|})c ·

Doesn't work in the latest version due to a bug that messes up 4î+, q-p10, and q|, but it does work in commit f619c52. Test it online!


1

T-SQL, 238 bytes

DECLARE @ INT=1,@D CHAR(11)='+----------'L:PRINT @D+@D+@D+'+
|'+CHAR(@+96)+'.exe '+IIF(@%2=0AND
@<20,CONCAT(@/2,'0% |',REPLICATE('#',@/2),SPACE(10-@/2),'|leeching  |'),'    |##########|seeding   |')SET @+=1IF @<27GOTO L
PRINT @D+@D+@D+'+'

Procedural solution, formatted:

DECLARE @ INT=1, @D CHAR(11)='+----------'
L:
    PRINT @D + @D + @D + '+
|' + CHAR(@+96) + '.exe ' + 
    IIF(@%2=0 AND @<20, 
       CONCAT(@/2,'0% |',REPLICATE('#',@/2),SPACE(10-@/2),'|leeching  |'),
       '    |##########|seeding   |')
   SET @+=1
IF @<27 GOTO L
PRINT @D + @D + @D + '+'

Everything in the loop (up until the SET) is part of the same PRINT statement, including a line break inside the first string literal.

I'm working on a set-based solution (create and populate a table, then SELECT from it), but I'm not sure if its going to be smaller or not.


1

Java 8, 271 263 262 bytes

o->{String a="+----------",b=a+a+a+"+\n",r=b;for(int c=96,t;++c<123;r+="|"+(char)c+".exe "+(t>0?(c/2-48)+"0%":"   ")+" |##########".substring(0,t>0?c/2-46:12)+"         |".substring(t>0?c/2-49:9)+(t>0?"leeching":"seeding ")+"  |\n"+b)t=c<115&c%2<1?1:0;return r;}

All this trouble for nothing.. >.> ;)
(Shorter Java answer by @OliverGrégoire.)

Explanation:

Try it here.

o->{                       // Method with unused Object parameter and String return-type
  String a="+----------",b=a+a+a+"+\n",
                           //  Temp String "+----------+----------+----------+\n"
         r=b;              //  Result-String
  for(int c=96,t;++c<123   //  Loop from 'a' to 'z':
      ;                    //    After every iteration:
       r+=                 //     Append the result-String with:
         "|"               //      A literal "|"
         +(char)c          //      + the character
         +".exe "          //      + literal ".exe "
         +(t>0?            //      If the current character is below 's' and even unicode:
           (c/2-48)+"0%"   //       + the percentage
          :                //      Else:
           "   ")          //       + the spaces
         +" |##########"   //      + the progress bar
           .substring(0,   //       By using a substring from 0 to 
             t>0?          //        If the current character is below 's' and even unicode:
              c/2-46       //         'b' = 3; 'd' = 4; 'f' = 6; etc.
             :             //        Else:
              12)          //         12 (the entire progress bar)
         +"         |"     //      + spaces after the progress bar
           .substring(     //       By using a substring from
             t>0?          //        If the current character is below 's' and even unicode:
              c/2-49       //         'b' = 0; 'd' = 1; 'f' = 2; etc.
             :             //        Else:
              9)           //         9 (all the spaces)
         +(t>0?            //      If the current character is below 's' and even unicode:
           "leeching"      //       + literal "leeching"
          :                //      Else:
           "seeding ")     //       + literal "seeding "
         +"  |\n"          //      + literal "  |" + new-line
         +b)               //      + `b` ("+----------+----------+----------+\n")
  t=c<115&c%2<1?           //   If the current character is below 's' and even unicode:
     1                     //    `t` = 1
    :                      //   Else:
     0;                    //    `t` = 0
                           //  End of loop
  return r;                //  Return the result-String
}                          // End of method

Use a char instead of an int in the loop. It allows you to not cast it later on. t can be initialized and reinitialized to zero and += afterwards. It should still be shorter.
Olivier Grégoire

@OlivierGrégoire It's actually 2 bytes longer. int & (char) & t=...; vs char & {t=1;t*=...;}. Unless I'm missing something.
Kevin Cruijssen

No you're not missing anything, that was my idea. I didn't take some other parts of your code in account.
Olivier Grégoire

1

Plain TeX, 306 bytes

\let\a\advance\def\b{+\r{\r-9-+}3\par}\def\s{\r~5|\r\#9\#|seeding\r~3|}\def\r#1#2{{\i0\loop#1\a\i1
\ifnum\i<#2\repeat}}\newcount\i\i`a\newcount\j\j1\tt\loop\b|\char\i.exe\ifodd\i\s\else\ifnum\i<`s\
\the\j0\%~|\r\#\j{\j-\j \a\j10 \r~\j}\a\j1|leeching\r~2|\else\s\fi\fi\endgraf\a\i1 \ifnum\i<`\{\repeat\b\bye

Ungolfed with some explanations:

\let\a\advance
\def\b{+\r{\r-9-+}3\par}%           The bar between rows: '+' + 3*(9*'-' + '-' + '+') + '\n'
\def\s{\r~5|\r\#9\#|seeding\r~3|}%  The common part for seeding lines, similar to \b
\def\r#1#2{{%                       Macro for repeating #1 #2 times
% Note the local grouping here which is needed for nested \loops and allows us to reuse the global \i
  \i0%
  \loop
    #1%
    \a\i1 %
    \ifnum\i<#2%
   \repeat%
}}%                                 
\newcount\i \i`a%                   Counter for ASCII values of letters, start with 'a'
\newcount\j \j1%                    Counter for percentages; shorter than modulo tricks
\tt
\loop
  \b|\char\i.exe%
  \ifodd\i
    \s%                             Odd lines are seeding lines
  \else
    \ifnum\i<`s\ %                  Even line up to 'r'
      \the\j0\%~|\r\#\j%            Print percentage and progress bar
      {\j-\j \a\j10 \r~\j}%         10-\j spaces after the progress bar
      \a\j1%
      |leeching\r~2|%
    \else
      \s%                           There's no \ifeven, hence the repetition here
    \fi
  \fi
  \endgraf%                         Print '\n'. \par doesn't work here, because \loop isn't a \long macro
  \a\i1
  \ifnum\i<`\{%                     Repeat until \j <= 'z'
\repeat
\b
\bye

1

05AB1E, 120 bytes

AS".exe"«'A17×S9L‚ζJJðK€H©T*т%εD0Q_i'%«ëð3×}}‚ζεðýð«}®'#×T®-úí"leeching  seeding   "Tô®TQè)ζ'|ýε'|.ø}õ.ø'-T∍'+«3×'+ì¶.øý

Try it online!


There's way too much golfing to do here, will post explanation when I'm below 90 bytes.


1

Stax, 53 68 64 bytes

â"{≤╞c~£ÿτδ¬│∙}Dgoô₧»öÖ#9▌ó♂i◘ÿkùâGCå`è╙/♠Gδb,φW0EqΔ┘δth½àJZ¿l╦#

Run and debug it

Unpacked and ungolfed it looks like this.

'+'-A*+34:mQ
VaF
  '|p
  ".exe "+
  |;i^hA?X 
  $.0%+
  xA<Y*+G
  '#x*G
  `Qz/"D?d=T"`jy@G
  zP
  Q
}A(p'|p

Note that if you use the "Golf" button to remove whitespace and comments from the expanded solution, it incorrectly doubles the }. If you remove the extra character, it continues to work correctly.


1

C (gcc), 217 211 bytes

-6 bytes thanks to ceilingcat

#define B"+----------"
f(p){for(char*a,*l=" bdfhjlnpr",i=97;puts(B B B"+"),i<'{';printf("|%c.exe %.*d%s |%-10.*s|%s  |\n",i++,!!a,p%10,a?"0%":"   ",p=a?a-l:10,"##########",a?"leeching":"seeding "))a=index(l,i);}

Try it online!


0

///, 264 bytes

/~/\/\///!/---~@/!!!-~$/@+@+@~</+
|~>/|
+~(/###~*/  ~}/|leeching*~[/.exe ~;/0% |~{/[**|(((#|seeding* ~]/>$</+$<a{]b[1;# ****}]c{]d[2;##****}]e{]f[3;( ***}]g{]h[4;(#***}]i{]j[5;(## **}]k{]l[6;((**}]m{]n[7;#((* }]o{]p[8;##((*}]q{]r[9;((( }]s{]t{]u{]v{]w{]x{]y{]z{>$+

Try it online!

Works by defining a bunch of replacements and using them to replace more characters than they are.


0

Mathematica, 274 bytes

a=Alphabet[];n=StringPadRight;o=ToString;Column@Join[Row/@Table[{g="+----------+----------+----------+\n","|"<>o@a[[i]]<>".exe ",If[EvenQ@i&&i<20,s=o[5i]<>"% ";k="|"<>Table["#",i/2];f="leeching";,k="|##########";f="seeding";s="    "];s,n[k,11]<>"|",n[f,10],"|"},{i,26}],{g}]

0

Charcoal, 154 149 143 130 103 bytes

A⁵δFβ«F³«+χ»+⸿A∨﹪δ²›δ⁹⁵θ|ι.exe⎇θ… ⁵⁺⁺ δ% ⁰|⎇θ…#χ⁺…#∕δχ… ⁻χ∕δχ⎇θ|seeding   |⸿↧|leeching  |⸿A⁺⁵δδ»F³«+χ»+

Try it online! (Link to verbose version.)

  • 27 bytes saves thanks to Neil's master Charcoaling techniques.

You can save a whole boatload of bytes by using \\r: Try it online!. Note that I've inserted dummy operations because I'm not getting any separators.
Neil

@Neil indeed, it seems that succesive printings are shorter than summing up chunks and printing the whole string. Not to mention the \r trick, I didn't know that.
Charlie

0

Bubblegum, 150 bytes

00000000: e007 3d00 8c5d 0015 8b71 ec14 6414 8031  ..=..]...q..d..1
00000010: 7fc3 2b24 3568 ca81 7ab5 363e c3b7 f500  ..+$5h..z.6>....
00000020: c926 d3f0 55d9 926f 75a8 f8d0 806f 1f12  .&..U..ou....o..
00000030: d71f b824 7e75 a7f2 544f 0364 ee5e 98be  ...$~u..TO.d.^..
00000040: a327 c36c 2ff1 8e6e df94 858e 82d0 d9da  .'.l/..n........
00000050: 77d6 fac6 5548 64aa 7a29 78fa 6886 3c85  w...UHd.z)x.h.<.
00000060: 0494 905e 74de a209 e927 42c8 418d 8250  ...^t....'B.A..P
00000070: ee39 c16b a4c2 9add 0b17 f8b0 9984 9aa8  .9.k............
00000080: defb 2875 31a9 c136 0ec2 6f28 9f8c 9990  ..(u1..6..o(....
00000090: 10d4 0000 0d0a                           ......

Try it online!


0

Perl6, 225 219

my&f={say ("+"~"-"x 10)x 3~"+"};my&g={f;my$b=$^c>9??"   "!!$c*10~"%";say "|$^a.exe $b |{'#'x$c}{' 'x(10-$c)}|$^d  |"};my \s="seeding ";for 1..9 {g chr(95+2*$_),10,s;g chr(96+2*$_),$_,"leeching"};g $_,10,s for "s".."z";f

0

Lua, 380 bytes

s=string.gsub
r=string.rep
function l(i)return".exe "..i.."0% |"..r("#",i)..r(" ",10-i).."|leeching  |\n"end
print((s(s("Z|aY|b"..l(1).."Z|cY|d"..l(2).."Z|eY|f"..l(3).."Z|gY|h"..l(4).."Z|iY|j"..l(5).."Z|kY|l"..l(6).."Z|mY|n"..l(7).."Z|oY|p"..l(8).."Z|qY|r"..l(9).."Z|sY|tY|uY|vY|wY|xY|yY|zY","Y",".exe     |##########|seeding   |\nZ"),"Z","+----------+----------+----------+\n")))

Uses gsub to create the row dividers and the seeding rows. l generates the leeching rows. Renaming gsub and rep saves more bytes.


0

Jstx, 126 bytes

►-○EO.♥/(:►+:1►+;+₧D0%4►|22♫♥φézï2♂bdfhjlnpr♀*U!↑)☺:♣<!,♂% |♀:2&₧#=-₧#/')▬►#◙')§► ◙21♫♠~√╫WσΓÇ2◙↓♫♥¿Ç~√₧#/►#:1♫♣~√▐┬╞¿:2◙►|41%

Try it online!

Explanation

►-          # Push literal -
○           # Push literal 9
E           # Push the second stack value the absolute value of the first stack value times.
O           # Collapse all stack values into a string, then push that string.
.           # Store the first stack value in the d register.
♥           # Push literal 3
/           # Enter an iteration block over the first stack value.
(           # Push the value contained in the d register.
:           # Push the sum of the second and first stack values.
►+          # Push literal +
:           # Push the sum of the second and first stack values.
1           # End an iteration block.
►+          # Push literal +
;           # Push the difference of the second and first stack values.
+           # Store the first stack value in the a register.
₧D          # Push literal abcdefghijklmnopqrstuvwxyz
0           # Enter an iteration block over the first stack value and push the iteration element register at the beginning of each loop.
%           # Push the value contained in the a register.
4           # Print the first stack value, then a newline.
►|          # Push literal |
2           # Print the first stack value.
2           # Print the first stack value.
♫♥φézï      # Push literal .exe 
2           # Print the first stack value.
♂bdfhjlnpr♀ # Push literal bdfhjlnpr
*           # Push the value contained in the iteration element register.
U           # Push a true if the second stack value contains the first stack value, else false.
!           # Push a copy of the first stack value.
↑           # Enter a conditional block if first stack value exactly equals true.
)           # Push the value contained in the iteration index register.
☺           # Push literal 1
:           # Push the sum of the second and first stack values.
♣           # Push literal 5
<           # Push the product of the second and first stack values.
!           # Push a copy of the first stack value.
,           # Store the first stack value in the b register.
♂% |♀       # Push literal % |
:           # Push the sum of the second and first stack values.
2           # Print the first stack value.
&           # Push the value contained in the b register.
₧#          # Push literal 10
=           # Push the quotient of the second and first stack values.
-           # Store the first stack value in the c register.
₧#          # Push literal 10
/           # Enter an iteration block over the first stack value.
'           # Push the value contained in the c register.
)           # Push the value contained in the iteration index register.
▬           # Enter a conditional block if the second stack value is less than the top stack value.
►#          # Push literal #
◙           # End a conditional block.
'           # Push the value contained in the c register.
)           # Push the value contained in the iteration index register.
§           # Enter a conditional block if the second stack value is greater than or equal to the top stack value.
►           # Push literal  
◙           # End a conditional block.
2           # Print the first stack value.
1           # End an iteration block.
♫♠~√╫WσΓÇ   # Push literal |leeching  
2           # Print the first stack value.
◙           # End a conditional block.
↓           # Enter a conditional block if first stack value exactly equals false.
♫♥¿Ç~√      # Push literal     |
₧#          # Push literal 10
/           # Enter an iteration block over the first stack value.
►#          # Push literal #
:           # Push the sum of the second and first stack values.
1           # End an iteration block.
♫♣~√▐┬╞¿    # Push literal |seeding   
:           # Push the sum of the second and first stack values.
2           # Print the first stack value.
◙           # End a conditional block.
►|          # Push literal |
4           # Print the first stack value, then a newline.
1           # End an iteration block.
%           # Push the value contained in the a register.
            # Implied println upon termination.

I'm sure this can get significantly shorter.


0

///, 226 bytes

/;/ "//:/$$$+//,/0% |//*/###//)/   //(/!
|//'/,*//&/.exe //$/+----------//"/ |leeching  |
:
|//!/&) |***#|seeding)|
:/:
|a(b&1,#)) ;c(d&2,##));e(f&3'))"g(h&4'#) ;i(j&5'##);k(l&6'*)"m(n&7'*# ;o(p&8'*##;q(r&9'**"s(t(u(v(w(x(y(z!

Try it online!

A bit more sophisticated approach to defining replacements. Try it interactively here!


0

Pascal (FPC), 294 286 266 263 bytes

const m='----------+';Q=#10'+'+m+m+m+#10;S='.exe     |##########|seeding   |'+Q;var i:word;begin write(Q);for i:=1to 9do write('|',chr(95+i*2),S,'|',chr(96+i*2),'.exe ',i,'0% |',StringOfChar('#',i),'|leeching  |':22-i,Q);for i:=115to 122do write('|',chr(i),S)end.

Try it online!

So... I ended up with both leading and trailing newline :D


0

PowerShell, 224 210 181 174 169 160 bytes

$l=("+"+"-"*10)*3+"+
"
0..25|%{"$l|$([char](97+$_)).exe "+("    |$("#"*10)|seeding ",("$(++$c/2)0% |{0,-10}|leeching"-f("#"*($c/2))))[$_%2-and$_-lt18]+"  |"}
$l

Try it online!

Now 64 bytes less terrible

Some Neat tricks: Combining a lot of "$(stuff)" to save on parens. We want only odd numbers which makes $_%2 = 1 so we don't need an -eq for it. Now uses list indexing instead of an if-else to save 5 bytes. Also gets rid of an `n for another byte. I couldn't get "$c`0%" to separate the var and zero so the current route was 1 byte shorter than gluing two strings together. Now with -f formatting.

Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.