答:
Lua, 47 Bytes

```<code>function(a,b)for _=1,a do b={b}end return b end
</code>```

A huge amount of this is boiler plate, because of Lua.
for _=1,a do b={b}end is the real meat.

Title: Nest a string inside an array n times

Body:
Lua, 47 Bytes

function(a,b)for _=1,a do b={b}end return b end

A huge amount of this is boiler plate, because of Lua.
for _=1,a do b={b}end is the real meat.


问:
Make an ASCII bat fly around an ASCII moon
Background

Here is a Halloween related challenge.

As you may have seen from my last challenge I quite like what I term as ascii art animations, that is not just draw a pattern but draw a pattern that progresses. This idea came to me after I was asked a couple of years ago to liven up a (rather dull) presentation by making random ascii bats fly across the screen on Halloween. Needless to say I duly obliged (I was being paid for it) but it made me think that there is more to life than random bats. Inspired by this I would like to propose this challenge.

Challenge

Make a bat fly around the moon.

Here is a bat:

```<code>^o^
</code>```

Here is the moon:

```<code>     mmm
   mmmmmmm
  mmmmmmmmm
   mmmmmmm
     mmm
</code>```

You must show every stage of the bats flight (see output).

Input

None

Output

```<code>      ^o^
      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm^o^
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm
    mmmmmmm^o^
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm^o^
    mmmmmmm
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm^o^
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm^o^

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm
      ^o^

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
   ^o^mmm

      mmm
    mmmmmmm
   mmmmmmmmm
 ^o^mmmmmmm
      mmm

      mmm
    mmmmmmm
^o^mmmmmmmmm
    mmmmmmm
      mmm

      mmm
 ^o^mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

   ^o^mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      ^o^
      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm
</code>```

Rules

No reading from external files or websites

You may submit a full program or a function

Extra spaces and/or newlines are fine by me

Standard loopholes banned as usual

The bat must finish back at the top of the moon

Please feel free to clear the screen between frames if you wish however this is not a requirement. Output as shown above is fine

As this is code golf, the winner will be the answer with the lowest byte count although any answer is welcome

Sample

Reference implementation in totally ungolfed Python 2 (620 bytes but just to prove that it can be done. May golf it later).

```<code>b='^o^'
m=['                     ',
'         mmm         ',
'       mmmmmmm       ',
'      mmmmmmmmm      ',
'       mmmmmmm       ',
'         mmm         ',
'                     ']
p=[(9,12),(12,15),(14,17),(15,18),(14,17),(12,15),(9,12),(6,9),(4,7),(3,6),(4,7),(6,9),(9,12)]
d=0
for z in range(7):
    x=map(str,m[z])
    c="".join(x[:p[z][0]]) + b + "".join(x[p[z][1]:])+"\n"
    print "\n".join(m[:z]) + "\n" + c+"\n".join(m[z+1:])
for z in range(6)[::-1]:
    x=map(str,m[z])
    c="".join(x[:p[z+6][0]]) + b + "".join(x[p[z+6][1]:])+"\n"
    print "\n".join(m[:z]) + "\n" + c+"\n".join(m[z+1:])
</code>```

Result

Although @Jonathan obviously wins on byte count with Jelly, I am going to mark the Brainfuck answer from @Oyarsa as the accepted answer purely because I think that anyone who can actually do something like this in such a crazy language deserves +15 rep no matter how many bytes it takes. This is not because I have any problem with golfing languages. See my answer to a question regarding this on meta if you have any doubts. Many thanks and respect to all who contributed in whatever language.

答:
Python 2, <s>146 144</s> 138 bytes

-2 bytes thanks to @Willem (use the variable c rather than looping through a map)

m='\n'.join(int(a)*' '+int(b)*'m'+3*' 'for a,b in zip('6643466','0379730'))
for b in" -;L[hrbQ@2' ":c=ord(b)-23;print(m[:c-3]+'^o^'+m[c:])
```

<p><strong>repl.it</strong></p>

<p><code>'6643466'</code> is the number of spaces before the moon (with 6 on the empty first and last lines, since the bat will go there).</p>

<p><code>'0379730'</code> is the number of <code>'m'</code>s in the moon on each line.</p>

<p>The <code>zip</code> unpacks these characters into <code>a</code> and <code>b</code> and makes the moon in the sky, <code>m</code>, with 3 trailing spaces on each line.</p>

<p>The last line then traverses the positions of the bat within the moon, and is effectively:</p>

```for c in(9,22,36,53,68,81,91,75,58,41,27,16,9):print(m[:c-3]+'^o^'+m[c:])
```

but the tuple of positions is encoded as the ordinals of printable characters, with an added 23 (since 9 is not printable). This comes out as " -;L[hrbQ@2' ", and c=ord(b)-23 is used to extract the values.

ContentLicense: CC BY-SA 3.0

Body:
Python 2, <s>146 144</s> 138 bytes

-2 bytes thanks to @Willem (use the variable c rather than looping through a map)

m='\n'.join(int(a)*' '+int(b)*'m'+3*' 'for a,b in zip('6643466','0379730'))
for b in" -;L[hrbQ@2' ":c=ord(b)-23;print(m[:c-3]+'^o^'+m[c:])

repl.it

'6643466' is the number of spaces before the moon (with 6 on the empty first and last lines, since the bat will go there).

'0379730' is the number of 'm's in the moon on each line.

The zip unpacks these characters into a and b and makes the moon in the sky, m, with 3 trailing spaces on each line.

The last line then traverses the positions of the bat within the moon, and is effectively:

for c in(9,22,36,53,68,81,91,75,58,41,27,16,9):print(m[:c-3]+'^o^'+m[c:])

but the tuple of positions is encoded as the ordinals of printable characters, with an added 23 (since 9 is not printable). This comes out as " -;L[hrbQ@2' ", and c=ord(b)-23 is used to extract the values.


问:
Nest a string inside an array n times
You must produce a function which nests a string s inside an array, n times

```<code>>>> N("stackoverflow",2)
[['stackoverflow']]
</code>```

Parameters:

s - An ascii string

n - An integer >= 0

Rules

Shortest code wins.

The output will be a nested array, list or tuple (or similar type based off an array)

Test Cases

```<code>>>> N("stackoverflow",0)
'stackoverflow'
>>> N("stackoverflow",1)
['stackoverflow']
>>> N("stackoverflow",5)
[[[[['stackoverflow']]]]]
</code>```

Inspired by: Nesting a string inside a list n times ie list of a list of a list

答:
Haskell, <s>40</s> 38 bytes

```<code>data L=N[Char]|C L
f 0=N
f n=C. f(n-1)
</code>```

Haskell's strict type system prevents returning different types (Strings vs. List of Strings vs. List of List of Strings,...), so I have to define my own type that accommodates all those cases. The main function f recursively calls n times the constructor C for nesting and N for the base case.

Usage example (with deriving (Show) added to the new data type to be able to print it): f 4 "codegolf" -> C (C (C (C (N "codegolf")))).

Edit: @Christian Sievers saved 2 bytes by rewriting the function in a point-free style for the string argument. Thanks!

Title: Nest a string inside an array n times

Body:
Haskell, <s>40</s> 38 bytes

data L=N[Char]|C L
f 0=N
f n=C. f(n-1)

Haskell's strict type system prevents returning different types (Strings vs. List of Strings vs. List of List of Strings,...), so I have to define my own type that accommodates all those cases. The main function f recursively calls n times the constructor C for nesting and N for the base case.

Usage example (with deriving (Show) added to the new data type to be able to print it): f 4 "codegolf" -> C (C (C (C (N "codegolf")))).

Edit: @Christian Sievers saved 2 bytes by rewriting the function in a point-free style for the string argument. Thanks!


答:
Lithp, 48 Bytes

```<code>#S,N::((if (== 0 N) (S) ((list (n S (- N 1))))))
</code>```

Can be assigned to a variable or function definition like so:

```<code>(def n #S,N::((if (== 0 N) (S) ((list (n S (- N 1)))))))
</code>```

And called:

```<code>(print (inspect (n "stackoverflow" 5)))

[[[[["stackoverflow"]]]]]
</code>```

(inspect is used because JS' print method stops if the object is too deep.)

Title: Nest a string inside an array n times

Body:
You must produce a function which nests a string s inside an array, n times

```<code>>>> N("stackoverflow",2)
[['stackoverflow']]
</code>```

Parameters:

s - An ascii string

n - An integer >= 0

Rules

Shortest code wins.

The output will be a nested array, list or tuple (or similar type based off an array)

Test Cases

```<code>>>> N("stackoverflow",0)
'stackoverflow'
>>> N("stackoverflow",1)
['stackoverflow']
>>> N("stackoverflow",5)
[[[[['stackoverflow']]]]]
</code>```

Inspired by: Nesting a string inside a list n times ie list of a list of a list

Body:
Lithp, 48 Bytes

#S,N::((if (== 0 N) (S) ((list (n S (- N 1))))))

Can be assigned to a variable or function definition like so:

(def n #S,N::((if (== 0 N) (S) ((list (n S (- N 1)))))))

And called:

(print (inspect (n "stackoverflow" 5)))

[[[[["stackoverflow"]]]]]

(inspect is used because JS' print method stops if the object is too deep.)


问:
Find the Infinity Words!
(Note: This is a spin-off of my previous challenge Find the Swirling Words!)

Definition of Infinity Word:

If you connect with curves all the characters of an Infinity Word on the alphabet (A-Z) you obtain the infinity symbol ∞ like in the diagrams below.

All the even connection must be down, all the odd connections must be up.

You can ignore upper/lowercase or consider/convert all to upper case or all to lower case.

The input words are only characters in the alphabet range of A-Z, no spaces, no punctuation, or symbols.

Each word must be exactly 5 characters. Words > 5 or < 5 are not valid.

If a word has double consecutive characters, the word is not valid, like "FLOOD" or "QUEEN".

All the Infinity Words start and end with the same character.

Here there are some examples:

Task:

Write a full program or function that will take a word from standard input and will output if is an Infinity Word or not. The output can be true/false, 1/0, 1/Null, etc.

Test cases:

```<code>Infinity Words:
ALPHA, EAGLE, HARSH, NINON, PINUP, RULER, THEFT, WIDOW

NOT Infinity Words:
CUBIC, ERASE, FLUFF, LABEL, MODEM, RADAR, RIVER, SWISS, TRUST,
KNEES, QUEEN, GROOVE, ONLY, CHARACTER, OFF, IT, ORTHO
</code>```

Rules:

Shortest code wins.

Optional Task:

Find, as a list, as many Infinity Words as you can in an English dictionary. You can take for example as reference the complete list of English words here.

答:
Python 2 exit code, 56 bytes

s=input()
v,w,x,y,z=map(cmp,s,s[1:]+s[0])
v*x+w*y|z>-2>_
```

<p>Outputs via exit code: Error for False, and successful run for True.</p>

<p>Takes the string <code>s</code> with characters <code>abcde</code>, rotates it to <code>bcdea</code>, does an elementwise comparison of corresponding characters, and assigns them to five variables <code>v,w,x,y,z</code>. The wrong length gives an error.</p>

<p>The infinity words all have</p>

<pre class="lang-python prettyprint-override"><code>v*x == -1
w*y == -1
z == 0
</code>```

which can be checked jointly as v*x+w*y|z == -2. The chained comparison v*x+w*y|z>-2>_ short-circuits if this is the case, and otherwise goes on to evaluate -2>_ which gives a name error.

Title: Find the Infinity Words!

Body:
Python 2 exit code, 56 bytes

s=input()
v,w,x,y,z=map(cmp,s,s[1:]+s[0])
v*x+w*y|z>-2>_

Outputs via exit code: Error for False, and successful run for True.

Takes the string s with characters abcde, rotates it to bcdea, does an elementwise comparison of corresponding characters, and assigns them to five variables v,w,x,y,z. The wrong length gives an error.

The infinity words all have

v*x == -1
w*y == -1
z == 0

which can be checked jointly as v*x+w*y|z == -2. The chained comparison v*x+w*y|z>-2>_ short-circuits if this is the case, and otherwise goes on to evaluate -2>_ which gives a name error.


问:
Golf you a quine for great good!
Using your language of choice, golf a quine.

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.

No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either.

No error quines -- there is already a separate challenge for error quines.

Points for:

Smallest code (in bytes)

Most obfuscated/obscure solution

Using esoteric/obscure languages

Successfully using languages that are difficult to golf in

The following Stack Snippet can be used to get a quick view of the current score in each language, and thus to know which languages have existing answers and what sort of target you have to beat:

var QUESTION_ID=69;
var OVERRIDE_USER=98;

var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk";var answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;function answersUrl(index){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+index+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}
function commentUrl(index,answers){return"https://api.stackexchange.com/2.2/answers/"+answers.join(';')+"/comments?page="+index+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}
function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(data){answers.push.apply(answers,data.items);answers_hash=[];answer_ids=[];data.items.forEach(function(a){a.comments=[];var id=+a.share_link.match(/\d+/);answer_ids.push(id);answers_hash[id]=a});if(!data.has_more)more_answers=!1;comment_page=1;getComments()}})}
function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(data){data.items.forEach(function(c){if(c.owner.user_id===OVERRIDE_USER)
answers_hash[c.post_id].comments.push(c)});if(data.has_more)getComments();else if(more_answers)getAnswers();else process()}})}
getAnswers();var SCORE_REG=(function(){var headerTag=String.raw `h\d`
var score=String.raw `\-?\d+\.?\d*`
var normalText=String.raw `[^\n<>]*`
var strikethrough=String.raw `<s>${normalText}</s>|<strike>${normalText}</strike>|<del>${normalText}</del>`
var noDigitText=String.raw `[^\n\d<>]*`
var htmlTag=String.raw `<[^\n<>]+>`
return new RegExp(String.raw `<${headerTag}>`+String.raw `\s*([^\n,]*[^\s,]),.*?`+String.raw `(${score})`+String.raw `(?=`+String.raw `${noDigitText}`+String.raw `(?:(?:${strikethrough}|${htmlTag})${noDigitText})*`+String.raw `</${headerTag}>`+String.raw `)`)})();var OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(a){return a.owner.display_name}
function process(){var valid=[];answers.forEach(function(a){var body=a.body;a.comments.forEach(function(c){if(OVERRIDE_REG.test(c.body))
body='
'+c.body.replace(OVERRIDE_REG,'')+'
'});var match=body.match(SCORE_REG);if(match)
valid.push({user:getAuthorName(a),size:+match[2],language:match[1],link:a.share_link,})});valid.sort(function(a,b){var aB=a.size,bB=b.size;return aB-bB});var languages={};var place=1;var lastSize=null;var lastPlace=1;valid.forEach(function(a){if(a.size!=lastSize)
lastPlace=place;lastSize=a.size;++place;var answer=jQuery("#answer-template").html();answer=answer.replace("{{PLACE}}",lastPlace+".").replace("{{NAME}}",a.user).replace("{{LANGUAGE}}",a.language).replace("{{SIZE}}",a.size).replace("{{LINK}}",a.link);answer=jQuery(answer);jQuery("#answers").append(answer);var lang=a.language;lang=jQuery(''+a.language+'').text().toLowerCase();languages[lang]=languages[lang]||{lang:a.language,user:a.user,size:a.size,link:a.link,uniq:lang}});var langs=[];for(var lang in languages)
if(languages.hasOwnProperty(lang))
langs.push(languages[lang]);langs.sort(function(a,b){if(a.uniq>b.uniq)return 1;if(a.uniq<b.uniq)return-1;return 0});for(var i=0;i<langs.length;++i)
{var language=jQuery("#language-template").html();var lang=langs[i];language=language.replace("{{LANGUAGE}}",lang.lang).replace("{{NAME}}",lang.user).replace("{{SIZE}}",lang.size).replace("{{LINK}}",lang.link);language=jQuery(language);jQuery("#languages").append(language)}}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list{padding:10px;float:left}#language-list{padding:10px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

  <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/primary.css?v=f52df912b654">

Winners by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}

{{LANGUAGE}}	{{NAME}}	{{SIZE}}

 ```

答:
Cheddar, 56 bytes

```<code>var a='var a=%s;print a%@"39+a+@"39';print a%@"39+a+@"39
</code>```

Try it online!

I felt like trying to make something in Cheddar today, and this is what appeared...

ContentLicense: CC BY-SA 4.0

Title: Golf you a quine for great good!

Body:
Cheddar, 56 bytes

var a='var a=%s;print a%@"39+a+@"39';print a%@"39+a+@"39

Try it online!

I felt like trying to make something in Cheddar today, and this is what appeared...


问:
Program that creates larger versions of itself (quine-variant)
You are to write a program that will output source code that is

Larger than the original program (character wise)

Will print another program larger than itself when run (i.e. the new program is also a valid answer to this challenge) indefinitely

This is code-golf, so shortest answer wins.

答:
reticular, 11 bytes, noncompeting

```<code>"'34'coo1o;
</code>```

This is the standard quine framework, except an extra 1 is printed after each iteration. Try it online!

First few outputs:

```<code>"'34'coo1o;
"'34'coo1o;1
"'34'coo1o;11
"'34'coo1o;111
</code>```

Body:
reticular, 11 bytes, noncompeting

"'34'coo1o;

This is the standard quine framework, except an extra 1 is printed after each iteration. Try it online!

First few outputs:

"'34'coo1o;
"'34'coo1o;1
"'34'coo1o;11
"'34'coo1o;111


答:
Perl 6, 23 bytes

{($^a,{[$_]}...*)[$^b]}
```

<h2>Expanded:</h2>

<pre class="lang-perl6 prettyprint-override"><code>{ # bare block lambda with two placeholder parameters ｢$a｣ and ｢$b｣
  (

    # generate Sequence

    $^a,       # declare first input
    { [ $_ ] } # lambda that adds one array layer
    ...        # do that until
    *          # Whatever

  )[ $^b ]     # index into the sequence
}
</code>```

Title: Nest a string inside an array n times

Body:
Perl 6, 23 bytes

{($^a,{[$_]}...*)[$^b]}

Expanded:

{ # bare block lambda with two placeholder parameters ｢$a｣ and ｢$b｣
  (

    # generate Sequence

    $^a,       # declare first input
    { [ $_ ] } # lambda that adds one array layer
    ...        # do that until
    *          # Whatever

  )[ $^b ]     # index into the sequence
}


问:
Vertically collapse text
Say I have text like this (each word on one line, with no spaces)

```<code>Programming
Puzzles
&
Code
Golf
</code>```

That makes no sense! It totally defies the laws of physics.

Your challenge is to remedy this impossible situation and collapse the text like so:

```<code>P
Prog
&uzz
Coderam
Golflesming
</code>```

So that there is no empty space underneath any character but the characters retain their vertical order.

The goal is to satisfy the requirements but use the fewest bytes of source code possible.

答:
Turtlèd, 72 bytes, noncompeting

Fairly sure I could change approach to save bytes, but later.

:p Non-golf esolang beats regular langs :p

The odd thing about Turtlèd is it was originally made after discussion about ascii art langs, but it actually seems to be best at these kinds of challenges

Turtlèd can not take newline input but for multiple inputs, and this takes only one input: terminate each word with a space, including the last one.

```<code>!l[*,+r_][ l]ur[*,[ -.]+.[ r{ d}u+.]-.[ -.]{ l}[ l]r[ u]_]' d[ d]u[ ' r]
</code>```

Try it online!

Explanation:

```<code>!                          Take string input
 l                         Move left, off the asterisk at the start of grid
  [*    ]                  Until cell is *
    ,+r_       write *, string pointer+=1, move right, write * if pointed char is last char
         [ l]ur    move left until finding a space, move up and right
               [*                                        ]     Until cell is *
                 ,                               write *
                  [   ]             until cell is [space]
                    -.               decrement string pointer, write pointed char
                       +.           increment and write string pointer
                         [         ] until cell is [space]
                           r{ d}     move right, move down until finding nonspace
                                u+.  move up, string pointer+=1 and write pointed char
                                    -.      decrement string pointer and write pointed char
                                      [   ]  until cell is [space]
                                        -.  string pointer-=1 and write pointed char
                                           { l}   move left until finding nonspace
                                               [ l]   move left until finding space
                                                   r   move right
                                                    [ u]  move up until finding space
                                                        _  write * if pointed char is last char
                                                          (if it is written, loop ends)

                                                          ' d[ d]u[ ' r] just cleanup
</code>```

Title: Vertically collapse text

Body:
Turtlèd, 72 bytes, noncompeting

Fairly sure I could change approach to save bytes, but later.

:p Non-golf esolang beats regular langs :p

The odd thing about Turtlèd is it was originally made after discussion about ascii art langs, but it actually seems to be best at these kinds of challenges

Turtlèd can not take newline input but for multiple inputs, and this takes only one input: terminate each word with a space, including the last one.

!l[*,+r_][ l]ur[*,[ -.]+.[ r{ d}u+.]-.[ -.]{ l}[ l]r[ u]_]' d[ d]u[ ' r]

Try it online!

Explanation:

!                          Take string input
 l                         Move left, off the asterisk at the start of grid
  [*    ]                  Until cell is *
    ,+r_       write *, string pointer+=1, move right, write * if pointed char is last char
         [ l]ur    move left until finding a space, move up and right
               [*                                        ]     Until cell is *
                 ,                               write *
                  [   ]             until cell is [space]
                    -.               decrement string pointer, write pointed char
                       +.           increment and write string pointer
                         [         ] until cell is [space]
                           r{ d}     move right, move down until finding nonspace
                                u+.  move up, string pointer+=1 and write pointed char
                                    -.      decrement string pointer and write pointed char
                                      [   ]  until cell is [space]
                                        -.  string pointer-=1 and write pointed char
                                           { l}   move left until finding nonspace
                                               [ l]   move left until finding space
                                                   r   move right
                                                    [ u]  move up until finding space
                                                        _  write * if pointed char is last char
                                                          (if it is written, loop ends)

                                                          ' d[ d]u[ ' r] just cleanup


答:
Python 2, 32 bytes

lambda s,n:eval('['*n+`s`+']'*n)
```

Puts n open brackets before the string and n close brackets before it, then evals the result. If a string output is allowed, the eval can be removed.

Title: Nest a string inside an array n times

Body:
Python 2, 32 bytes

lambda s,n:eval('['*n+`s`+']'*n)

Puts n open brackets before the string and n close brackets before it, then evals the result. If a string output is allowed, the eval can be removed.


答:
J, 17 bytes

```<code>-.&' '"1&.(|:@|.)
</code>```

Quite pleasant solution.

Explanation:

```<code>-.&' '"1&.(|:@|.)  input: list of strings y
              |.   reverse lines
           |:@     then transpose
-.&' '"1           remove blanks from columns
        &.         and undo the inside
           |:@|.   (that is, transpose and reverse again.)
</code>```

Test case explained

```<code>   s
Programming
Puzzles
&
Code
Golf
   |.s
Golf
Code
&
Puzzles
Programming
   |:|.s
GC&PP
oo ur
ld zo
fe zg
   lr
   ea
   sm
    m
    i
    n
    g
   -.&' '"1|:|.s
GC&PP
oour
ldzo
fezg
lr
ea
sm
m
i
n
g
   |.-.&' '"1|:|.s
g
n
i
m
sm
ea
lr
fezg
ldzo
oour
GC&PP
   |.|:-.&' '"1|:|.s
P
Prog
&uzz
Coderam
Golflesming
   (-.&' '"1)&.(|:@|.)s
P
Prog
&uzz
Coderam
Golflesming
   -.&' '"1&.(|:@|.)s
P
Prog
&uzz
Coderam
Golflesming
</code>```

Test cases

```<code>   f =: -.&' '"1&.(|:@|.)
   f
-.&' '"1&.(|:@|.)
   f >'Programming';'Puzzles';'&';'Code';'Golf'
P
Prog
&uzz
Coderam
Golflesming
   g =: [: > [: <;._1 '|'&,
   g 'Programming|Puzzles|&|Code|Golf'
Programming
Puzzles
&
Code
Golf
   f g 'Programming|Puzzles|&|Code|Golf'
P
Prog
&uzz
Coderam
Golflesming
   F =: f @ g
   F &. > 'Programming|Puzzles|&|Code|Golf' ; '1|23|456|7890' ; '1234|567|89|0'
+-----------+----+----+
|P          |1   |1   |
|Prog       |23  |52  |
|&uzz       |456 |863 |
|Coderam    |7890|0974|
|Golflesming|    |    |
+-----------+----+----+
</code>```

Title: Vertically collapse text

Body:
Say I have text like this (each word on one line, with no spaces)

```<code>Programming
Puzzles
&
Code
Golf
</code>```

That makes no sense! It totally defies the laws of physics.

Your challenge is to remedy this impossible situation and collapse the text like so:

```<code>P
Prog
&uzz
Coderam
Golflesming
</code>```

So that there is no empty space underneath any character but the characters retain their vertical order.

The goal is to satisfy the requirements but use the fewest bytes of source code possible.

Body:
J, 17 bytes

-.&' '"1&.(|:@|.)

Quite pleasant solution.

Explanation:

-.&' '"1&.(|:@|.)  input: list of strings y
              |.   reverse lines
           |:@     then transpose
-.&' '"1           remove blanks from columns
        &.         and undo the inside
           |:@|.   (that is, transpose and reverse again.)

Test case explained

   s
Programming
Puzzles
&
Code
Golf
   |.s
Golf
Code
&
Puzzles
Programming
   |:|.s
GC&PP
oo ur
ld zo
fe zg
   lr
   ea
   sm
    m
    i
    n
    g
   -.&' '"1|:|.s
GC&PP
oour
ldzo
fezg
lr
ea
sm
m
i
n
g
   |.-.&' '"1|:|.s
g
n
i
m
sm
ea
lr
fezg
ldzo
oour
GC&PP
   |.|:-.&' '"1|:|.s
P
Prog
&uzz
Coderam
Golflesming
   (-.&' '"1)&.(|:@|.)s
P
Prog
&uzz
Coderam
Golflesming
   -.&' '"1&.(|:@|.)s
P
Prog
&uzz
Coderam
Golflesming

Test cases

   f =: -.&' '"1&.(|:@|.)
   f
-.&' '"1&.(|:@|.)
   f >'Programming';'Puzzles';'&';'Code';'Golf'
P
Prog
&uzz
Coderam
Golflesming
   g =: [: > [: <;._1 '|'&,
   g 'Programming|Puzzles|&|Code|Golf'
Programming
Puzzles
&
Code
Golf
   f g 'Programming|Puzzles|&|Code|Golf'
P
Prog
&uzz
Coderam
Golflesming
   F =: f @ g
   F &. > 'Programming|Puzzles|&|Code|Golf' ; '1|23|456|7890' ; '1234|567|89|0'
+-----------+----+----+
|P          |1   |1   |
|Prog       |23  |52  |
|&uzz       |456 |863 |
|Coderam    |7890|0974|
|Golflesming|    |    |
+-----------+----+----+


答:
Racket 83 bytes

```<code>(for((c n))(set! s(apply string-append(if(= c 0)(list"[\'"s"\']")(list"["s"]")))))s
</code>```

Ungolfed:

```<code>(define (f s n)
  (for ((c n))
    (set! s (apply string-append
                   (if (= c 0)
                       (list "[\'" s "\']")
                       (list "[" s "]"))
                   )))
  s)
</code>```

Testing:

```<code>(f "test" 3)
</code>```

Output:

```<code>"[[['test']]]"
</code>```

Title: Nest a string inside an array n times

Body:
Racket 83 bytes

(for((c n))(set! s(apply string-append(if(= c 0)(list"[\'"s"\']")(list"["s"]")))))s

Ungolfed:

(define (f s n)
  (for ((c n))
    (set! s (apply string-append
                   (if (= c 0)
                       (list "[\'" s "\']")
                       (list "[" s "]"))
                   )))
  s)

Testing:

(f "test" 3)

Output:

"[[['test']]]"


答:
Autovim, <s>85</s> 81 bytes

No animation, probably still golfable... Still,  not bad for the new kid on the block! (autovim)

```<code>ñ9am␛ÿP2xÿP4xyjGpđp2o
%ce 15
®q=8j$p
®z=6␍"_d3hP
ñğyG12PğÿPC^o^␛v^y6@q==o␛6@z==O
</code>```

To run it:

```<code>autovim run ascii-bat.autovim -ni
</code>```

Explanation

In short, we draw the moon, copy and paste it 12 times, and use two macros: one to append the bat on the first 7 moons, the other to prepend the last 6.

```<code>" Draw the moon
ñ                                 " Normal mode
 9am␛                            " Write 9 `m`
      ÿP                          " Duplicate the line
        2x                        " Delete two characters
          ÿP                      " Duplicate the line
            4x                    " Delete 4 characters
              yj                  " Yank two lines
                Gp                " Paste at the end of the file
                  đp              " inverts the current line with the previous
                    2o            " Add two line breaks

%ce 15                            " Center our moon

" Macros
®q=8j$p                           " Macro `q` jumps 8 lines, and pastes
                                  "   at the end
®z=6␍"_d3hP                      " Macro `z` jumps 6 lines and replaces
                                  "   the previous 3 characters by the default

" Draw all 12 moons and add the bats
                                  "   register's content
ñ                                 " Run in normal mode
 ğyG                              " Copy the moon we just drew
    12P                           " Duplicate the moon 12 times
       ğÿP                        " Duplicate the top line (gets 3 centered `m`)
          C^o^␛                  " Change the mmm by a bat
                v^y               " Copy the bat we just drew
                   6@q            " Add the first 6 bats
                      ==          " Center the bat
                        o␛       " Add a line under the bat
                           6@z    " Add the 6 last bats
                              ==  " Align the last bat in the center
                                O " Add a line over the last moon
</code>```

Title: Make an ASCII bat fly around an ASCII moon

Body:
Background

Here is a Halloween related challenge.

As you may have seen from my last challenge I quite like what I term as ascii art animations, that is not just draw a pattern but draw a pattern that progresses. This idea came to me after I was asked a couple of years ago to liven up a (rather dull) presentation by making random ascii bats fly across the screen on Halloween. Needless to say I duly obliged (I was being paid for it) but it made me think that there is more to life than random bats. Inspired by this I would like to propose this challenge.

Challenge

Make a bat fly around the moon.

Here is a bat:

```<code>^o^
</code>```

Here is the moon:

```<code>     mmm
   mmmmmmm
  mmmmmmmmm
   mmmmmmm
     mmm
</code>```

You must show every stage of the bats flight (see output).

Input

None

Output

```<code>      ^o^
      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm^o^
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm
    mmmmmmm^o^
   mmmmmmmmm
    mmmmmmm
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm^o^
    mmmmmmm
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm^o^
      mmm

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm^o^

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm
      ^o^

      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
   ^o^mmm

      mmm
    mmmmmmm
   mmmmmmmmm
 ^o^mmmmmmm
      mmm

      mmm
    mmmmmmm
^o^mmmmmmmmm
    mmmmmmm
      mmm

      mmm
 ^o^mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

   ^o^mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm

      ^o^
      mmm
    mmmmmmm
   mmmmmmmmm
    mmmmmmm
      mmm
</code>```

Rules

No reading from external files or websites

You may submit a full program or a function

Extra spaces and/or newlines are fine by me

Standard loopholes banned as usual

The bat must finish back at the top of the moon

Please feel free to clear the screen between frames if you wish however this is not a requirement. Output as shown above is fine

As this is code golf, the winner will be the answer with the lowest byte count although any answer is welcome

Sample

Reference implementation in totally ungolfed Python 2 (620 bytes but just to prove that it can be done. May golf it later).

```<code>b='^o^'
m=['                     ',
'         mmm         ',
'       mmmmmmm       ',
'      mmmmmmmmm      ',
'       mmmmmmm       ',
'         mmm         ',
'                     ']
p=[(9,12),(12,15),(14,17),(15,18),(14,17),(12,15),(9,12),(6,9),(4,7),(3,6),(4,7),(6,9),(9,12)]
d=0
for z in range(7):
    x=map(str,m[z])
    c="".join(x[:p[z][0]]) + b + "".join(x[p[z][1]:])+"\n"
    print "\n".join(m[:z]) + "\n" + c+"\n".join(m[z+1:])
for z in range(6)[::-1]:
    x=map(str,m[z])
    c="".join(x[:p[z+6][0]]) + b + "".join(x[p[z+6][1]:])+"\n"
    print "\n".join(m[:z]) + "\n" + c+"\n".join(m[z+1:])
</code>```

Result

Although @Jonathan obviously wins on byte count with Jelly, I am going to mark the Brainfuck answer from @Oyarsa as the accepted answer purely because I think that anyone who can actually do something like this in such a crazy language deserves +15 rep no matter how many bytes it takes. This is not because I have any problem with golfing languages. See my answer to a question regarding this on meta if you have any doubts. Many thanks and respect to all who contributed in whatever language.

Body:
Autovim, <s>85</s> 81 bytes

No animation, probably still golfable... Still,  not bad for the new kid on the block! (autovim)

ñ9am␛ÿP2xÿP4xyjGpđp2o
%ce 15
®q=8j$p
®z=6␍"_d3hP
ñğyG12PğÿPC^o^␛v^y6@q==o␛6@z==O

To run it:

autovim run ascii-bat.autovim -ni

Explanation

In short, we draw the moon, copy and paste it 12 times, and use two macros: one to append the bat on the first 7 moons, the other to prepend the last 6.

" Draw the moon
ñ                                 " Normal mode
 9am␛                            " Write 9 `m`
      ÿP                          " Duplicate the line
        2x                        " Delete two characters
          ÿP                      " Duplicate the line
            4x                    " Delete 4 characters
              yj                  " Yank two lines
                Gp                " Paste at the end of the file
                  đp              " inverts the current line with the previous
                    2o            " Add two line breaks

%ce 15                            " Center our moon

" Macros
®q=8j$p                           " Macro `q` jumps 8 lines, and pastes
                                  "   at the end
®z=6␍"_d3hP                      " Macro `z` jumps 6 lines and replaces
                                  "   the previous 3 characters by the default

" Draw all 12 moons and add the bats
                                  "   register's content
ñ                                 " Run in normal mode
 ğyG                              " Copy the moon we just drew
    12P                           " Duplicate the moon 12 times
       ğÿP                        " Duplicate the top line (gets 3 centered `m`)
          C^o^␛                  " Change the mmm by a bat
                v^y               " Copy the bat we just drew
                   6@q            " Add the first 6 bats
                      ==          " Center the bat
                        o␛       " Add a line under the bat
                           6@z    " Add the 6 last bats
                              ==  " Align the last bat in the center
                                O " Add a line over the last moon


答:
Racket 312 bytes

```<code>(let((lr list-ref)(ls list-set)(sl string-length)(ss substring)(l(string-split s)))(let p((ch #f))
(for((i(-(length l)1)))(define s(lr l i))(define r(lr l(+ 1 i)))(define n(sl s))(define m(sl r))
(when(> n m)(set! l(ls l i(ss s 0 m)))(set! l(ls l(+ 1 i)(string-append r(ss s m n))))(set! ch #t)))(if ch(p #f)l)))
</code>```

Ungolfed:

```<code>(define (f s)
  (let ((lr list-ref)
        (ls list-set)
        (sl string-length)
        (ss substring)
        (l (string-split s)))
    (let loop ((changed #f))
      (for ((i (sub1 (length l))))
        (define s (lr l i))
        (define r (lr l (add1 i)))
        (define n (sl s))
        (define m (sl r))
        (when (> n m)
          (set! l (ls l i (ss s 0 m)))
          (set! l (ls l (add1 i)(string-append r (ss s m n))))
          (set! changed #t)))
      (if changed (loop #f)
          l))))
</code>```

Testing:

```<code>(f "Programming Puzzles & Code Golf")
</code>```

Output:

```<code>'("P" "Prog" "&uzz" "Coderam" "Golflesming")
</code>```

Title: Vertically collapse text

Body:
Racket 312 bytes

(let((lr list-ref)(ls list-set)(sl string-length)(ss substring)(l(string-split s)))(let p((ch #f))
(for((i(-(length l)1)))(define s(lr l i))(define r(lr l(+ 1 i)))(define n(sl s))(define m(sl r))
(when(> n m)(set! l(ls l i(ss s 0 m)))(set! l(ls l(+ 1 i)(string-append r(ss s m n))))(set! ch #t)))(if ch(p #f)l)))

Ungolfed:

(define (f s)
  (let ((lr list-ref)
        (ls list-set)
        (sl string-length)
        (ss substring)
        (l (string-split s)))
    (let loop ((changed #f))
      (for ((i (sub1 (length l))))
        (define s (lr l i))
        (define r (lr l (add1 i)))
        (define n (sl s))
        (define m (sl r))
        (when (> n m)
          (set! l (ls l i (ss s 0 m)))
          (set! l (ls l (add1 i)(string-append r (ss s m n))))
          (set! changed #t)))
      (if changed (loop #f)
          l))))

Testing:

(f "Programming Puzzles & Code Golf")

Output:

'("P" "Prog" "&uzz" "Coderam" "Golflesming")


问:
Exploded Suffixes
Given an ASCII string, output the exploded suffixes of it. For example, if the string was abcde, there are 5 suffixes, ordered longest to shortest:

```<code>abcde
bcde
cde
de
e
</code>```

Each suffix is then exploded, meaning each character is copied as many times as its one-indexed location in that suffix. For example, exploding the suffixes of abcde,

```<code>abcde
12345
abbcccddddeeeee

bcde
1234
bccdddeeee

cde
123
cddeee

de
12
dee

e
1
e
</code>```

Altogether, the exploded suffixes of abcde are

```<code>abbcccddddeeeee
bccdddeeee
cddeee
dee
e
</code>```

Rules

This is code-golf so the shortest code wins.

The input will consist of the printable ASCII characters. (This excludes newlines but includes spaces.)

The output will have each string on a separate line.

Trailing spaces are allowed on each line and there may be an extra newline at the end.

Test Cases

```<code>''

'a'
a

'bc'
bcc
c

'xyz'
xyyzzz
yzz
z

'code-golf'
coodddeeee-----ggggggooooooollllllllfffffffff
oddeee----gggggoooooolllllllffffffff
dee---ggggooooollllllfffffff
e--gggoooolllllffffff
-ggooollllfffff
goolllffff
ollfff
lff
f

's p a c e'
s  ppp    aaaaa      ccccccc        eeeeeeeee
 pp   aaaa     cccccc       eeeeeeee
p  aaa    ccccc      eeeeeee
 aa   cccc     eeeeee
a  ccc    eeeee
 cc   eeee
c  eee
 ee
e
</code>```

答:
Vim, 43 bytes

qqYlpx@qq@qqr0<C-H><C-V>{$:s/\v%V(.)\1*/&\1/g<CR>@rq@r

First macro separates the suffixes, second macro "explodes" them. Likely beatable. Spaces are annoying.

Title: Exploded Suffixes


答:
Actually, 4 bytes

Input is string then n. Golfing suggestions welcome. Try it online!

```<code>`k`n
</code>```

Ungolfing

```<code>          Implicit input string, then n.
`...`n    Run the function n times.
  k         Wrap the stack in a list.
          Implicit return.
</code>```

Title: Nest a string inside an array n times

Body:
Actually, 4 bytes

Input is string then n. Golfing suggestions welcome. Try it online!

`k`n

Ungolfing

          Implicit input string, then n.
`...`n    Run the function n times.
  k         Wrap the stack in a list.
          Implicit return.


问:
Sum of neighbours
This should be a fairly simple challenge.

For an array of numbers, generate an array where for every element all neighbouring elements are added to itself, and return the sum of that array.

Here is the transformation which occurs on the input array [1,2,3,4,5]

```<code>[1,2,3,4,5] => [1+2, 2+1+3, 3+2+4, 4+3+5, 5+4] => [3,6,9,12,9] => 39
 0          => neighbours of item 0, including item 0
[1,2]       => 1 + 2      => 3
   1
[1,2,3]     => 1 + 2 + 3  => 6
     2
  [2,3,4]   => 2 + 3 + 4  => 9
       3
    [3,4,5] => 3 + 4 + 5  => 12
         4
      [4,5] => 4 + 5      => 9

               3+6+9+12+9 => 39
</code>```

Test cases

```<code>[]            => 0 (or falsy)
[1]           => 1
[1,4]         => 10 (1+4 + 4+1)
[1,4,7]       => 28
[1,4,7,10]    => 55
[-1,-2,-3]    => -14
[0.1,0.2,0.3] => 1.4
[1,-20,300,-4000,50000,-600000,7000000] => 12338842
</code>```

Leaderboard

var QUESTION_ID=96188,OVERRIDE_USER=41257;function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"http://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
Actually, 9 bytes

Golfing suggestions welcome. Try it online!

```<code>3@VdXpXΣΣ
</code>```

Ungolfing

```<code>       Implicit input a.
3@V    Push all slices of a of length 1 <= n <= 3.
dXpX   Get rid of the first and last slices since they're length 1 lists.
Σ      Summing a 2D array essentially flattens into a 1D array.
Σ      Push sum(a).
       Implicit return.
</code>```

Title: Sum of neighbours

Body:
Actually, 9 bytes

Golfing suggestions welcome. Try it online!

3@VdXpXΣΣ

Ungolfing

       Implicit input a.
3@V    Push all slices of a of length 1 <= n <= 3.
dXpX   Get rid of the first and last slices since they're length 1 lists.
Σ      Summing a 2D array essentially flattens into a 1D array.
Σ      Push sum(a).
       Implicit return.


问:
"Convenient palindrome" checker
If you've ever tried to write palindromic code before, you'd know how much brackets tend to get in your way. ()() is not a palindrome, even though it kinda looks like it should be, while ())( and ()( are both palindromic and both very dumb looking. Wouldn't it be convenient if it was the other way around?

A string is conveniently palindromic if it is equal to the string derived when its reverse has all its parentheses (()), brackets ([]), and braces ({}) flipped. No other characters are special and require flipping. (<> are sometimes paired but often not so they are left out.)

Your task is to write, in your language, a program (taking input on STDIN) or a function (taking a single string argument) which (a) gives a consistent true value* when its argument is conveniently palindromic and a different, consistent false value otherwise, and (b) is itself conveniently palindromic.

For example, the following inputs are conveniently palindromic:

```<code>racecar
(a)(bb)(a)
void main(int argc, *char[] argv) {} (vgra []rahc* ,cgra tni)niam diov
</code>```

And the following are not:

```<code>non-palindrome
A nut for a jar of tuna?
(old [style] parens) )snerap ]elyts[ dlo(
ingirumimusnocte)etconsumimurigni
</code>```

You may not rely on any external state (specific filename, directory structure, other user input, web access, etc) except interpreter/compiler flags.

Also, you may not use "the comment trick" where you comment out or render unused some piece of code by taking advantage of your language's commenting facilities. For instance, all of the following are not allowed, because they contain non-functional parts that can be safely removed or destroyed (at the expense of losing conveniently-palindromic-ness):

```<code>{some code} // {edoc emos}
{some code} NB.BN {edoc emos}
"n\" ;{edoc emos} ;"; {some code}; "\n"
</code>```

Obviously this might not cover every such case, but the spirit of the challenge here is not to use comments and unparsed** code to achieve palindrominess, instead making use of the corrected parens and brackets. I'm looking at you, LISP, Brainfuck.

This is a code-golf, so the shortest code wins, but all lengths of code are welcome.

* By consistent true and false values, I mean that you can return one of a pair of values, such as 1 for true and 0 for false, or False for true and "no" for false, so long as these values are different from each other, and do not change from run to run of your program. Use whatever saves you characters.

** Not to be confused with unexecuted: code that is valid and might do weird things but never called is fine.

答:
05AB1E, 35 bytes

```<code>"{[()]}"DRr‡`rJ¹Q,Q¹Jr`‡rRD"{[()]}"
</code>```

Try it online!

Explanation:

```<code>                     # Implicit input
 "{[()]}"            # Push "{[()]}" onto the stack
         DR          # Pushes a reversed copy onto the stack
           r         # Reverse the order of the stack
            ‡        # Transliterate
             `       # Flatten array on stack
              r      # Reverse order of stack
               J     # Join stack
                ¹Q   # Check equality with first input
                  ,  # Print
                     # Everything after is still syntactically correct, but just does not print anything.
</code>```

Title: "Convenient palindrome" checker

Body:
05AB1E, 35 bytes

"{[()]}"DRr‡`rJ¹Q,Q¹Jr`‡rRD"{[()]}"

Try it online!

Explanation:

                     # Implicit input
 "{[()]}"            # Push "{[()]}" onto the stack
         DR          # Pushes a reversed copy onto the stack
           r         # Reverse the order of the stack
            ‡        # Transliterate
             `       # Flatten array on stack
              r      # Reverse order of stack
               J     # Join stack
                ¹Q   # Check equality with first input
                  ,  # Print
                     # Everything after is still syntactically correct, but just does not print anything.


答:
Actually, 13 bytes

This uses the algorithm described in Dennis' Jelly answer. Input and output are both lists of strings. Unfortunately, the builtin transpose function does not work very well if the inner lists or strings aren't all the same length, which would kind of defeat the point of vertically collapsing in the first place. Golfing suggestions welcome. Try it online!

```<code>R2`;i(lZ♂Σ`nR
</code>```

Ungolfing

```<code>          Implicit input s.
R         Reverse s.
2`...`n   Run the following function twice.
  ;i        Duplicate and flatten onto the stack.
  (l        Get the number of strings in the list.
  Z         Zip len strings together, which results in a list of lists of characters.
  ♂Σ        Sum each list of characters, which essentially joins them together.
           This function essentially transposes
R         Reverse the result.
          Implicit return.
</code>```

Title: Vertically collapse text

Body:
Actually, 13 bytes

This uses the algorithm described in Dennis' Jelly answer. Input and output are both lists of strings. Unfortunately, the builtin transpose function does not work very well if the inner lists or strings aren't all the same length, which would kind of defeat the point of vertically collapsing in the first place. Golfing suggestions welcome. Try it online!

R2`;i(lZ♂Σ`nR

Ungolfing

          Implicit input s.
R         Reverse s.
2`...`n   Run the following function twice.
  ;i        Duplicate and flatten onto the stack.
  (l        Get the number of strings in the list.
  Z         Zip len strings together, which results in a list of lists of characters.
  ♂Σ        Sum each list of characters, which essentially joins them together.
           This function essentially transposes
R         Reverse the result.
          Implicit return.


答:
Vim, 21 bytes

yGPP<C-V>GI+<Esc>DgvJD^C<C-R>=<C-R>"<CR>

Input is one number per line. Same algorithm as other entries (triplicate array, remove first and last items, sum).

Title: Sum of neighbours

Body:
This should be a fairly simple challenge.

For an array of numbers, generate an array where for every element all neighbouring elements are added to itself, and return the sum of that array.

Here is the transformation which occurs on the input array [1,2,3,4,5]

```<code>[1,2,3,4,5] => [1+2, 2+1+3, 3+2+4, 4+3+5, 5+4] => [3,6,9,12,9] => 39
 0          => neighbours of item 0, including item 0
[1,2]       => 1 + 2      => 3
   1
[1,2,3]     => 1 + 2 + 3  => 6
     2
  [2,3,4]   => 2 + 3 + 4  => 9
       3
    [3,4,5] => 3 + 4 + 5  => 12
         4
      [4,5] => 4 + 5      => 9

               3+6+9+12+9 => 39
</code>```

Test cases

```<code>[]            => 0 (or falsy)
[1]           => 1
[1,4]         => 10 (1+4 + 4+1)
[1,4,7]       => 28
[1,4,7,10]    => 55
[-1,-2,-3]    => -14
[0.1,0.2,0.3] => 1.4
[1,-20,300,-4000,50000,-600000,7000000] => 12338842
</code>```

Leaderboard

var QUESTION_ID=96188,OVERRIDE_USER=41257;function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"http://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```


问:
Showcase of Languages

Notes

This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not create additional showcase questions.

This is no longer a popularity-contest, nor are snippet lengths limited by the vote tally. If you know this thread from before, please make sure you familiarize yourself with the changes.

This thread is dedicated to showing off interesting, useful, obscure, and/or unique features your favorite programming languages have to offer. This is neither a challenge nor a competition, but a collaboration effort to showcase as many programming languages as possible as well as possible.

How this works

All answers should include the name of the programming language at the top of the post, prefixed by a #.

Answers may contain one (and only one) factoid, i.e., a couple of sentences without code that describe the language.

Aside from the factoid, answers should consist of snippets of code, which can (but don't have to be) programs or functions.

The snippets do not need to be related. In fact, snippets that are too related may be redundant.

Since this is not a contest, all programming languages are welcome, whenever they were created.

Answers that contain more than a handful of code snippets should use a Stack Snippet to collapse everything except the factoid and one of the snippets.

Whenever possible, there should be only one answer per programming language. This is a community wiki, so feel free to add snippets to any answer, even if you haven't created it yourself. There is a Stack Snippet for compressing posts, which should mitigate the effect of the 30,000 character limit.

Answers that predate these guidelines should be edited. Please help updating them as needed.

Current answers, sorted alphabetically by language name

$.ajax({type:"GET",url:"https://api.stackexchange.com/2.2/questions/44680/answers?site=codegolf&filter=withbody",success:function(data){for(var i=0;i<data.items.length;i++){var temp=document.createElement('p');temp.innerHTML = data.items[i].body.split("\n")[0];$('#list').append('
' + temp.innerText || temp.textContent + '');}}})```
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><base href="http://codegolf.stackexchange.com"><ul id="list"></ul></code>```

答:
Pip

An imperative golfing language with infix operators, with commands in printable ASCII. While these design decisions mean that Pip will probably never beat Jelly in a golf contest, they also make the language much easier to learn and use.

Factoid

To my knowledge, Pip was the first golfing language to have built-in regex support.

The header of each snippet is a TryItOnline link.

Length 1

```<code>a
</code>```

Pip's default method of getting input is by command-line arguments (hereinafter "cmdline args"). The first five args are assigned to the variables a through e, and the whole list is assigned to g.

Since it is at the end of the program, the expression a is auto-printed. So this program outputs the first cmdline arg.

Length 2

```<code>/q
</code>```

To get input from stdin, use the q special variable. Every time it is referenced, it reads a line of input.

Many operators have both binary and unary versions. This is expected behavior for operators like -, and makes good sense for others like ^ split and J join. Here we have a somewhat unusual example: unary / inverts its argument. Inputting 4 will give 0.25 as output, and vice versa.

This snippet also demonstrates a feature that Pip shares with Perl and PHP: numbers are strings and strings are numbers. Both are represented by a data type called Scalar. Upshot: you don't have to convert q's line of input to a number before doing math with it.

But what happens if you input something that's not a number, like Hello world? In a numeric context, it's treated as 0. Dividing by 0, like most error conditions, returns the special nil value, which produces no output when printed. If you want to see what went wrong, you can use the -w flag to enable warnings, in which case Pip will tell you:

```<code>Inverting zero
</code>```

Length 3

Uses the -p flag (+1 byte).

```<code>^g
</code>```

As mentioned above, g is a list of all cmdline args. Many operators work itemwise on lists, and ^ (split) is one of them. This code splits the items of g into lists of characters.

If you ran this 2-byte code without the flag, it wouldn't be obvious what the program did, because Pip's default way of outputting lists is to concatenate the items together. To demonstrate that the split operation worked, we need to change the output format. About half of Pip's command-line flags have to do with list formatting. The -p flag applies RP (analogous to Python's repr) to the list before outputting it, making it easy to see the structure:

```<code>> python pip.py -pe "^g" 42 Hello
[[4;2];["H";"e";"l";"l";"o"]]
</code>```

Use the TIO link above to play around with the other list flags (-s, -n, -l, -P, -S) and see how the output changes.

Length 4

```<code>z@<h
</code>```

Lowercase letters h through z are global variables, preinitialized to different values. z is the lowercase alphabet; h is 100.

The @< "left-of" operator returns a slice from the left end of an iterable (scalar, list, or range). It's equivalent to Python iterable[:index]--except that the Pip version works even when the index is greater than the length of the iterable. In that case it repeats the iterable until it's longer than the index, then takes the slice (like take + cycle in Haskell). So z@<h gives the first 100 characters of the lowercase alphabet:

```<code>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv
</code>```

Length 5

```<code>2>1>0
</code>```

Comparison operators chain, as in Python. This program returns 1 (true).

Title: Showcase of Languages

Body:
Pip

An imperative golfing language with infix operators, with commands in printable ASCII. While these design decisions mean that Pip will probably never beat Jelly in a golf contest, they also make the language much easier to learn and use.

Factoid

To my knowledge, Pip was the first golfing language to have built-in regex support.

The header of each snippet is a TryItOnline link.

Length 1

a

Pip's default method of getting input is by command-line arguments (hereinafter "cmdline args"). The first five args are assigned to the variables a through e, and the whole list is assigned to g.

Since it is at the end of the program, the expression a is auto-printed. So this program outputs the first cmdline arg.

Length 2

/q

To get input from stdin, use the q special variable. Every time it is referenced, it reads a line of input.

Many operators have both binary and unary versions. This is expected behavior for operators like -, and makes good sense for others like ^ split and J join. Here we have a somewhat unusual example: unary / inverts its argument. Inputting 4 will give 0.25 as output, and vice versa.

This snippet also demonstrates a feature that Pip shares with Perl and PHP: numbers are strings and strings are numbers. Both are represented by a data type called Scalar. Upshot: you don't have to convert q's line of input to a number before doing math with it.

But what happens if you input something that's not a number, like Hello world? In a numeric context, it's treated as 0. Dividing by 0, like most error conditions, returns the special nil value, which produces no output when printed. If you want to see what went wrong, you can use the -w flag to enable warnings, in which case Pip will tell you:

Inverting zero

Length 3

Uses the -p flag (+1 byte).

^g

As mentioned above, g is a list of all cmdline args. Many operators work itemwise on lists, and ^ (split) is one of them. This code splits the items of g into lists of characters.

If you ran this 2-byte code without the flag, it wouldn't be obvious what the program did, because Pip's default way of outputting lists is to concatenate the items together. To demonstrate that the split operation worked, we need to change the output format. About half of Pip's command-line flags have to do with list formatting. The -p flag applies RP (analogous to Python's repr) to the list before outputting it, making it easy to see the structure:

> python pip.py -pe "^g" 42 Hello
[[4;2];["H";"e";"l";"l";"o"]]

Use the TIO link above to play around with the other list flags (-s, -n, -l, -P, -S) and see how the output changes.

Length 4

z@<h

Lowercase letters h through z are global variables, preinitialized to different values. z is the lowercase alphabet; h is 100.

The @< "left-of" operator returns a slice from the left end of an iterable (scalar, list, or range). It's equivalent to Python iterable[:index]--except that the Pip version works even when the index is greater than the length of the iterable. In that case it repeats the iterable until it's longer than the index, then takes the slice (like take + cycle in Haskell). So z@<h gives the first 100 characters of the lowercase alphabet:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

Length 5

2>1>0

Comparison operators chain, as in Python. This program returns 1 (true).


答:
Python 2, 112 bytes

b=['   ','^o^']
for k in range(91):r=k%7;print(b[k/7+r==12]*(r%6>0)+(r*(6-r)*8/5-5)*'m'+b[k/7%12==r]).center(15)
```

<p>Print the picture. Each line has three parts</p>

<ul>
<li>A potential bat on the left</li>
<li>Some number of <code>m</code>'s for the moon</li>
<li>A potential bat on the right</li>
</ul>

<p>These parts are concatenated and centered in a box of size 15 for spacing. To avoid the bats shifting the center, a missing bat is three spaces, the same length. For bats on top of or below the moon, the left bar slot is omitted and the right slot is occupied.</p>

<p>There are 91 lines: a 7-line picture for each of 13 pictures. These are counted up via divmod: As <code>k</code> counts from <code>0</code> to <code>91</code>, <code>(k/7, k%7)</code> goes</p>

```(0, 0)
(0, 1)
(0, 2)
(0, 3)
(0, 4)
(0, 5)
(0, 6)
(1, 0)
(1, 1)
 ....
(12, 5)
(12, 6)
```

Taking the first value k/7 to be the picture and the second value r=k%7 as the row number within the picture, this counts up first by picture, then by row number within each picture, both 0-indexed.

The number of m's in the moon changes with row number r=k%7 as [0,3,7,9,7,3,0]. Rather than indexing into this, a formula was shorter. A convenient degree of freedom is that the 0's can be any negative value, as this still gives the empty string when multiplied by m. Fiddling with a parabola and floor-dividing gave a formula r*(6-r)*8/5-5.

Now, we look at selecting whether to draw a bat or empty space on either side. The array b=['   ','^o^'] contains the options.

The bat in row 0 on in picture 0 (on top), in row 1 in picture 1 (on the right), on to in row 6 in picture 6 (on top). So, it's easy to check whether it appears as the row and picture number as being equal, k/7==r. But we also need picture 12 to look like picture 0, so we take the picture number modulo 12 first.

On the left it's similar. The bat appears on the left in rows r=5,4,3,2,1 in pictures 7,8,9,10,11. So, we check whether the  row and picture number sum to 12. We also make sure to draw nothing rather than three spaces on rows 0 and 6 -- the right bat slot will draw the bat, and we must not mess up its centering.

Body:
Python 2, 112 bytes

b=['   ','^o^']
for k in range(91):r=k%7;print(b[k/7+r==12]*(r%6>0)+(r*(6-r)*8/5-5)*'m'+b[k/7%12==r]).center(15)

Print the picture. Each line has three parts

A potential bat on the left

Some number of m's for the moon

A potential bat on the right

These parts are concatenated and centered in a box of size 15 for spacing. To avoid the bats shifting the center, a missing bat is three spaces, the same length. For bats on top of or below the moon, the left bar slot is omitted and the right slot is occupied.

There are 91 lines: a 7-line picture for each of 13 pictures. These are counted up via divmod: As k counts from 0 to 91, (k/7, k%7) goes

(0, 0)
(0, 1)
(0, 2)
(0, 3)
(0, 4)
(0, 5)
(0, 6)
(1, 0)
(1, 1)
 ....
(12, 5)
(12, 6)

Taking the first value k/7 to be the picture and the second value r=k%7 as the row number within the picture, this counts up first by picture, then by row number within each picture, both 0-indexed.

The number of m's in the moon changes with row number r=k%7 as [0,3,7,9,7,3,0]. Rather than indexing into this, a formula was shorter. A convenient degree of freedom is that the 0's can be any negative value, as this still gives the empty string when multiplied by m. Fiddling with a parabola and floor-dividing gave a formula r*(6-r)*8/5-5.

Now, we look at selecting whether to draw a bat or empty space on either side. The array b=['   ','^o^'] contains the options.

The bat in row 0 on in picture 0 (on top), in row 1 in picture 1 (on the right), on to in row 6 in picture 6 (on top). So, it's easy to check whether it appears as the row and picture number as being equal, k/7==r. But we also need picture 12 to look like picture 0, so we take the picture number modulo 12 first.

On the left it's similar. The bat appears on the left in rows r=5,4,3,2,1 in pictures 7,8,9,10,11. So, we check whether the  row and picture number sum to 12. We also make sure to draw nothing rather than three spaces on rows 0 and 6 -- the right bat slot will draw the bat, and we must not mess up its centering.


问:
Code that will only execute once
Goal

The goal of this challenge is to write code that will execute once and only once.  This means basically that it damages the program, script, or environment in some way.  If rebooting the system allows the code to run again that is permitted.

Scoring

Number of votes.  All assumptions must be clearly listed.  Any answers just initiating a reboot or halt will be disqualified.

Additional Rules because Greg Hewgill is a demi-god

No root access is permitted.

End Date

The contest will close on May 31, 2014.

Edit

This contest has been changed to popularity contest.

答:
Bash (7 characters)

```<code>TMOUT=1
</code>```

It destroying the user session within a second by terminating the shell. See: man bash.

Example:

```<code>$ TMOUT=1
timed out waiting for input: auto-logout
Saving session...completed.

[Process completed]
</code>```

Title: Code that will only execute once

Body:
Bash (7 characters)

TMOUT=1

It destroying the user session within a second by terminating the shell. See: man bash.

Example:

$ TMOUT=1
timed out waiting for input: auto-logout
Saving session...completed.

[Process completed]


答:
Agda, 173 bytes

Since the return type of the function depends on the number given as argument, this is clearly a case where a dependently typed language should be used. Unfortunately, golfing isn't easy in a language where you have to import naturals and lists to use them. On the plus side, they use suc where I would have expected the verbose succ. So here is my code:

```<code>module l where
open import Data.List
open import Data.Nat
L : ℕ -> Set -> Set
L 0 a = a
L(suc n)a = List(L n a)
f : ∀ n{a}-> a -> L n a
f 0 x = x
f(suc n)x = [ f n x ]
</code>```

(I hope I found all places where spaces can be omitted.) L is a type function that given a natural n and a type a returns the type of n times nested lists of a, so L 3 Bool would be the type of lists of lists of lists of Bool (if we had imported Bool). This allows us to express the type of our function  as (n : ℕ) -> {a : Set} -> a -> L n a, where the curly braces make that argument implicit. The code uses a shorter way to write this type. The function can now be defined in an obvious way by pattern matching on the first argument.

Loading this file with an .agda extension into emacs allows to use C-c C-n (evaluate term to normal form), input for example f 2 3 and get the correct answer in an awkward form: (3 ∷ []) ∷ []. Now of course if you want to do that with strings you have to import them...

Title: Nest a string inside an array n times

Body:
You must produce a function which nests a string s inside an array, n times

```<code>>>> N("stackoverflow",2)
[['stackoverflow']]
</code>```

Parameters:

s - An ascii string

n - An integer >= 0

Rules

Shortest code wins.

The output will be a nested array, list or tuple (or similar type based off an array)

Test Cases

```<code>>>> N("stackoverflow",0)
'stackoverflow'
>>> N("stackoverflow",1)
['stackoverflow']
>>> N("stackoverflow",5)
[[[[['stackoverflow']]]]]
</code>```

Inspired by: Nesting a string inside a list n times ie list of a list of a list

Body:
Agda, 173 bytes

Since the return type of the function depends on the number given as argument, this is clearly a case where a dependently typed language should be used. Unfortunately, golfing isn't easy in a language where you have to import naturals and lists to use them. On the plus side, they use suc where I would have expected the verbose succ. So here is my code:

module l where
open import Data.List
open import Data.Nat
L : ℕ -> Set -> Set
L 0 a = a
L(suc n)a = List(L n a)
f : ∀ n{a}-> a -> L n a
f 0 x = x
f(suc n)x = [ f n x ]

(I hope I found all places where spaces can be omitted.) L is a type function that given a natural n and a type a returns the type of n times nested lists of a, so L 3 Bool would be the type of lists of lists of lists of Bool (if we had imported Bool). This allows us to express the type of our function  as (n : ℕ) -> {a : Set} -> a -> L n a, where the curly braces make that argument implicit. The code uses a shorter way to write this type. The function can now be defined in an obvious way by pattern matching on the first argument.

Loading this file with an .agda extension into emacs allows to use C-c C-n (evaluate term to normal form), input for example f 2 3 and get the correct answer in an awkward form: (3 ∷ []) ∷ []. Now of course if you want to do that with strings you have to import them...


答:
Clean, <s>123</s> 102 bytes

```<code>module q;import StdEnv;Start=(s,q,s,q);q=inc'!';s="module q;import StdEnv;Start=(s,q,s,q);q=inc'!';s="
</code>```

Save as q.icl and compile with -b -nt.

Saved 21 bytes thanks to Οurous.

Title: Golf you a quine for great good!

Body:
Using your language of choice, golf a quine.

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.

No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either.

No error quines -- there is already a separate challenge for error quines.

Points for:

Smallest code (in bytes)

Most obfuscated/obscure solution

Using esoteric/obscure languages

Successfully using languages that are difficult to golf in

The following Stack Snippet can be used to get a quick view of the current score in each language, and thus to know which languages have existing answers and what sort of target you have to beat:

var QUESTION_ID=69;
var OVERRIDE_USER=98;

var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk";var answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;function answersUrl(index){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+index+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}
function commentUrl(index,answers){return"https://api.stackexchange.com/2.2/answers/"+answers.join(';')+"/comments?page="+index+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}
function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(data){answers.push.apply(answers,data.items);answers_hash=[];answer_ids=[];data.items.forEach(function(a){a.comments=[];var id=+a.share_link.match(/\d+/);answer_ids.push(id);answers_hash[id]=a});if(!data.has_more)more_answers=!1;comment_page=1;getComments()}})}
function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(data){data.items.forEach(function(c){if(c.owner.user_id===OVERRIDE_USER)
answers_hash[c.post_id].comments.push(c)});if(data.has_more)getComments();else if(more_answers)getAnswers();else process()}})}
getAnswers();var SCORE_REG=(function(){var headerTag=String.raw `h\d`
var score=String.raw `\-?\d+\.?\d*`
var normalText=String.raw `[^\n<>]*`
var strikethrough=String.raw `<s>${normalText}</s>|<strike>${normalText}</strike>|<del>${normalText}</del>`
var noDigitText=String.raw `[^\n\d<>]*`
var htmlTag=String.raw `<[^\n<>]+>`
return new RegExp(String.raw `<${headerTag}>`+String.raw `\s*([^\n,]*[^\s,]),.*?`+String.raw `(${score})`+String.raw `(?=`+String.raw `${noDigitText}`+String.raw `(?:(?:${strikethrough}|${htmlTag})${noDigitText})*`+String.raw `</${headerTag}>`+String.raw `)`)})();var OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(a){return a.owner.display_name}
function process(){var valid=[];answers.forEach(function(a){var body=a.body;a.comments.forEach(function(c){if(OVERRIDE_REG.test(c.body))
body='
'+c.body.replace(OVERRIDE_REG,'')+'
'});var match=body.match(SCORE_REG);if(match)
valid.push({user:getAuthorName(a),size:+match[2],language:match[1],link:a.share_link,})});valid.sort(function(a,b){var aB=a.size,bB=b.size;return aB-bB});var languages={};var place=1;var lastSize=null;var lastPlace=1;valid.forEach(function(a){if(a.size!=lastSize)
lastPlace=place;lastSize=a.size;++place;var answer=jQuery("#answer-template").html();answer=answer.replace("{{PLACE}}",lastPlace+".").replace("{{NAME}}",a.user).replace("{{LANGUAGE}}",a.language).replace("{{SIZE}}",a.size).replace("{{LINK}}",a.link);answer=jQuery(answer);jQuery("#answers").append(answer);var lang=a.language;lang=jQuery(''+a.language+'').text().toLowerCase();languages[lang]=languages[lang]||{lang:a.language,user:a.user,size:a.size,link:a.link,uniq:lang}});var langs=[];for(var lang in languages)
if(languages.hasOwnProperty(lang))
langs.push(languages[lang]);langs.sort(function(a,b){if(a.uniq>b.uniq)return 1;if(a.uniq<b.uniq)return-1;return 0});for(var i=0;i<langs.length;++i)
{var language=jQuery("#language-template").html();var lang=langs[i];language=language.replace("{{LANGUAGE}}",lang.lang).replace("{{NAME}}",lang.user).replace("{{SIZE}}",lang.size).replace("{{LINK}}",lang.link);language=jQuery(language);jQuery("#languages").append(language)}}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list{padding:10px;float:left}#language-list{padding:10px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

  <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/primary.css?v=f52df912b654">

Winners by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}

{{LANGUAGE}}	{{NAME}}	{{SIZE}}

 ```

Body:
Clean, <s>123</s> 102 bytes

module q;import StdEnv;Start=(s,q,s,q);q=inc'!';s="module q;import StdEnv;Start=(s,q,s,q);q=inc'!';s="

Save as q.icl and compile with -b -nt.

Saved 21 bytes thanks to Οurous.


问:
Export The $PATH Variable, Line-By-Line
Inspired by this question on AskUbuntu.

Your job is extremely simple. Take the PATH environment variable (echo $PATH) and export it such that each entry (separated by the : character) is on its own line.

For example, if the PATH is /bin:/usr/bin:/usr/local/bin, your program should output:

```<code>/bin
/usr/bin
/usr/local/bin
</code>```

Your program may not return a leading newline, but it may return a single trailing newline. You do not need to check if the PATH is right, or that the directory exists. Your program should take no input, meaning that your program is responsible for getting the PATH itself. You may safely assume that objects in the PATH do not contain : or newlines. However, spaces are fair game.

Reference implementations are present in the answers to the question above.

Rules

This is (obviously) code-golf, so the shortest answer will win the prized green checkmark.

The accepted answer will be tested to make sure it's actually legit.

Both Windows and *nix entries are accepted.

However, if you don't explicitly specify Windows, I will try running it in Linux and fail. (If it's obvious (hi, Batch!), you don't need to specify explicitly.)

Only have one solution per answer. If you have both a Windows and *nix version, I will count the shorter one.

If two answers have the same length, I will give priority to the one with the higher vote total. If they have the same vote total, I will count the older one. If the time posted is the same, I will choose the one that executes faster. If they execute in the same amount of time, I don't know.

Leaderboard

var QUESTION_ID=96334,OVERRIDE_USER=15422;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
Awk, <s>51</s> 44 characters

BEGIN{$0=ENVIRON["PATH"];gsub(":",RS);print}
```

<p>Thanks to:</p>

<ul>
<li>ninjalj for suggesting to use <code>gsub()</code> instead of manipulating built-in variables (-7 characters)</li>
</ul>

<p>The typical <code>awk</code> way would be to set up the built-in variables which influences how <code>awk</code> manipulates the data automatically:</p>

<pre class="lang-awk prettyprint-override"><code>BEGIN{FS=":";OFS=RS;$0=ENVIRON["PATH"];$1=$1;print}
</code>```

Sample run:

```<code>bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ awk 'BEGIN{FS=":";OFS=RS;$0=ENVIRON["PATH"];$1=$1;print}'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
</code>```

Title: Export The $PATH Variable, Line-By-Line

Body:
Awk, <s>51</s> 44 characters

BEGIN{$0=ENVIRON["PATH"];gsub(":",RS);print}

Thanks to:

ninjalj for suggesting to use gsub() instead of manipulating built-in variables (-7 characters)

The typical awk way would be to set up the built-in variables which influences how awk manipulates the data automatically:

BEGIN{FS=":";OFS=RS;$0=ENVIRON["PATH"];$1=$1;print}

Sample run:

bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ awk 'BEGIN{FS=":";OFS=RS;$0=ENVIRON["PATH"];$1=$1;print}'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin


答:
jq, 18 characters

(16 characters code + 2 characters command line option)

```<code>env.PATH/":"|.[]
</code>```

Sample run:

```<code>bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ jq -nr 'env.PATH/":"|.[]'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
</code>```

Title: Export The $PATH Variable, Line-By-Line

Body:
Inspired by this question on AskUbuntu.

Your job is extremely simple. Take the PATH environment variable (echo $PATH) and export it such that each entry (separated by the : character) is on its own line.

For example, if the PATH is /bin:/usr/bin:/usr/local/bin, your program should output:

```<code>/bin
/usr/bin
/usr/local/bin
</code>```

Your program may not return a leading newline, but it may return a single trailing newline. You do not need to check if the PATH is right, or that the directory exists. Your program should take no input, meaning that your program is responsible for getting the PATH itself. You may safely assume that objects in the PATH do not contain : or newlines. However, spaces are fair game.

Reference implementations are present in the answers to the question above.

Rules

This is (obviously) code-golf, so the shortest answer will win the prized green checkmark.

The accepted answer will be tested to make sure it's actually legit.

Both Windows and *nix entries are accepted.

However, if you don't explicitly specify Windows, I will try running it in Linux and fail. (If it's obvious (hi, Batch!), you don't need to specify explicitly.)

Only have one solution per answer. If you have both a Windows and *nix version, I will count the shorter one.

If two answers have the same length, I will give priority to the one with the higher vote total. If they have the same vote total, I will count the older one. If the time posted is the same, I will choose the one that executes faster. If they execute in the same amount of time, I don't know.

Leaderboard

var QUESTION_ID=96334,OVERRIDE_USER=15422;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Body:
jq, 18 characters

(16 characters code + 2 characters command line option)

env.PATH/":"|.[]

Sample run:

bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ jq -nr 'env.PATH/":"|.[]'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin


答:
Gema, 36 characters

```<code>\A=@subst{\\:=\\n;@getenv{PATH}}@end
</code>```

Sample run:

```<code>bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ gema '\A=@subst{\\:=\\n;@getenv{PATH}}@end'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
</code>```

Title: Export The $PATH Variable, Line-By-Line

Body:
Gema, 36 characters

\A=@subst{\\:=\\n;@getenv{PATH}}@end

Sample run:

bash-4.3$ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

bash-4.3$ gema '\A=@subst{\\:=\\n;@getenv{PATH}}@end'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin


答:
R, 144 bytes

The answer is based off the logic of @Jonathan Allan. It could probably be golfed though.

```<code>s=strsplit(scan(,""),"")[[1]];d=diff(match(s,LETTERS));s[1]==tail(s,1)&length(s)==5&all(!rle(s)$l-1)&!sum(d)&!sum(sign(d))&any(rle(sign(d))$l>1)
</code>```

R-fiddle test cases (vectorized example but same logic)

Title: Find the Infinity Words!

Body:
(Note: This is a spin-off of my previous challenge Find the Swirling Words!)

Definition of Infinity Word:

If you connect with curves all the characters of an Infinity Word on the alphabet (A-Z) you obtain the infinity symbol ∞ like in the diagrams below.

All the even connection must be down, all the odd connections must be up.

You can ignore upper/lowercase or consider/convert all to upper case or all to lower case.

The input words are only characters in the alphabet range of A-Z, no spaces, no punctuation, or symbols.

Each word must be exactly 5 characters. Words > 5 or < 5 are not valid.

If a word has double consecutive characters, the word is not valid, like "FLOOD" or "QUEEN".

All the Infinity Words start and end with the same character.

Here there are some examples:

Task:

Write a full program or function that will take a word from standard input and will output if is an Infinity Word or not. The output can be true/false, 1/0, 1/Null, etc.

Test cases:

```<code>Infinity Words:
ALPHA, EAGLE, HARSH, NINON, PINUP, RULER, THEFT, WIDOW

NOT Infinity Words:
CUBIC, ERASE, FLUFF, LABEL, MODEM, RADAR, RIVER, SWISS, TRUST,
KNEES, QUEEN, GROOVE, ONLY, CHARACTER, OFF, IT, ORTHO
</code>```

Rules:

Shortest code wins.

Optional Task:

Find, as a list, as many Infinity Words as you can in an English dictionary. You can take for example as reference the complete list of English words here.

Body:
R, 144 bytes

The answer is based off the logic of @Jonathan Allan. It could probably be golfed though.

s=strsplit(scan(,""),"")[[1]];d=diff(match(s,LETTERS));s[1]==tail(s,1)&length(s)==5&all(!rle(s)$l-1)&!sum(d)&!sum(sign(d))&any(rle(sign(d))$l>1)

R-fiddle test cases (vectorized example but same logic)


问:
Fake Marquee Text
In this challenge fake marquee text is text that is shown part by part, in a scrolling-like fashion.

Some examples:

```<code>testing 4

   t
  te
 tes
test
esti
stin
ting
ing
ng
g

hello 2

 h
he
el
ll
lo
o

foobarz 3

  f
 fo
foo
oob
oba
bar
arz
rz
z

Something a bit longer 10

         S
        So
       Som
      Some
     Somet
    Someth
   Somethi
  Somethin
 Something
Something
omething a
mething a
ething a b
thing a bi
hing a bit
ing a bit
ng a bit l
g a bit lo
 a bit lon
a bit long
 bit longe
bit longer
it longer
t longer
 longer
longer
onger
nger
ger
er
r

small 15

              s
             sm
            sma
           smal
          small
         small
        small
       small
      small
     small
    small
   small
  small
 small
small
mall
all
ll
l

aaa 3

  a
 aa
aaa
aa
a

brace yourself 6

     b
    br
   bra
  brac
 brace
brace
race y
ace yo
ce you
e your
 yours
yourse
oursel
urself
rself
self
elf
lf
f
</code>```

You have to write a program or a function that takes in two input and prints the output as described above. You may or may not output trailing spaces in your output. This is code-golf so shortest code in bytes wins.

If your program is standalone (i.e. when run actually prints the lines) (Input can be hard-coded but easy to change) and sleeps a bit between each line of output you get a -10 bonus.

答:
C#, 112 bytes

```<code>s=>n=>{var r=new string(' ',n-1);s=r+s+r;r="";for(int i=0;i<s.Length-n+1;)r+=s.Substring(i++,n)+"\n";return r;};
</code>```

Full program with ungolfed method and test cases:

```<code>using System;

namespace FakeMarqueeText
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<string,Func<int,string>>f= s=>n=>
            {
                var r=new string(' ',n-1);
                s=r+s+r;
                r="";
                for(int i=0;i<s.Length-n+1;)
                    r+=s.Substring(i++,n)+"\n";

                return r;
            };

            // test cases:
            Console.WriteLine(f("testing")(4));
            Console.WriteLine(f("hello")(2));
            Console.WriteLine(f("foobarz")(3));
            Console.WriteLine(f("Something a bit longer")(10));
            Console.WriteLine(f("small")(15));
            Console.WriteLine(f("aaa")(3));
            Console.WriteLine(f("brace yourself")(6));

        }
    }
}
</code>```

Title: Fake Marquee Text

Body:
C#, 112 bytes

s=>n=>{var r=new string(' ',n-1);s=r+s+r;r="";for(int i=0;i<s.Length-n+1;)r+=s.Substring(i++,n)+"\n";return r;};

Full program with ungolfed method and test cases:

using System;

namespace FakeMarqueeText
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<string,Func<int,string>>f= s=>n=>
            {
                var r=new string(' ',n-1);
                s=r+s+r;
                r="";
                for(int i=0;i<s.Length-n+1;)
                    r+=s.Substring(i++,n)+"\n";

                return r;
            };

            // test cases:
            Console.WriteLine(f("testing")(4));
            Console.WriteLine(f("hello")(2));
            Console.WriteLine(f("foobarz")(3));
            Console.WriteLine(f("Something a bit longer")(10));
            Console.WriteLine(f("small")(15));
            Console.WriteLine(f("aaa")(3));
            Console.WriteLine(f("brace yourself")(6));

        }
    }
}


答:
Perl, 133 bytes

This was one of those challenges that changed in my head from being too hard, to being easy, to being a lot more code than I'd anticipated... I'm not particularly happy with the approach, I'm sure there's a much better way to reduce the print pop@F... bit perhaps using -n or just pure regex, but I can't get there right now... Originally I was using say, but I think I'd have to score that higher (use 5.01) because of $'.

@F=(/.+/g,@F)for<>;$_%=$#F,($x=length$F[$_++])<length$F[$_]&&($F[$_]=~/.{$x}/,$F[$_-1].=$',$F[$_]=$&)for 0..1e2;print pop@F,$/while@F
```

<h3>Usage</h3>

<p>Save as <code>vertically-collapse-text.pl</code>.</p>

<pre class="lang-sh prettyprint-override"><code>perl vertically-collapse-text.pl <<< 'Programming
Puzzles
&
Code
Golf'
P
Prog
&uzz
Coderam
Golflesming
</code>```

Title: Vertically collapse text

Body:
Say I have text like this (each word on one line, with no spaces)

```<code>Programming
Puzzles
&
Code
Golf
</code>```

That makes no sense! It totally defies the laws of physics.

Your challenge is to remedy this impossible situation and collapse the text like so:

```<code>P
Prog
&uzz
Coderam
Golflesming
</code>```

So that there is no empty space underneath any character but the characters retain their vertical order.

The goal is to satisfy the requirements but use the fewest bytes of source code possible.

Body:
Perl, 133 bytes

This was one of those challenges that changed in my head from being too hard, to being easy, to being a lot more code than I'd anticipated... I'm not particularly happy with the approach, I'm sure there's a much better way to reduce the print pop@F... bit perhaps using -n or just pure regex, but I can't get there right now... Originally I was using say, but I think I'd have to score that higher (use 5.01) because of $'.

@F=(/.+/g,@F)for<>;$_%=$#F,($x=length$F[$_++])<length$F[$_]&&($F[$_]=~/.{$x}/,$F[$_-1].=$',$F[$_]=$&)for 0..1e2;print pop@F,$/while@F

Usage

Save as vertically-collapse-text.pl.

perl vertically-collapse-text.pl <<< 'Programming
Puzzles
&
Code
Golf'
P
Prog
&uzz
Coderam
Golflesming