更轻松的通信意味着更快的编码意味着更少的编码器意味着……


28

我父亲是一个非常出色的APL 专家,曾教过我APL的所有基础知识(以及更多),五年前的这一天就去世了。在准备APL 50年的过程中,我发现了这封专利信函(为不读丹麦语的人提供了便利),以作为手写徽标。它解释了APL从未赢得大量用户的主要原因-当然也适用于该社区所有令人惊叹的高尔夫语言的原因:


3497/77要求 1977年8月29 下午13点

EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS …

工程咨询公司Henri Brudzewsky,位于索堡的Mindevej 28,

第9类,包括计算机,尤其是APL编码的计算机,
第42类: IT服务代理公司,尤其是在使用APL编码的计算机期间。


任务

产生无重复EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS 行的文本的无限重复输出。您可以以EASIERFASTER或开头文本FEWER


我误解了您的挑战,而我所做的就是i.imgur.com/qKnTj3q.png
sergiol

@sergiol 在这里几乎有效。
亚当

专利信函链接已失效。
pppery

@pppery谢谢。更新。
亚当

Answers:


14

05AB1E,25个字节

[‘æƒËRSˆ¾¥ƒŽÁˆ¾¡ŸÂ ‘?

在线尝试!

说明:

[‘æƒËRSˆ¾¥ƒŽÁˆ¾¡ŸÂ ‘?
[                         Start infinite loop
 ‘æƒËRSˆ¾¥ƒŽÁˆ¾¡ŸÂ ‘   Push the compressed string in uppercase, starting from FEWER, with a trailing space
                        ?  Print without trailing newline

13
老实说,我不明白为什么Python解决方案会得到解释,而这个却没有。这到底是怎么回事?
nluigi

3
@nluigi黑魔法
尼克·罗伯逊,

2
如果您不懂该语言,从物理上就不可能知道发生了什么,请介意。
乔治·威尔考克斯

1
@nluigi [表示“无限循环的开始”,‘æƒËRSˆ¾¥ƒŽÁˆ¾¡ŸÂ ‘是的压缩版本EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS ?表示打印时没有换行符。
Okx

1
@Leo很难解释。首先,您转到文件。在某些扩展字符的右侧,您可以看到一个数字。如果是一位数字,请用前导零填充。两个这样的字符组成一个4位数字,可能带有前导零。然后,此数字用作字典的从零开始的索引。然后,每个单词的行为取决于引号,您可以通过搜索在链接到的第一个文件中找到引号compressed
暴民埃里克(Erik the Outgolfer)'17年

41

SVG(HTML5),336个字节

<svg width=500 height=500><defs><path id=p d=M49,250a201,201,0,0,1,402,0a201,201,0,0,1,-402,0></defs><text font-size="32"><textPath xlink:href=#p>EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS</textPath><animateTransform attributeName=transform type=rotate from=360,250,250 to=0,250,250 dur=9s repeatCount=indefinite>

编辑:有些人发现字体不太适合他们,因此这里是一个允许您调整几个像素的版本:

<p><input type=number value=0 min=0 max=9 oninput=p.setAttribute('d','M250,250m20_,0a20_,20_,0,1,1,-20_,-20_a20_,20_,0,1,1,-20_,20_a20_,20_,0,1,1,20_,20_a20_,20_,0,1,1,20_,-20_'.replace(/_/g,this.value))></p>
<svg width=500 height=500><defs><path id=p d=M250,250m200,0a200,200,0,1,1,-200,-200a200,200,0,1,1,-200,200a200,200,0,1,1,200,200a200,200,0,1,1,200,-200></defs><text font-size="32"><textPath xlink:href=#p>EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS</textPath><animateTransform attributeName=transform type=rotate from=360,250,250 to=0,250,250 dur=9s repeatCount=indefinite>


这很漂亮,但是您能使它从里到外(字母的顶部从圆面向外)和全部大写吗?
阿达姆(Adám)'17年

@Adám这怎么样?我不得不微调尺寸,但是它是相同的字节数。
尼尔

1
@Adám,您应该;这就是我第一次阅读时所面临的挑战。
毛茸茸的

8
“ MEANSEASIER”中缺少空格,换句话说,就是在空格之间。
ShreevatsaR

1
@ShreevatsaR我添加了第二个版本,其中包括一个用于进行小的调整的文本框,也许有帮助。
尼尔

13

PHP,76字节

for(;;)echo strtr(EASI0MMUNICATION1FAST0DING1FEW0DERS1,["ER CO"," MEANS "]);

在线尝试!


4
只有在PHP ....
user253751

@immibis是什么意思?
约尔格Hülsermann

我的意思是,您在一行代码中至少演示了3个PHP“设计怪癖”。这行代码说明了为什么PHP被认为是有害的。
user253751

1
@immibis“ mimimi不喜欢php”以为我们已经过去了十年了。:-)
Zsolt Szilagy

4
@ Arc676首先,假定没有美元符号的名称为常量。第二,假定未定义的常量本身就是一个字符串。因此在此代码EASI0MMUNICATION1FAST0DING1FEW0DERS1中将其视为字符串"EASI0MMUNICATION1FAST0DING1FEW0DERS1"。第三,strtr期望一个关联数组(其他语言中的“ map”或“ dictionary”),但是此代码在常规数组中传递,因此它将常规数组视为键0和1的关联数组。最后,那些整数0和1被视为字符串"0""1"因为您猜对了,该函数需要字符串。
Wavemode'5

11

Vim 69字节

qqAFEWER CODERS MEANS EASIER COMMUNICATION M<C-n> FASTER CODING M<C-n> <esc>@qq@q

当简单的Vim命令序列提供不错的代码高尔夫解决方案时,我就是喜欢它。:-D
DevSolar's

7

HTML,122个字节。

抱歉,不能帮助自己。

<marquee style="width:5em;word-spacing:5em;">EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS </marquee>


为什么字间距很大?
阿达姆(Adám)'17年

@Adám因为选取框始终在迭代之间保留该宽度(即其自身的宽度)。而且我找不到办法将其折叠起来,因此我不得不即兴创作,并且在每个单词之间也放置相同量的空格。
李斯特先生,

您不能删除结束标签吗?
NoOneIsHere17年

@NoOneIsHere有什么帮助?还是您的意思是说它将降低10个字节?我不确定是否要这样做。end标记实际上不是可选的。
李斯特先生,2017年

@MrLister我的意思是打高尔夫球。我认为单标签HTML文档不需要结束标签。
NoOneIsHere17年

6

Python 2中82 81个字节

-1个字节感谢Leaky Nun。

我可能做错了,但是真的很晚了。请注意尾随逗号。

while 1:print'FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS',

在线尝试!

另一种解决方案,85字节

我可能可以进一步打高尔夫球。

while 1:print'%sER CO%s MEANS'*3%('FEW','DERS',' EASI','MMUNICATION',' FAST','DING'),

在线尝试!


1
您可以删除第二个空格。
Leaky Nun

@LeakyNun我怎么想念它?o0谢谢!
完全人类

在第二个中,您可以将空格移到格式字符串中。
wizzwizz4

@ wizzwizz4不允许使用空格。
完全人类

2
@totallyhuman当前,您有一个错误,在该错误中它将输出“ FEWER CODERS MEANSEASIER COMMUNICATION MEANSFASTER CODING FEED FEANSFEWER ...”。如果您将格式字符串更改为格式'%sER CO%s MEANS '项并从格式项中删除空格,则它将更加适合并正常工作。
wizzwizz4


5

Brachylog,70个字节

"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "w↰

在线尝试!

怎么运行的

"..."w↰
"..."     generate the string "..."
     w    print to STDOUT without trailing newline
      ↰   do the whole thing all over again

4

HTML / CSS(仅限Firefox浏览器),179个 177 183 176 173字节

<b id=a>EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS </b>E<a><style>*{margin:0;}a{position:fixed;left:0;right:0;height:1em;background:-moz-element(#a)}

毫无疑问,最低分数并不高,我只是认为在不涉及任何JS的情况下获得无限的HTML / CSS替换会很有趣:)

变更日志:

  • 删除id属性周围的引号
  • 添加了“圆形”背景重复以拉伸文本,以便正确换行
  • 更改为单行输出
  • 替换width:100%样式right:0以节省3个字节

很好的尝试,但是从每一行开始。OP:没有换行符。
阿达姆(Adám)'17年

Any of the answers that print to a terminal will wrap at the end of the row. Try zooming out; you'll see it continues on forever horizontally as well, it's just "hidden" by the browser window.
user371366

Also, I wasted a few bytes having the repeating image "round off" so that it wraps more convincingly, hope that helps
user371366

Wrapping is fine, but yours doesn't. It could be seen as "printing" infinitely many infinite lines. Just restrict the background to a single line.
Adám

1
yes. i thought i would have to put repeat no-repeat or ; background-repeat: repeat-x, but figured out how to avoid it. Turns out obeying the spec saves bytes!
user371366



3

LOLCODE, 116 bytes

HAI 1
IM IN YR O
VISIBLE "FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "!
IM OUTTA YR O
KTHXBYE

Try it online!


I'm not familiar with LOLCODE. How does this output forever?
Esolanging Fruit

@Challenger5 IM IN YR ... and IM OUTTA YR ... form an infinite loop.
Leaky Nun

1
You can remove HAI and KTHXBYE as compilers don't require them. Also, no exclamation at end of VISIBLE.
OldBunny2800

@OldBunny2800 What version of LOLCODE are you using? In this version, the trailing ! suppresses the carriage return after printing.
Arc676

Oh, I forgot about the no-line-break rule. I didn't realize LOLCODE had a way to do this!
OldBunny2800

3

Ruby, 77 bytes

assigning " MEANS " to a variable saved all of 1 byte :-)

loop{$><<"EASIER COMMUNICATION#{m=" MEANS "}FASTER CODING#{m}FEWER CODERS"+m}

3

JavaScript (ES6), 90 87 bytes

while(1)console.log`EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS `

Functioning Alternative, 100 bytes

"Functioning" here meaning "won't crash your browser" (for a while, at least)!

setInterval(_=>console.log`EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS `,1)

1
Your code does not work: document.write`EASIER COMMUNICATION${m=" MEANS "}FASTER CODING${m}FEWER CODERS`+m is equivalent to document.write([ 'EASIER COMMUNICATION', 'FASTER CODING', 'FEWER CODERS' ], ' MEANS ', ' MEANS ') + ' MEANS ', which 1) will convert all arguments to strings and concatenate (printing EASIER COMMUNICATION,FASTER CODING,FEWER CODERS MEANS MEANS ), and 2) won't include the last ' MEANS ' anyways since it's outside the function call...
Frxstrem


2

Octave, 86 bytes

while fprintf('FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS ')end

Explanation:

This is fairly self-explanatory. The only real "trick" here is to use while fprintf. When fprintf is given a return argument, it will return the number of characters printed, and all non-zero numbers are considered true in Octave, so the loop condition will always be true.


I desperately tried to make the more interesting approach shorter, but it turned out to be 9 bytes longer, unfortunately:

while fprintf('FEW%sDERS%sEASI%sMMUNICATION%sFAST%sDING%s',{'ER CO',' MEANS '}{'ababab'-96})end

This tries to insert the strings 'ER CO' and ' MEANS' into the string at the correct locations, using direct indexing where 'ababab'-96 is a shorter version of [1 2 1 2 1 2].

This was a bit shorter (93 bytes), but still longer than the naive approach

while fprintf('FEWER CODERS%sEASIER COMMUNICATION%sFASTER CODING%s',{' MEANS '}{[1,1,1]})end

And another one (89 bytes), using Level River St's approach:

while fprintf(['FEWER CODERS',s=' MEANS ','EASIER COMMUNIDATION',s,'FASTER CODING',s])end

This should work in theory, for one less byte than the original solution, but it fails for some strange reason:

while fprintf"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "
end

This uses the buggy feature that fprintf('abc def') is equivalent to fprintf"abc def". The end must be on the next line, but it's still one byte shorter since two parentheses are skipped.

And one more for 87:

while fprintf('FEWER CODERS%sEASIER COMMUNICATION%sFASTER CODING%s',k=' MEANS ',k,k)end

Well, don't say I didn't try :)


You do know that fprintf recycles arguments right? Your last version can be 6 bytes less, Try it online!
Sanchises

2

Alice, 70 bytes

" SNAEM "k"SREDOC REWEF"e0j"GNIDOC RETSAF"e0j"NOITACINUMMOC REISAE"d&o

Try it online!

Explanation

Unfortunately, reusing the MEANS (with spaces) only saves a single byte over just printing the whole thing in one go. Consequently, extracting the ER CO would actually cost a byte (or probably more, because it would be slightly more expensive to extract another section).

" SNAEM "                Push the code points of " MEANS " in reverse.
k                        If there is a return address on the return address stack (which
                         there isn't right now), pop it and jump there.
"SREDOC REWEF"           Push the code points of "FEWER CODERS" in reverse.
e0j                      Jump to the beginning of the line, pushing the location of the
                         j to the return address stack. Hence, we push the code points
                         of " MEANS " again, but then the k pops the return address and
                         jumps back here.
"GNIDOC RETSAF"          Push the code points of "FASTER CODING" in reverse.
e0j                      Jump to the beginning of the line again.
"NOITACINUMMOC REISAE"   Push the code points of "EASIER COMMUNICATION" in reverse.
d                        Push the stack depth.
&o                       Print that many bytes from the top of the stack.
                         Afterwards the IP wraps around to the first column and the
                         program starts over.

2

C#, 102 bytes

_=>{for(;;)System.Console.Write("EASIER COMMUNICATION{0}FASTER CODING{0}FEWER CODERS{0}"," MEANS ");};

1

Pyth, 69 bytes

Wp"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS 

Try it online!

How it works

Wp"...
W       while the following is true: (do nothing)
 p      print the following and return the following
  "...


1

Java (OpenJDK 9), 114 bytes

static void f(){while(1>0)System.out.print("FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS ");}

Try it online! Stop the execution after a few seconds because it does not know when to stop.


Submissions have to be full programs or functions.
Kritixi Lithos

@KritixiLithos Can it be an anonymous lambda?
totallyhuman

@totallyhuman Yes. In other languages that's allowed; I don't see why Java should be an exception.
wizzwizz4

Why stop execution? Just untick disable output cache.
Adám

3
But you can do for(;;)
Brian McCutchon

1

C, 86 bytes

f(){printf("FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS ");f();}

See it work online.


This depends upon the compiler doing tail-call optimization, but I guess most do.
Wayne Conrad

@WayneConrad It is a valid answer without that optimization. Infinite recursion satisfies the requirement: Produce infinitely repeating output
2501

Without tail call optimization, the stack will overflow eventually. Try compiling it with gcc (use default options, so no tail call optimization), and when you run it, redirect output to /dev/null in order to speed up the process. It'll seg fault. With the '-O2' option, which enables tail call optimization, it runs forever as intended.
Wayne Conrad

@WayneConrad Infinite recursion is conceptually, infinite. The question doesn't constrain to a practical definition of infinite. By common consensus, infinite recursion is infinitely repeating, in other words, no logic within the program will stop it..
2501

I am not declaring that your solution is invalid. All I meant to point out is that, in order to execute properly, a little cooperation is needed from the compiler.
Wayne Conrad


1

Perl 6,  81 80  79 bytes

print ('EASIER COMMUNICATION','FASTER CODING','FEWER CODERS'X'MEANS'),' 'for ^Inf

Try it

loop {print ('EASIER COMMUNICATION','FASTER CODING','FEWER CODERS'X'MEANS'),' '}

Try it

loop {print [~] 'EASIER COMMUNICATION','FASTER CODING','FEWER CODERS'X'MEANS '}

Try it


1

MATL, 68 bytes

`'EASIER COMMUNICATION*FASTER CODING*FEWER CODERS*'42' MEANS 'Zt&YDT

Try it online!

Explanation

`                                                     % Do...while
  'EASIER COMMUNICATION*FASTER CODING*FEWER CODERS*'  %   Push this string
  42                                                  %   Push 42 (ASCII for '*')
  ' MEANS '                                           %   Push this string  
  Zt                                                  %   String replacement
  &YD                                                 %   printf to STDOUT
  T                                                   %   Push true as loop condition
                                                      % End (implicit)

1

Axiom, 92 89 bytes

repeat fortranLiteral"EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS "

insert in one line to Axiom window. Possible there is one function shorter than "fortranLiteral" that not write "\n"


1

Braingolf, 78 bytes

"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "[!@66<1+>]

or

Braingolf, 77 bytes [non-competing]

"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "[!&@<1+>]

This one's non-competing as I had to fix 2 bugs regarding using the greedy modifier (&) with the char print operator (@)


1

Blank, 267 bytes

[70][69][87][69][82][32][67][79][68][69][82][83][32][77][69][65][78][83][32][69][65][83][73][69][82][32][67][79][77][77][85][78][73][67][65][84][73][79][78][32][77][69][65][78][83][32][70][65][83][84][69][82][32][67][79][68][73][78][71][32][77][69][65][78][83][32]{p}

Pushes FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS to the stack, then prints it. Never terminates as no {@}

Also fun fact, I used the following Braingolf script to generate this code

"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS "l>[<$_<91+2^9-@_ 91+2^7-@l>]"{p}"@3

1

Groovy 79 bytes

m=" MEANS";for(;;)print"EASIER COMMUNICATION$m FASTER CODING$m FEWER CODERS$m "

Uses groovy's string interpolation.


1

PowerShell, 100 97 bytes

for(){"EASIER COMMUNICATION","FASTER CODING","FEWER CODERS"|%{Write-Host -NoNewLine "$_ MEANS "}}

Try it online!


Older answer:

PowerShell, 100 bytes

while(1){"EASIER COMMUNICATION","FASTER CODING","FEWER CODERS"|%{Write-Host -NoNewLine "$_ MEANS "}}

Try it online!

PowerShell is a little tricky for this because most dignified ways of outputting to the console also insert a new line. Write-Host is required because of this. However, it still demonstrates how pipelining can shorten the coding footprint.

You will need to stop the execution after a short time because it will not return as it is an infinite loop.

Edit: shaved off 3 bytes by changing a while loop to a for loop.

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.