text:
Spoonerise words
Given two words, spoonerise them by switching their initial consonant clusters. Fewest bytes wins.
plaster man -> master plan
blushing crow -> crushing blow
litigating more -> mitigating lore
strong wrangler -> wrong strangler
def ghi -> ghef di
few years -> yew fears

The consonants appearing before the first vowel (aeiou) are switched.
Input: Two lowercase strings that start with different consonants and each contain a vowel aeiou.
Output: The two spoonerised strings, in the right order.
For input and/or output, the two strings may also be in a list or the like, or as a single string with separator.

    var QUESTION_ID=69385,OVERRIDE_USER=20260;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/69385/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;
    body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
     <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

**Leaderboard:**

This is a near-dupe of this old question, but I'm hoping to write a spec that is clearer and more stable so that the old one can be closed as a dupe.

What if a word starts with a vowel, such as "snoozing otter"?

The words start with consonants.

Answer should be "oozing snotter" imo~

@PatrickRoberts I agree, but this makes the challenge a bit simpler.

Well for some regexes you can just replace the + with * and add a ^ at the beginning to negate the greedy search

I wrote almost the exact same challenge also with a clearer and more stable spec almost a year ago. Why is it appropriate for this challenge to stay open and mine is a dupe?

@DJMcMayhem Sorry, that is frustrating. I wasn't aware of your question and didn't find it when searching. I think nobody was aware of the option to close the old one as a dupe until Martin Büttner's well-received post in October. I definitely wasn't. I believe this is the first challenge written specifically to try to supersede an old challenge.

Not very on topic, but a nice example snow flake -> flow snake

fast lucks and coy bunts are not allowed to participate

Mission Failed -> Fission Mailed (Warning: TVTropes link detected)

@xnor I think the first challenge written specifically for that purpose was the cat catalogue, but I think that slipped through the cracks before there was an actual consensus. ;) (It was posted a day after that meta post, but had been planned before, and I don't think the meta post would have had the current score back then.)

Vim, 18 keystrokes
/[aeiou]<CR>dbwvnhp0P

The crucial trick is that pasting over something in Visual mode actually puts the old contents of the visual selection in the paste buffer.

... oh, duh, didn't think of that. Kept getting thrown off by v being inclusive and trying to select from the vowel back.

As a casual vim user, I kept being amazed as I typed each successive command

 means carriage return (old typewriter term!), also known as Enter

brainfuck, 238 207 bytes
,[[<+<+>>-]++++[<-------->-]-[<<-->>-----]<<+++++[----[----[------[------>>]]]]>[>>]>,]<<++++++++[<[++++<<]<++++<[++++<<]>>[>>]>>[>>]<-]<[<<]-[<+>---]>[>.>]<[<<]<<[<<]>[>>]>[.>>]<.<[<<]>[>.>]>[>>]>[>>]>[.>>]

Requires , to return 0 on EOF, 8-bit wrapping cells and the ability to move left from cell 0. In my experience, these are the most common default settings.
I'm pretty happy with this one. My first try was 314 bytes and this is certainly an improvement. :)
It works by storing every byte from input in two cells; one with the actual value of the byte and the other with the output of the following code when given (the value of the byte - 97):
[
    ----
    [
        ----
        [
            ------
            [
                ------>>
            ]
        ]
    ]
]

If the character is a consonant, it comes out of that with a non-zero value. If it's a vowel, it becomes 0. From there it's just a matter of finding where the second word starts and printing everything in order.
The 238 byte version of this program found the space character after collecting all the input. It was a headache because doing so involved creating a cell that contained 0 right where I was trying to loop over it. The way I solved that had the effect of subtracting 30 from every character in the first word and 32 from every character after it. A fairly large portion of the code was dedicated to handling that nonsense.
Now, 32 is subtracted from every character in the input loop, which is shorter and has a similar side effect that's easier to deal with. As a bonus, doing it this way allowed me to create my own space character in a shorter way: Instead of subtracting 139 from 171 (171 is what you get when you run a space through the vowel detector above), the loop that adds 32 to every character goes out of its way to also add 32 to the 171 cell. This costs four bytes there, but means I can subtract 171 from it later (instead of subtracting 139) for a net total of 3 bytes saved.
With comments:
For every input character
,[

  Make a copy
  [<+<+>>-]

  Subtract 32 from one
  ++++[<-------->-]

  Subtract 97 from the other
  -[<<-->>-----]<<+++++

  If nonzero:
  [

    Subtract 4
    ----

    If nonzero:
    [

      Subtract 4
      ----

      If nonzero:
      [

        Subtract 6
        ------

        If nonzero:
        [

          Subtract 6
          ------>>

        ]

      ]

    ]

  ]

>[>>]>,]

Add 32 to every character and the 171 that the space left behind
<<++++++++[<[++++<<]<++++<[++++<<]>>[>>]>>[>>]<-]

Go to the space
<[<<]

Subtract 171 from (32 plus 171)
-[<+>---]

~~~~~~~~~~~~~~~

Ready to print!

~~~~~~~~~~~~~~~

Print letters from the second word until the value to the left is zero
>[>.>]

Go to the beginning of the first word
<[<<]<<[<<]

Look at cells to the left of letters in the first word until reaching a zero
>[>>]

Print the rest of the letters in the first word
>[.>>]

Print a space
<.

Go to the beginning of the first word
<[<<]

Print letters from the first word until the value to the left is zero
>[>.>]

Go to the beginning of the second word
>[>>]

Look at cells to the left of letters in the second word until reaching a zero
>[>>]

Print the rest of the letters in the second word
>[.>>]

This counts y as a vowel, but the question says it's not. (nye cat -> ce nyat)

@Loovjo that's really odd, because the code that checks for vowels definitely treats y as a consonant... I'll look into why it's doing that.

vim, 23
/[aeiou]<cr>"xd0wndb0Pw"xP

I wonder if vim is actually competitive in this challenge. Probably not with the golfing languages, but perhaps with Ruby/Python/Perl/etc.
/[aeiou]<cr>  Find the first vowel
"xd0          "Delete" (cut), to register "x, everything from here to BOL
w             Go to next word
n             Find next vowel
db            "Delete back" - delete from here to the beginning of the word
0             Go to BOL
P             Paste what we just "deleted" (cut) behind the cursor
w             Next word
"xP           Paste backwards from register "x

I do this in Insert mode, right?

@AlexA. ಠ_ಠ

@AlexA. Insert mode would be an extra keystroke :)~

@AlexA. Insert mode? Did you mean insert command?

@BlacklightShining Nope. It was a joke because if you're in insert mode and you type that stuff, it won't execute any commands; you will have just typed it in a file.

Python, 68 63 60 bytes
import re
lambda s:re.sub('([^aeiou]+|.+ )'*3,r'\3\2\1',s,1)

Try it online on Ideone.
How it works
The pattern string is repeated thrice (*3), resulting in the pattern
([^aeiou]+|.+ )([^aeiou]+|.+ )([^aeiou]+|.+ )

All instances will either match a non-empty string of non-vowels, or a non-empty string followed by a single space character.
The first instance will match the consonants at the beginning of the first word. Since + is greedy, it will attempt to match as many as possible, i.e., all up to the first vowel.
Because of this, the second instance will start at a vowel, so it will match the remainder of the first word, up to and including the space that separates the words.
Similarly to the first instance, the third will match all consonants at the beginning of the second word, resulting in a successful match for the entire pattern.
The raw string \3\2\1 (r prevents Python from replacing \3 etc. with control characters) reverses the order of the matches of the parenthesized patterns, i.e., it replaces them with the consonants at the beginning of the second word, then all characters from the first vowel of the first word up to the space, and finally the consonants at the beginning of the first word.
The final argument to sub (1) makes it return immediately after the first successful replacement, to avoid nonsensical replacements in the remainder of the second word. This is required since the pattern can match any string of three or more consecutive consonants.

Congrats on the bounty, for bringing the regex magic to Python with a very efficient regex. Nice explanation too.

JavaScript (ES6), 54 bytes
s=>s.replace(r=/\b[^aeiou ]+/g,(_,i)=>s.match(r)[+!i])

Explanation
s=>
  s.replace(
    r=/\b[^aeiou ]+/g,     // r = regex to match consonants
    (_,i)=>s.match(r)[+!i] // replace consonants with the consonants from the other word
  )

Test

var solution = s=>s.replace(r=/\b[^aeiou ]+/g,(_,i)=>s.match(r)[+!i])
<input type="text" id="input" value="plaster man" />
<button onclick="result.textContent=solution(input.value)">Go</button>

Ohh, my bad, I misunderstood. I'll take a look at the mdn docs for match when I get home

The +!i trick is a nice solution. +1

Python 3, 108 101 99 bytes
(No use of regex)
This function expects input via 2 arguments, e.g. f('blushing','crow'). Returns the new words in a tuple.
S=lambda s,p="":s[0]in"aeiou"and(p,s)or S(s[1:],p+s[0])
def f(x,y):a,b=S(x);c,d=S(y);return c+b,a+d

There are a lot of regex solutions, so I wanted to write something that didn't use Python's re library.
How it works
The only complicated part is the lambda expression S (the abbreviation means "Split before the first vowel").
It recursively "iterates" over the given word, moving one character at a time from the beginning of s (which starts with the whole word) to the end of p (which starts empty). At the first vowel encountered it returns (p,s), i.e. (prefix, suffix). Notice that that is the wrong order compared to the parameters!
I thought it made more sense for the returned order to be prefix, then suffix (because generally a prefix goes before a suffix). This order might make the a,b=S(x) code slightly easier to read.
But I had no choice of order in the lambda's parameters, so I couldn't define p before s. The first parameter, s, had to take the entire word because p had a default value, and default parameters go last. Doing that, I didn't need to call the function S with an empty string twice, and a few bytes could be saved. However, perhaps it was simply a bad decision to return prefix/suffix in the opposite order as it was used within the lambda expression.
As for the choice of lambda expression over function, it takes more bytes to say def S(s,p=""):return than S=lambda s,p="":. I can make that choice because Python has short-circuit evaluation, and the ternary operator. However, I cannot adequately explain how I used short-circuits; it's hard to reason about.

This is my first answer. I hope I did this correctly, and that there's value to posting a solution that cannot win.
Edits: Thank-you commenters: Reduced the byte count a bit, twice, and removed unnecessary info. Attempted to improve writing. Hopefully made no mistakes.

welcome to ppcg, great first answer :) just fyi, most programs on this site don't have a trailing newline, so you don't have to mention it (in the rare cases when it is necessary, that's when people mention it)

Welcome to Programming Puzzles & Code Golf! 1. You don't have to worry about the input format. The challenge explicitly says that you can take a list. 2. Per the defaults mentioned in the tag wiki, you can submit either full programs or functions to code golf challenges. For this particular problem, a function should be 7 bytes shorter.

Regarding the last sentence, "I hope [...] there's value to posting a solution that cannot win." There most certainly is! We're all here to have fun and contribute and learn from each other. I find this answer particularly clever as the more obvious solution is to use regular expressions. Very nice work!

A excellent first answer. It's quite similar to what I came up with for non-regex. You had a good thought about using short-circuiting logical expressions, and it turns out they can shorten the expression, though perhaps you'd like to think yourself about how to do that.

I really like the fact you used a recursive solution. Very elegantly implemented!

C#6, 115 bytes
string S(string a)=>System.Text.RegularExpressions.Regex.Replace(a,"([^aeiou]*)(.*) ([^aeiou]*)(.*)","$3$2 $1$4");

It's just a pain the namespace for regex is so long.

My gosh that is verbose.

System.Text.RegularExpressions.Regex.Replace 44 characters! +1 because that must be some kind of record.

...and now you have 44 problems. ;)

CJam, 27 24 22 bytes
2{l_{"aeiou"&}#/(N\}*o

I/O is one word per line. Try it online!
How it works
2{                 }*   Do the following twice:
  l                       Read a line from STDIN.
   _                      Push a copy.
    {"aeiou"&}#           Find the index of the first character that has a non-
                          empty intersection with the string "aeiou".
               /          Split the string into chunks of that size.
                (         Shift out the first chunk, i.e., all leading consonants.
                 N\       Swap the shifted out chunk with a linefeed.
                     o  Print the topmost stack item.

Perl, 33 bytes
s/([^aeiou]+)(.+ )((?1))/\3\2\1/

The above code is 32 bytes long and requires the -p switch (+1 byte).
The substitution is very similar to the one @DigitalTrauma's Retina answer, but this answer takes advantage of PCRE's recursive subpatterns.
Try it online on Ideone.

JavaScript ES6, 93 58 52 bytes
Saved 6 bytes thanks to ETHProductions!
x=>x.replace(/([^aeiou]+)(.+ )([^aeiou]+)/,"$3$2$1")

Test it! (ES6 only)

F=x=>x.replace(/([^aeiou]+)(.+ )([^aeiou]+)/,"$3$2$1");

console.log=_=>u.innerHTML+=_;

console.log(`plaster man -> master plan
blushing crow -> crushing blow
litigating more -> mitigating lore
strong wrangler -> wrong strangler
def ghi -> ghef di`.split`\n`.map(e=>(e=e.split` -> `,`${e[0]} => ${e[1]} ||> `+(F(e[0])==e[1]))).join`
`);
html { font-family: Consolas, monospace; }

I was just about to click post answer on my 58 byte solution when you made this edit haha

@user81655 Oh, sorry that it happened like that.

You don't need the fourth capturing group or the $4 at all ;)

@ETHproductions Oh, yeah! Thanks!

Retina, 34
([^aeiou]+)(.+ )([^aeiou]+)
$3$2$1

Try it online.

C, 255 201 199 bytes
I don't see a lot of C answers around here, so enjoy;
Also, first time golfing, suggestions and critique are welcome.
#define S(w,p)p=strpbrk(w,"aeiou")-w
#define c ;strcpy(r
#define l c+strlen(v[1])+b+1
main(int q,char**v){char r[64],S(v[1],a),S(v[2],b)c,v[2])c+b,v[1]+a);strcat(r," ")l-a,v[1])l,v[2]+b);puts(r);}

If main() is not required we can save 24 bytes, getting to 179 bytes
#define S(w,p)p=strpbrk(w,"aeiou")-w
#define c ;strcpy(r
#define l c+strlen(x)+b+1
s(char*x,char*y){char r[64],S(x,a),S(y,b)c,y)c+b, x+a);strcat(r," ")l-a,x)l,y+b);puts(r);}

Ungolfed:
void spoonerise(char* w1, char* w2)
{
    char rt[64];

    int p1 = strpbrk(w1, "aeiou")-w1;
    int p2 = strpbrk(w2, "aeiou")-w2;

    strcpy(rt, w2);
    strcpy(rt+p2, w1+p1);

    strcat(rt, " ");

    strcpy(rt+strlen(w1)+p2+1-p1, w1);
    strcpy(rt+strlen(w1)+p2+1, w2+p2);

    puts(rt);
}

EDIT: Thanks to feersum's suggestion I saved 54 bytes. =D

I recommend looking into strpbrk.

+1 This is a great first answer. Welcome to the site.

Thanks for the recommedation @feersum. And thanks for the welcoming @wizzwizz4!

sed, 38 characters
s/([^aeiou]+)(.+ )([^aeiou]+)/\3\2\1/

Using extended regular expression from the Retina solution.
The above is 37 characters long and requires the -r switch (+1 character).
Example:
$ cat input | tee /dev/tty | sed -r 's/([^aeiou]+)(.+ )([^aeiou]+)/\3\2\1/'
plaster man
blushing crow
litigating more
strong wrangler
def ghi
master plan
crushing blow
mitigating lore
wrong strangler
ghef di

Welcome to Programming Puzzles & Code Golf!

Python 2, 364 352 269 251 bytes
EDIT: Thanks so much to @Cyoce for helping me golf 83 bytes!
Please help me golf this! Anyway, at least I am the first Python answerer. And I hope I can beat Java, if there ever is a Java answer!
i=input()
f=l=''
A='aeiou'
for j in A:
 I=i[0];J=I.find(j)
 if ~J:
  if f:
   if f>I[0][:J]:f=I[:J];break
  else:f=I[:J]
for j in A:
 Y=i[1];J=Y.find(j)
 if ~J:
  if l:
   if l>Y[:J]:l=Y[:J];break
  else:l=Y[:J]
print I.replace(f,l,1),Y.replace(l,f,1)

Try it here

-1 for not making an attempt to golf this beyond single-character variables

@Mego I promise I am working on that ASAP. Right now. But I am working on a regex version.

@Mego please see edit.

Japt, 26 25 bytes
Fortunately, I added a vowel class to Japt's regex features a few days ago. Unfortunately, I didn't add a non-vowel class or a way around the double backslashes in regex strings.
#¿s4 £Uf"[^\\v]+|.+
?" gX

The ¿ should be the raw char U+0093. Input is a multi-line string, one word/line. Try it online!
EDIT: I've now added the non-vowel class \V and a way around \\ (with %), so this code now works for 21 bytes: (Try it online)
#¿s4 £Uf"%V+|.+
?" gX

How it works
                     // Implicit: U = input string
#¿s4                 // Convert the char code (147) into a base-4 string "2103".
     £               // Map each char X in this string to:
      Uf"[^\\v]+|.+  //  Match each group in U of non-vowels or non-newlines,
?"                   //  with an optional trailing newline.
   gX                //  Get the item at position X in the resulting array.
                     // Implicit: output last expression

Old version (26 bytes):
UrA="\\b[^\\v ]+"@UfA gÂ!Y

Try it online!
How it works
UrA="\\b[^\\v ]+"@UfA gÂ!Y  // Implicit: U = input string
  A="\\b[^\\v ]+"           // Set variable A to this regex string, which matches
                            // a word boundary followed by one or more non-vowels.
UrA              @          // Take U and replace each match X of A and its index Y with:
                  UfA       //  Take U.match(A).
                      gÂ!Y  //  Get the item at index ~~!Y (converts 0 to 1, anything else to 0).
                            // Implicit: output last expression

I wish mainstream languages had a vowel meta for regexes!

Python 3, 100 (or 99) bytes
import re
def f(*g):a,b=[re.split("[aeiou]",r)[0] for r in g];return b+g[0][len(a):],a+g[1][len(b):]

Played with a few versions but can't seem to get it below. Can get it down 99 bytes by using def f(g) instead so it takes a list of strings rather than two seperate strings, but I prefer the two arg roue.
The alternative is equal length:
import re
s=re.split
def f(x,y):v="[aeiou]";a,b=s(v,x)[0],s(v,y)[0];return b+x[len(a):],a+y[len(b):]

I tried replace, like @TanMath uses, but I couldn't get it any shorter. Also, TanMath can get his answer shorter by a byte by also using "[aeiou]" instead of "[aeiou]+" because we only need to match the single instances. Finally, the implementation of input() seems to have changed between py2 and py3 - it automatically evaluates stdin as a string.

Presumably you mean s=re.split in the alternative?

Yes! Definitely. This is my first time golfing ever, so any feedback and advice is appreciated.

The question explicitly allows to take the two strings as a list, so there seems to be no good reason for the * in *g. 2. The second version can be golfed down to lambda x,y,s=lambda s:re.split("[aeiou]",s)[0]:(s(y)+x[len(s(x)):],s(x)+y[len(s(y)):]).

Thanks @Dennis, that does indeed work, nice refactoring. Interesting that the brackets are needed, and you don't need to pass s as an arg to the second lambda do you? That solution gives me 98 bytes, with a leading import statement and f=.

No, s is a default argument, so you don't have to specify it. An unnamed lambda is an acceptable submission; f= is not required.

C#6, 165 bytes
string S(string a,string b){int i=V(a),j=V(b);return b.Remove(j)+a.Substring(i)+" "+a.Remove(i)+b.Substring(j);}int V(string s)=>s.IndexOfAny("aeiou".ToCharArray());

Expanded:
string S(string a,string b){
    int i=V(a),
        j=V(b);
    return b.Remove(j)+a.Substring(i)+" "+a.Remove(i)+b.Substring(j);
}
int V(string s)=>s.IndexOfAny("aeiou".ToCharArray());

This is pretty old, but "aeiou".ToCharArray() can be 'a','e','i','o','u' for -2 bytes

No, @EmbodimentofIgnorance , IndexOfAny it doesn't take params, so it would need to be new[]{'a','e','i','o','u'}

Ah, my mistake, I thought IndexOfAny is a params method. Anyways, great answer

JavaScript (ES6), 120 107 102 101 99 92 bytes

Thanks downgoat!

This takes into account if the parameters were an object like this, and backward:
var a = {x: "man", y:"plaster"]}
a.b=(e=>e.slice(e.search`[aeiou]`));with(a){c=b(x),d=b(y),x=x.replace(c,d);y=y.replace(d,c)}

.match(/[aeiou]/).index can become: .search\[aeiou]``

Python, 129 108 105 109 bytes
This program takes in a list of words like this
["master","plan"]
EDIT: Thanks @Volatility
EDIT: Now using re.split
import re
a=re.split
c='[aeiou]+'
i,j=input()
f=a(c,i)[0]
l=a(c,j)[0]
print i.replace(f,l,1),j.replace(l,f,1)

This answer uses regex as most of them do.
Try it here

Note that str.replace replaces all instances of a substring, so you want to limit it to one replacement by having .replace(f,l,1). However, you can save a bunch by using i,j=input(), and rebinding re.findall and '[^aeiou]+' to single character variables.

This doesn't work as it is; even two one-letter words will give you three characters, and you're trying to unpack input() into two variables. Did you mean i,j=input().split() (and raw_input() in Python 2)?

@BlacklightShining the word needs to have at least one vowel and one consonant. The input takes in a list of the strings so i is the first word and j is the second.

@TanMath as far as i know that is allowed by default, but you should probably say in the answer somewhere that it's required

This replaces too much. "sass","bit" -> "babb", "sit".

@xnor fixed now

@downvoters, why?

You should combine your two Python answers into a single post then delete the other, imho.

, 24 chars / 42 bytes
ïē/⟮(⁅ᶌ]+)⟯(.+ )Ⅰ/,`⑶⑵⑴`

Try it here (Firefox only).
If you need help comprehending this, this translates to ES6 as
input.replace(/([^aeiou]+)(.+ )([^aeiou]+)/g,'$3$2$1')

What language is this in?  I'm getting box-characters for even that.

@JesseWilliams It's called ESMin.

It would be nice if the interperator had something like the Japt one where it shows you the js the  becomes

Compiled JS is logged in the JS console when the code is run.

@MamaFunRoll should put that somewhere inthe ESMin Readme.

PowerShell, 52 bytes
"$args "-replace('(.*?)([aeiou]\S+) '*2),'$3$2 $1$4'

e.g.
PS C:\scripts\> .\Spoonerise.ps1 'blushing crow'
crushing blow

It's a regex replace with four capture groups; with:

String multiplication to expand:

('(.*?)([aeiou]\S+) '*2) to '(.*?)([aeiou]\S+) (.*?)([aeiou]\S+) '

The "$args " forces the args array into a string, and adds a trailing space so the trailing space in the regex won't break it.

Octave, 96 bytes
Thanks to Octave's inline assignments and 'index-anywhere' functionality, this entire thing is just the definition of a single, anonymous function. Basically, we reconstruct the spoonerized string while storing the cut-off points in a and b. I'm especially happy with the inline f function, which finds the cut-off point, and prevented me from having to use the whole 'find(ismember(a,b),1)'  thing twice. Also, no regex :).
@(p,q)[q(1:(a=(f=@(m)find(ismember(m,'aeoui'),1))(q))-1),p(b=f(q):end),32,p(1:b-1),q(a:end)];

Java 8, 343 Bytes
Here you have your first Java-Answer. Not that experienced with golfing, so every suggestion is appreciated!
java.util.function.Function;public class C{public static void main(String[] a){Function<String, Integer>f=s->{for(int i=0;i<s.length();++i)if("aeiou".contains(s.substring(i,i+1)))return i;return 0;};int i1=f.apply(a[0]),i2=f.apply(a[1]);System.out.println(a[1].substring(0,i2)+a[0].substring(i1)+" "+a[0].substring(0,i1)+a[1].substring(i2));}}

Ungolfed:
public class SpooneriseWords {
    public static void main(String[] args)
    {
        Function<String, Integer> f = s -> {
            for(int i = 0; i < s.length(); ++i)
                if("aeiou".contains(s.substring(i, i + 1)))
                    return i;
            return 0;
        };

        int i1 = f.apply(args[0]);
        int i2 = f.apply(args[1]);
        System.out.println(args[1].substring(0, i2) + args[0].substring(i1));
        System.out.println(args[0].substring(0, i1) + args[1].substring(i2));
    }
}

What's java.util.function.Function? I highly doubt it needs to be there, unless you mean import, but drop the import because you only refer to it once. Change public class C{public static void Main(String[] a) to interface C{void Main(String[]a)

Function<String, Integer> doesn't need whitespace

change the for loop from for(int i=0;i<s.length();++i)if("aeiou".contains(s.substring(i,i+1)))return i; to for(int i=0;i++<s.length();if("aeiou".contains(s.substring(i,i+1))){return i;})

i1 is a terrible, far too long varname.

That is, change Function<String, Integer> to java.util.function.Function<String,Integer> and drop the import

the for loop can drop the int i = 0; in place of int i; since things are initialised to zero

Python (no regexes), 85 bytes
t=lambda s:s[1]in'aeiou'or-~t(s[1:])
lambda a,b:(b[:t(b)]+a[t(a):],a[:t(a)]+b[t(b):])

Sample run:
>>> t=lambda s:s[1]in'aeiou'or-~t(s[1:])
>>> lambda a,b:(b[:t(b)]+a[t(a):],a[:t(a)]+b[t(b):])
<function <lambda> at 0x7f495e534398>
>>> _('plaster', 'man')
('master', 'plan')

t is a recursive function that computes the index of the earliest vowel after the first character in its argument s.  If the second character s[1] is a vowel, it evaluates to True, which has int value 1.  Otherwise it makes a recursive call with the first character removed, and adds 1 to the resulting index using -~ (two’s complement of one’s complement).  Finally, the results of t are used as indices for string slicing to compute the spoonerism.

Pyth, 30 28 bytes
Takes input and gives output as a list of the two words.
ACm,Kh:d"[aeiou]"3.-dKQ+V_GH

Try it online.

I think you're looking for ACm,Kh:d"[aeiou]"3.-dKQ+V_GH. A assigns a two-element list to G and H, and C transposes. There may be something even better.

Java, 147 Bytes
I'm assuming just a function is fine too.
String s(String[]i){String r="[aeiou]",f=i[0].split(r)[0],s=i[1].split(r)[0];return s+i[0].substring(f.length())+" "+f+i[1].substring(s.length());}

split(regex) unfortunately consumes the delimiter, which means that I have to use substring to get the suffixes.

TeaScript, 27 bytes
xg/(\w+)(.+ )(\w+)/,"$3$2$1

\w is actually [^aeiou].

Hang on, you changed the default \w regex meta to [^aeiou]? Why?

@ETHproductions when I was creating the custom char classes. I forgot that \w was already used by JavaScript. I'll change it back soon

PowerShell, 61 bytes
"$args"-replace'([^aeiou]+)(.*)\s([^aeiou]+)(.*)','$3$2 $1$4'

Uses regex to swap the first non-vowel characters of each word

Elixir, 143 117 Bytes
s=fn w->String.split_at(w,elem(hd(Regex.run(~r/[aeiou]/,w,return: :index)),0))end
{v,w}=s.(a)
{x,y}=s.(b)
[x<>w,v<>y]

Split up the two strings (a, b) on the first vowel and construct new strings to return.
EDIT: Got a few bytes off by using pattern matching instead of clunky elem calls to get the values out of the tuples.

Brainfuck, 141 bytes
,[[[<+>>+<-]----[>-----<--]>+[++++++[++++++[++++[++++[,>]]]]]<]<[>+<-]>>>+[,[[<+
>>+<-]++++[>--------<-]]>]>,]<<<<[[<]<[<]>[.,+>]+<]>[-[+.,]>]

Formatted:
,
[
  [
    [<+> >+<-]
    ----[>-----<--]>+
    [
      not u
      ++++++
      [
        not o
        ++++++
        [
          not i
          ++++
          [
            not e
            ++++
            [
              not a
              ,>
            ]
          ]
        ]
      ]
    ]
    <
  ]
  <[>+<-]>>>+
  [
    ,
    [
      [<+> >+<-]
      ++++[>--------<-]
    ]
    >
  ]
  >,
]
<<<<
[
  [<]<[<]
  >[.,+>]
  +<
]
>[-[+.,]>]

Expects the two words separated by a space, with or without a trailing newline.
Try it online.
This takes the input and stores it on the tape with three zero cells added: one before the first vowel of each word, and one after the space between the two words. For example, plaster man becomes:
pl\x00aster \x00m\x00an
The three fragments m, aster, and pl are then printed by looping backwards through the tape while creating dummy \x01 cells, and the final an is printed by going forwards and ignoring the dummy cells.

Husk, 24 19 17 bytes
mΣTΓo:↔Tmoġ€¨aeıu

Try it online!
-5 bytes from Dominic Van Essen.
-2 bytes using Γ.
Explanation
mΣTΓo:↔  Tmoġ€¨aeıu
          mo             map each string to the following:
            ġ            group by
             €¨aeıu      vowel groups
         T               transpose
   Γo:                   prepend
      ↔                  the first row reversed
                         to the rest of the array
  T                      transpose back
mΣ                       concatenate into words

Should be easy to save 5 bytes here: "Input: Two lowercase strings"...

We really do be missing the question guidelines

GNU Awk 4.0, 48 characters
split($0,a,/\<[^aeiou]+/,s)&&$0=s[2]a[2]s[1]a[3]

Sample run:
bash-4.3$ for s in 'plaster man' 'blushing crow' 'litigating more' 'strong wrangler' 'def ghi'; do
>     echo -n "$s -> "
>     awk 'split($0,a,/\<[^aeiou]+/,s)&&$0=s[2]a[2]s[1]a[3]' <<< "$s"
> done
plaster man -> master plan
blushing crow -> crushing blow
litigating more -> mitigating lore
strong wrangler -> wrong strangler
def ghi -> ghef di

Lua, 80 bytes
function f(a)return a:gsub('([^aeiou]*)(.*)%s([^aeiou]*)(.*)','%3%2 %1%4'),''end

You can test it here.
Ungolfed:
function f( a )
    return a:gsub(
        '([^aeiou]*)(.*)%s([^aeiou]*)(.*)', -- Get non-vowels, anything else, space, repeat
        '%3%2 %1%4' -- Re-arrange captures
    ),'' -- Get rid of number of gsubs (1)
end

You need to print the output, of course, which would add some more bytes.

Is some of the whitespace at parentheses removable?

Good catch, it is. I always forget to do those things.

05AB1E (legacy), 20 bytes
ε.œ2ùʒнDžMмQ}θ}ø`R+R

I/O as a pair of strings.
Try it online or verify all test cases.
Explanation:
ε            # Map both strings in the (implicit) input-list to:
 .œ          #  Get all partitions of the current string
   2ù        #  Only keep the partitions of size 2
             #   i.e. "plaster" → [["p","laster"],["pl","aster"],["pla","ster"],
             #    ["plas","ter"],["plaste","r"]]
     ʒ       #  Filter these partitions by:
      н      #   Pop and push the first substring
       D     #   Duplicate it
        žMм  #   Remove all vowels
           Q #   And check whether it's still equal to the duplicated substring
     }θ      #  After the filter: pop and push the last 2-part partition
             #   i.e. [["p","laster"],["pl","aster"]] → ["pl","aster"]
}ø           # After the map: zip/transpose the list of 2-part partitions
             #  i.e. [["pl","aster"],["m","an"]] → [["pl","m"],["aster","an"]]
  `          # Then push both pairs separated to the stack
   R         # Reverse the second pair
             #  → ["an","aster"]
    +        # Append the substrings at the same indices
             # (which is why we use the legacy version built in Python,
             # where `+` can be used to append strings vectorized)
             #  → ["plan","master"]
     R       # And then reverse the resulting pair
             #  → ["master","plan"]
             # (after which it is output implicitly as result)

Julia, 51 55 bytes
I was happy to find a 78-byte solution, then I saw this answer by Dennis. So, here it is in Julia.
Edit: fixed multiple match
w->replace(w,Regex('^'*"([^aeiou]+|.+ )"^3)=>s"\3\2\1")

Try it online!
(My 78-byte, non-regex solution:)
f(w,v=findfirst.(in("aeuio"),w))=[w[3-i][1:v[3-i]-1]*w[i][v[i]:end] for i=1:2]

Try it online!

Not sure what's going wrong, but "strong wrangler" => "wrong stralgner" seems to be wrangling or strangling the consonants...

Zsh, 79 bytes
Non-regex solution, using param expansion
m=${(SB)1#[aeiou]}-1;n=${(SB)2#[aeiou]}-1
<<<${2:0:$n}${1:$m}\ ${1:0:$m}${2:$n}

Try it Online!
original, 121 bytes

Matlab 169
q=strsplit(input('','s'),' ');n=Inf(1,2);for e=1:2;for w='aeiou';n(e)=min([n(e),find(q{e}==w)]);end;end;[q{2}(1:n(2)-1),q{1}(n(1):end),' ',q{1}(1:n(1)-1),q{2}(n(2):end)]

Seeks for vowels in loops and finds the first in each word. Then swaps letters
Test:
litigating more
ans =
mitigating lore

def ghi
ans =
ghef di

The spec doesn't require a single string as input, so you can probably drop the strsplit part.

Haskell, 55 bytes
f w|[(a,b),(c,d)]<-break(`elem`"aieou")<$>w=[c++b,a++d]

An adaptation of this answer. Input and output is a list of two strings.
Each input is broken into two pieces at the appearance of the first vowel. Then, having assigned names to the four pieces in a guard, they are recombined and outputed.

In GHC 7.10, replacing map() with the infix <$> saves two bytes.

@AndersKaseorg Thanks, changed it.

Python 162
p,q=raw_input().split()
a=b=-1
c=d=0
v='aeiou'
while a<0:
 if p[c]in v:
  a=c
 c+=1
while b<0:
 if q[d]in v:
  b=d
 d+=1
print " ".join((q[:b]+p[a:],p[:a]+q[b:]))

PHP 405 325
Minified:
<?php
function c($i){$c=[];$l=0;while(!in_array(substr($i,$l,1),['a','e','i','o','u'])&&$l<strlen($i)){$c[]=substr($i,$l,1);++$l;}return $c;}list(,$a,$b)=$argv;$z=c($a);$x=c($b);$a=implode('',$x).substr($a,count($z),strlen($a)-count($z));$b=implode('',$z).substr($b,count($x),strlen($b)-count($x));echo $a.' -> '.$b.PHP_EOL;

Original code:
<?php
function find_first_consonants($str) {
    $consonants = [];
    $loop = 0;
    while(!in_array(substr($str, $loop, 1), [ 'a', 'e', 'i', 'o', 'u' ]) && $loop < strlen($str)) {
        $consonants[] = substr($str, $loop, 1);
        ++$loop;
    }
    return $consonants;
}
list( , $strA, $strB ) = $argv;
$consonantsA = find_first_consonants($strA);
$consonantsB = find_first_consonants($strB);
$newStrA        = implode('', $consonantsB) . substr($strA, count($consonantsA), strlen($strA) - count($consonantsA));
$newStrB        = implode('', $consonantsA) . substr($strB, count($consonantsB), strlen($strB) - count($consonantsB));
echo $newStrA . ' -> ' . $newStrB . PHP_EOL;

Io, 141 bytes
Surprised that this is actually so long.
method(r,r :=r map(x,x splitAt("aeiou"asList map(j,x asList indexOf(j))min))flatten reverse;list(r slice(1,3)join,list(r at(3),r at(0))join))

Try it online!

Japt v2.0a0, 17 13 bytes
I/O as an array of strings
mòÏè\vÃÕvÔÕmq

Try it
mòÏè\vÃÕvÔÕmq     :Implicit input of array
m                 :Map
 ò                :  Partition before characters that return truthy
  Ï               :  When passed through the following function
   è              :    Count
    \v            :    RegEx /[aeiou]/gi
      Ã           :End partition and map
       Õ          :Transpose
        v         :Modify first element
         Ô        :  Reverse
          Õ       :Transpose
           m      :Map
            q     :  Join

Lexurgy, 75 bytes
a:
((!{a,e,i,o,u})+)$1 ([]*)$2 . ((!{a,e,i,o,u})+)$3 ([]*)$4=>$3 $2 . $1 $4

Input and output is period-separated (plaster.man) due to how Lexurgy handles whitespace.

sed, 44 bytes
s/([^aeiou]+)(.+) ([^aeiou]+)(.+)/\3\2 \1\4/

Try it online!


text:
Compressed days of the week
Given an input of a list of days of the week, output the shortest sorted
representation of the list.
The format of the input is a string consisting of one or more of the
two-character substrings Su (Sunday), Mo (Monday), Tu (etc.), We, Th,
Fr, and Sa. The input may not necessarily be given in sorted order.
To convert the input to the output format,

Sort the input by day of week, starting from Sunday (ex. ThMoSaSuFrTuWe ->
SuMoTuWeThFrSa).
Reduce the abbreviations down to one letter if it leaves no ambiguity. For
example, SuMoTuWe should become SMTW because the first S couldn't
possible be Saturday, as that would make the output unsorted (same for the
T). However, ThFrSa should become ThFS, as both Tuesday and Thursday come
before Friday and reducing it down to TFS would create ambiguity.
If the output is now MTWTF, output D instead (which stands for
"weekdays"). Similarly, SS should become E for weekend. Finally,
SMTWTFS should become A for all days.

The input and output must both be a single string.
Since this is code-golf, the shortest code in bytes wins.
Test cases:
In              Out    | In              Out
-----------------------|--------------------
SuTu            STu    | SuTuWe          STW
SuTuSa          STuS   | SuWeTh          SWT
TuThSa          TTS    | TuThSu          STT
Su              Su     | Sa              Sa
WeTh            WT     | FrTh            ThF
WeTu            TW     | FrTu            TuF
FrWeMo          MWF    | SaWeSu          SWS
ThTu            TT     | We              W
ThTuMoFrWe      D      | SaSu            E
SuMoWeTuThFr    SMTWTF | ThMoSaSuFrTuWe  A

Just reading this makes me feel like it's MMMM

I just think: WTF, and it's weekend!

STFU! Oh, that does not work... :D

Retina, 152 88
Massively golfed with @Martin's and @randomra's help!  Thanks both of you!
^
SuMoTuWeThFrSa
([A-Z].)(?!.*\1)

T`l``Su\B|\BSa|o|r|u?We.?.?|uTh
^MTWTF$
D
SS
E
.{7}
A

Try it online.  A couple of the lines start with m`  with this online interpreter link.  This is so the program works with multiple input lines (to run all tests in one shot).  However, multiple input lines is not a requirement, so these are not included above or in my score.

Dang, I was excited when I finally squished mine below your 152. Can't beat this now XD Very nice guys =)

T`l``Su\B|\BSa|.*e.*|uTh|o|r saves 3 more bytes.

JavaScript (ES7), 187 178 168 157 143 bytes
x=>({SMTWTFS:'A',SS:'E',MTWTF:'D'}[x=[for(a of'Su M Tu W Th F Sa'.split` `)if(x.match(a))x.match({S:/.../,T:/W|T.*T/}[b=a[0]])?b:a].join``]||x)

The regex tests helped make quick work of the special day rules, and while less than ideal, the object map does it's work. I'm certain I can squeeze a few more out of this though.

Python 3, 321 Bytes
def w(n,a=lambda b,c,d:b.replace(c[0],d).replace(c[1],d)):d=''.join([[o[0],o][o[0]in'ST']for o in['Su','Mo','Tu','We','Th','Fr','Sa']if o in[n[i:i+2]for i in range(0,len(n),2)]]);d=[d,a(d,['Tu','Th'],'T')][('W'in d)+('TuT'in d)];l=len(d);d=[d,a(d,['Su','Sa'],'S')][l>2];return[[[d,'A'][l>8],'E'][d=='SS'],'D'][d=='MTWTF']

Test on ideone

You made it a (really long) one liner!

'Su Mo Tu We Th Fr Sa'.split() is shorter than ['Su','Mo','Tu','We','Th','Fr','Sa']

JavaScript (ES6), 197 bytes
s=>eval(`n=0;d="SuMoTuWeThFrSa";s.match(/../g).map(t=>n|=1<<d.search(t)/2);o="";for(i=0;i<7;i++)n&1<<i?o+=d.substr(i*2,n<2|n==64|(!(n&8|(n&20)>19)&&i==2|i==4)?2:1):0;n-127?n-62?n-65?o:"E":"D":"A"`)

Explanation
Encodes each day as a bit and stores the input as a number n. Bit 0 = Sunday ... bit 6 = Saturday. This allows the ambiguity rule checking code to be a lot shorter due to the bit-wise operations and being able to compare the entire combination with a number that is always less than 128.
s=>
  eval(`                   // eval enables the for loop without {} or return
    n=0;                   // n = input encoded as a number
    d="SuMoTuWeThFrSa";    // d = day strings
    s.match(/../g).map(t=> // for each day string t in the input
      n|=1<<d.search(t)/2  // set the bit in n that corresponds to the day
    );
    o="";                  // o = output string
    for(i=0;i<7;i++)       // for each day i from Sunday to Monday
      n&1<<i?              // if the day was in the input
        o+=d.substr(i*2,   // add the day string to the output
          n<2              // Sunday by itself is ambiguous
          |n==64           // Saturday by itself is ambiguous
          |(!(n&8          // Without Wednesday...
            |(n&20)>19     // ...or both Tuesday and Thursday,
            )&&i==2|i==4)  // ...Tuesday or Thursday are ambiguous
          ?2:1             // 2 characters if ambiguous, else 1
        )
      :0;
    n-127?                 // n == 127 = All days (A)
      n-62?                // n == 62 = All week days (D)
        n-65?              // n == 65 = All weekend days (E)
          o                // else output the constructed string
        :"E"
      :"D"
    :"A"
  `)

Test

var solution = s=>eval(`n=0;d="SuMoTuWeThFrSa";s.match(/../g).map(t=>n|=1<<d.search(t)/2);o="";for(i=0;i<7;i++)n&1<<i?o+=d.substr(i*2,n<2|n==64|(!(n&8|(n&20)>19)&&i==2|i==4)?2:1):0;n-127?n-62?n-65?o:"E":"D":"A"`)
<input type="text" id="input" value="FrTh" />
<button onclick="result.textContent=solution(input.value)">Go</button>

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Stop Internet Warming!
Task
Write a program that will output another distinct program, and so on, while using as few distinct characters (and as few bytes) as possible.
For example, program 1 should output program 2, and when program 2 is executed, it should output program 3. This can be nested as deeply as needed, but must be at least 3 distinct programs deep.

Rules

Your program can take no input.
When the program is executed, the output should be the source of another, different program. This includes the STDERR stream. This can continue as many times as needed, but must occur at least three times.
The output source code may be in a separate language.

Example
$ <program-1>
<program-2>

$ <program-2>
<program-3>

$ <program-3>
<empty>

Scoring
Each answer is scored by the following formula:
(length_in_bytes * number_of_distinct_characters) / number_of_distinct_programs

For example, if your answer was 10 bytes long, contained 5 distinct characters, and output 3 distinct programs, your score would be:
(10 * 5) / 3

or 16.66.
Lowest score wins.

Note: This challenge was inspired by the comments on this StackOverflow question.

I suggest you add "lowest score wins" and remove anything above the TL;DR as per this meta answer

I'm voting to close as too broad because there is no criteria on what the programs should do, other than spitting out other programs. It would be trivial to create an infinite sequence of programs in stack-based languages with implicit output like Seriously.

What's the score if you create infinite programs? 0?

For example: Q;+ will result in an infinite sequence of Seriously programs, each containing the previous program repeated twice. Score: 3*3/infinity

Vitsy, 8 bytes, 8 distinct character, ∞ programs (score 0)
This is a simple proof in another stack-based language of Mego's comment.
'Drd3*Z1
' rd3*Z   Standard quine formula
 D     1  Increase the number of ones every output (output 1 will have 11,
          2: 111, 3: 1111, etc.)

Perl 5 - 34 bytes, 19 distinct characters, 10000000 programs (score 0.0000646)
$p="print q{$p}"for 1..1e7;print$p

The score can be lowered arbitrarily by increasing the constant 1e7, at the expense of taking longer and producing larger programs.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Compute the multinomial coefficient
Time for another easy challenge in which all can participate!
The multinomial theorem states:
$$(x_1 + x_2 + \cdots + x_m)^n = \sum_{k_1 + k_2 + \cdots + k_m = n} \binom n {k_1, k_2, \dots, k_m} \prod_{1 \le t \le m} x_t^{k_t}.$$
The expression in parentheses is the multinomial coefficient, defined as:
$$\binom n {k_1, k_2, \dots, k_m} = \frac {n!} {k_1!k_2!\cdots k_m!}$$
Allowing the terms \$k_i\$ to range over all integer partitions of \$n\$ gives the \$n\$-th level of Pascal's \$m\$-simplex. Your task is to compute this coefficient.
Task
Write a program or function which takes \$m\$ numbers, \$n, k_{1}, k_{2}, \dots, k_{m-1}\$, and outputs or returns the corresponding multinomial coefficient. Your program may optionally take \$m\$ as an additional argument if need be. Note that \$k_m\$ is not in the input.

These numbers may be input in any format one likes, for instance grouped into lists or encoded in unary, or anything else, as long as the actual computation of the multinomial coefficient is performed by your code, and not the encoding process.

Output format is similarly flexible.

All code should run in less than one minute for \$n\$ and \$m\$ up to 1000.

Do not worry about integer overflow.

Built-ins designed to compute the multinomial coefficient are not allowed.

Standard loopholes apply.

Scoring
This is code golf: Shortest solution in bytes wins.
Test cases
Input: 3, [2, 0]
Output: 3

Input: 3, [1, 1]
Output: 6

Input: 11, [1, 4, 4]
Output: 34650

Input: 4, [1,2]
Output: 12

Input: 15, [5,4,3,2]
Output: 37837800

Input: 95, [65,4,4]
Output: 1934550571913396675776550070308250

Input: 32, [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
Output: 4015057936610313875842560000000

Input: 15, [3,3,3,3]
Output: 168168000

Input: 1000, [10,10,10,10,10,10,10,10,10,10,100,100,100,100,100,100,100,100]
Output: 1892260836114766064839886173072628322819837473493540916521650371620708316292211493005889278395285403318471457333959691477413845818795311980925098433545057962732816261282589926581281484274178579110373517415585990780259179555579119249444675675971136703240347768185200859583936041679096016595989605569764359198616300820217344233610087468418992008471158382363562679752612394898708988062100932765563185864346460326847538659268068471585720069159997090290904151003744735224635733011050421493330583941651019570222984959183118891461330718594645532241449810403071583062752945668937388999711726969103987467123014208575736645381474142475995771446030088717454857668814925642941036383273459178373839445456712918381796599882439216894107889251444932486362309407245949950539480089149687317762667940531452670088934094510294534762190299611806466111882595667632800995865129329156425174586491525505695534290243513946995156554997365435062121633281021210807821617604582625046557789259061566742237246102255343862644466345335421894369143319723958653232683916869615649006682399919540931573841920000000000000

Input: 33, [17]
Output: 1166803110

Input: 55, [28]
Output: 3824345300380220

Can we have imprecision errors? I.e., instead of 1934550571913396675776550070308250, can we output 1.9345505719133966e+33?

@CᴏɴᴏʀO'Bʀɪᴇɴ If you used 64-bit floats, you won't be able to represent input [1000 {999 ones}] at all, because the exponent is way beyond what 64-bit floats can represent. (128-bit floats will probably suffice, but I'm assuming you want to use JavaScript's native number type?)

@MartinBüttner Yes, that is a correct assumption.

@quintopia "Time for another easy challenge in which all can participate!". Everyone except me! (Since I have no idea what Pascals simplex and multinomials are D:)  LOL.

@AshwinGupta Don't worry about it. You just compute the expression in the second image and you're good to go!

@quintopia hey thanks :D! I'll give it a shot. Sorry I didn't respond all day I was at school then had an after school thing.

Jelly, 7 6 bytes
;_/!:/

Look ma, no Unicode! This program takes a single list as input, with n at its first index.
Try it online! or verify all test cases at once.
How it works
;_/!:/ Input: A (list)

 _/    Reduce A by subtraction. This subtracts all other elements from the first.
;      Concatenate A with the result to the right.
   !   Apply factorial to all numbers in the resulting list.
    :/ Reduce the result by division. This divides the first element by the others.

This is pretty much the algorithm I had in mind as being the simplest.

CJam, 11 bytes
l~_:-+:m!:/

Input as a single list with n first:
[95 65 4 4]

This handles inputs up to n and m 1000 pretty much instantly.
Test it here.
Explanation
l~  e# Read a line of input and evaluate it.
_   e# Duplicate.
:-  e# Fold subtraction over the list. A fold is essentially a foreach loop that starts
    e# from the second element. Hence, this subtracts all the k_i from n, giving k_m.
+   e# Append k_m to the list.
:m! e# Compute the factorial of each element in the list.
:/  e# Fold division over the list. Again, this divides n! by each of the k_i!.

It looks like you will actually lose the byte-count competition, but I have to say I am impressed with CJam's insane terseness.

@phord Well CJam is no match for Jelly (or Pyth for that matter). But I was quite surprised myself how compact it ended up. My first solution had 21 bytes, and while it didn't seem optimal, I didn't think I could almost cut that in half.

MATL, 21 15 bytes
Let's put the log-gamma function to good use. This avoids internal overflowing by working with logarithms of factorials, not with factorials themselves.
1+ZgiO$Gs-h1+Zgs-ZeYo

This works in current version (9.2.2) of the language/compiler, which is earlier than this challenge.
Inputs are: first a number, then a numeric vector. The result is produced as a double, which limits maximum output to somewhere around 2^52.
Example
>> matl 1+ZgiO$Gs-h1+Zgs-ZeYo
> 15
> [5 4 3 2]
37837800

Explanation
1+       % implicit input (number). Add 1
Zg       % log-gamma function
i        % input (numeric vector).
0$G      % push both inputs
s-       % sum the second input (vector) and subtract from first
h1+      % append to vector. Add 1
Zg       % log-gamma function, element-wise on extended vector
s        % sum of results
-        % subtract from previous result of log-gamma
Ze       % exponential
Yo       % round. Implicit display

Try it online! now has experimental MATL support: http://matl.tryitonline.net/#code=MStaZ2lPJEdzLWgxK1pncy1aZVlv&input=MTUKWzUgNCAzIDJdCg Suggestions are welcome.

@Dennis Hey! What a surprise!!! How can I thank you?? I do have a suggestion: if you ever come to Madrid I owe you a good dinner and some drinks

I'm really grateful. It's great to have it online. How will we handle revisions? I'm still constantly updating the language, you know...

For now, I'm manually updating the interpreters. If you make an update, just ping me in The Nineteenth Byte and I'll pull it asap. -- I'll have to go to Madrid in the near future, so I'll keep your offer in mind. ;)

@Dennis Great! That way we can meet in person!

PowerShell, 91 74 bytes
Woo! My 100th answer on PPCG!
param($n,$k)(1..$n-join'*'|iex)/(($k|%{$n-=$_;1..$_})+(1..$n)-join'*'|iex)

Whew. Not going to win shortest-code, that's for sure. Uses a couple neat tricks with ranges, though. And this is probably complete gibberish to anyone not familiar with PowerShell.
Explanation
First we take input with param($n,$k) and expect $k to be an array, e.g. .\compute-the-multinomial-coefficient.ps1 11 @(1,4,4).
We'll start with the numerator (everything to the left of /). That's simply a range from 1..$n that has been -joined together with * and then evaluated with iex to compute the factorial (i.e., 1*2*3*...*$n).
Next, we loop over $k|%{...} and each iteration we subtract the current value $_ from $n (which we don't care about anymore) to formulate $k_m later. Additionally, we generate the range 1..$k_i each iteration, which gets left on the pipeline. Those pipeline objects get array-concatenated with the second expression, range 1..$n (which is $k_m at this point). All of that is finally -joined together with * and evaluated with iex, similar to the numerator (this works because x! * y! = 1*2*3*...*x * 1*2*3*...*y, so we don't care about individual ordering).
Finally, the / happens, the numerator is divided by the denominator, and output.
Handles output correctly for larger numbers, since we're not explicitly casting any variables as any particular datatypes, so PowerShell will silently re-cast as different datatypes on the fly as needed. For the larger numbers, outputs via scientific notation to best preserve significant figures as the datatypes get re-cast. For example, .\compute-the-multinomial-coefficient.ps1 55 @(28) will output 3.82434530038022E+15. I'm presuming this to be OK given "Output format is similarly flexible" is specified in the challenge and quintopia's comments "If the final result can fit within the natively supported integer types, then the result must be accurate. If it cannot, there is no restriction on what may be output."

Alternatively
Depending upon output formatting decisions, the following at 92 bytes
param($n,$k)((1..$n-join'*'|iex)/(($k|%{$n-=$_;1..$_})+(1..$n)-join'*'|iex)).ToString('G17')

Which is the same as the above, just uses explicit output formatting with .ToString('G17') to achieve the desired number of digits. For 55 @(28) this will output 3824345300380220.5

Edit1 -- Saved 17 bytes by getting rid of $d and just calculating it directly, and getting rid of the calculation for $k_m by stringing it along while we loop $k
Edit2 -- Added alternate version with explicit formatting

APL (Dyalog Extended), 9 bytes
×/2!/+\⍛,

Try it online!
Using the idea from my APL answer on another challenge that involves multinomials.
A tacit function whose left argument is the list of k's, and right argument is n. The test cases check if it agrees with Adam's solution with left and right arguments flipped.
How it works
×/2!/+\⍛,
     +\    ⍝ Cumulative sum of k's (up to m-1'th element)
       ⍛,  ⍝ Append n (sum of k_1 to k_m)
  2!/      ⍝ Binomial of consecutive pairs
×/         ⍝ Product

$$
\frac{(k_1 + k_2 + \cdots + k_m)!}{k_1! k_2! \cdots k_m!} = \frac{(k_1 + k_2)!}{k_1! k_2!} \times \frac{(k_1 + k_2 + \cdots + k_m)!}{(k_1 + k_2)! k_3! \cdots k_m!}
$$
$$
= \frac{(k_1 + k_2)!}{k_1! k_2!} \times \frac{(k_1 + k_2 + k_3)!}{(k_1 + k_2)! k_3!} \times \frac{(k_1 + k_2 + \cdots + k_m)!}{(k_1 + k_2 + k_3)! \cdots k_m!}
$$
$$
= \cdots = \binom{k_1 + k_2}{k_1} \binom{k_1 + k_2 + k_3}{k_1 + k_2} \cdots \binom{k_1 + \cdots + k_m}{k_1 + \cdots + k_{m-1}}
$$

Python 3, 93 91
Thanks to Dennis and FryAmTheEggman.
f=lambda x:0**x or x*f(x-1)
def g(n,k):
    r=f(n)
    for i in k:r//=f(i)
    return r//f(n-sum(k))

n as integer, k as iterable.
Ungolfed:
import functools #cache

@functools.lru_cache(maxsize=None) #cache results to speed up calculations
def factorial(x):
    if x <= 1: return 1
    else: return x * factorial(x-1)

def multinomial(n, k):
    ret = factorial(n)
    for i in k: ret //= factorial(i)
    km = n - sum(k)
    return ret//factorial(km)

You can use a single space instead of four for the dynamic whitespace bit

I used tabs, they got replaced in this post. Byte count seems to be OK. I'm not sure about float result and possible overflow.

@TrangOul Oh, I thought / would yield an integer if the result was representable as an integer. It doesn't though. In that case, you're right.

This produces an incorrect for 95, [65, 4, 4]. Note that the input does not contain k_m. 2. You don't seem to be using from functools import* at all.

@Dennis: fixed. I need functools for reduce.

Your golfed code doesn't use reduce. 2. import math;f=math.factorial saves a byte. 3. Python 2 would allow you to get rid of the second / in //.

Yeah, I realized that after writing previous comment... Sorry about that. Note to self: don't play with code golf with wife around babbling :/ .

Defining f on your own saves some bytes: f=lambda x:0**x or x*f(x-1).

Oh, I didn't realize that in Python 0**0 == 1. Thanks.

Mathematica, 26 bytes
#!/Times@@({#-+##2,##2}!)&

Example:
In[1]:= #!/Times@@({#-+##2,##2}!)&[95,65,4,4]

Out[1]= 1934550571913396675776550070308250

APL (Dyalog Unicode), 16 bytesSBCS
Entirely based on the mathematical skill of my colleague Marshall.
Anonymous infix function. Takes k as right argument and n as left argument.
{×/⍵!⍺-+\¯1↓0,⍵}

Try it online!
{…} anonymous lambda; ⍺ is left argument (n) and ⍵ is right argument (k)
 0,⍵ prepend a zero to k
 ¯1↓ drop the last item from that
 +\ cumulative sum of that
 ⍺- subtract that from n
 ⍵! (k) that
 ×/ product of that

PARI/GP, 43 bytes
Pretty straightforward; aside from formatting, the ungolfed version might well be identical.
m(n,v)=n!/prod(i=1,#v,v[i]!)/(n-vecsum(v))!

Matlab 48 bytes
You need to set format to long in advance to get the higher precision. Then, it's quite straightforward:
@(n,k)factorial(n)/prod(factorial([k,n-sum(k)]))

ans(95, [65,4,4])
ans =

 1.934550571913395e+33

Pyth, 10 bytes
/F.!MaQ-FQ

Try it online: Demonstration
Explanation:
/F.!MaQ-FQ   implicit: Q = input list
       -FQ   reduce Q by subtraction
     aQ      append the result to Q
  .!M        compute the factorial for each number
/F           reduce by division

J, 16 bytes
[(%*/)&:!],(-+/)

Usage
For larger values, a suffix of x is used to denote extended precision integers.
   f =: [(%*/)&:!],(-+/)
   11 f 1 4 4
34650
   15x f 5 4 3 2
37837800

Explanation
[(%*/)&:!],(-+/)  Input: n on LHS, A on RHS
             +/   Reduce A using addition
            -     Subtract that sum from n, this is the missing term
         ]        Get A
          ,       Append the missing term to A to make A'
[                 Get n
      &:!         Take the factorial of n and each value in A'
   */             Reduce using multiplication the factorials of A'
  %               Divide n! by that product and return

Haskell, 59 58 bytes
f n=product[1..n]
n#k=foldl((.f).div)(f n)k`div`f(n-sum k)

Try it online!
Thanks to BMO for saving 1 byte!

05AB1E, 8 bytes
Æ¸«!R.«÷

Try it online! Explanation:
Æ           Subtract all the elements from the first
 ¸«         Append to the original list
   !        Take the factorial of all the elements
    R.«÷    Reduce by integer division

I can't seem to find better ways of performing step 2 or step 4.

APL (Dyalog Unicode), 17 bytes
⊢∘!÷(×/∘!⊣,⊢-1⊥⊣)

Try it online!
Infix tacit function (Thanks to @Adám for the 2 bytes it saves.)

APL (Dyalog Unicode), 19 bytes
{(!⍺)÷×/!(⍺-+/⍵),⍵}

Try it online!
Infix Dfn.
Both functions above compute the given formula.

Clojure, 70 bytes
#(let[a apply](a /(map(fn[x](a *(map inc(range x))))(conj %(a - %)))))

Creates an anonymous function taking all of the arguments as a single list, with n first.
30 characters are "wasted" just defining the damn factorial function.  Oh well.

Perl 6,  52  50 bytes
->\n,\k{[*](1..n)div[*] ([*] 1..$_ for |k,[-] n,|k)}

Test it
->\n,\k{[*](1..n)/[*] ([*] 1..$_ for |k,[-] n,|k)}

Test it (result is a Rational with denominator of 1)
Expanded:
->     # pointy block lambda
  \n,
  \k
{
    [*]( 1 .. n )   # factorial of ｢n｣

  /                 # divide (produces Rational)

    [*]             # reduce the following using &infix:«*»

      (
          [*] 1..$_ # the factorial of

        for         # each of the following

          |k,       # the values of ｢k｣ (slipped into list)
          [-] n,|k  # ｢n｣ minus the values in ｢k｣
      )
}

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Nested Header List
The goal of this challenge is to complete a list of consecutive nested header numbers when given a start and an end.  When given 1.1.1 and 1.1.5 you should generate 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5
Specific Rules

Your entry must take in a start, end, and multiple optional range parameters.  Parameters can be taken form STDIN (or nearest equivalent) or a file.
Your entry may assume valid input
Input will be of the following format:

start and end will be strings of . delimited integers of the same length
start and end will have three segments; (1) set values, (2) iterator, (3) trailing values.

The iterator is the first value which differs between start and end.
The set values are the values before the iterator.  These values never change
The trailing values are the values after the iterator.  These values iterate up as determined by the range parameter(s). All trailing values in start and end will be 1.

range will be a list of integers or strings (depending on which you prefer) with a length corresponding to the number of trailing values.  When there are no trailing values, range is not specified. The value of range corresponding to each trailing value determines the inclusive upper bound which that entry iterates to.

Output will be to STDOUT (or closest alternative) and will show each value separated by at least one delimiter.  Delimiter can by any character or string of characters, but it must be consistent. Output must be sorted correctly

Examples
start = '1.1.5.1', end = '1.1.6.1', range = [5]
Output: 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.6.1
                                                  ^
                                                  previous value is iterated
                                                  only when iterating value
                                                  limit set by range

start = '1.1.5.1', end = '1.1.7.1', range = [5]
Output: 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.6.1,
        1.1.6.2, 1.1.6.3, 1.1.6.4, 1.1.6.5, 1.1.7.1

start = '1.5.1.1', end = '1.6.1.1', range = [5,2]
Output: 1.5.1.1, 1.5.1.2, 1.5.2.1, 1.5.2.2, 1.5.3.1, 1.5.3.2,
        1.5.4.1, 1.5.4.2, 1.5.5.1, 1.5.5.2, 1.6.1.1

This is code golf so shortest code by bytes wins. Standard loopholes apply.
Bonuses

Allow trailing values to be values other than 1 in end parameter - 12.5% off
Handle incorrect number of values in range parameter - 12.5% off
Handle end less than start by producing list in reverse - 50% off

Bonuses are calculated off of the original byte count; a 100 byte answer which receives all bonuses will have a final score of 100 bytes - 100*(0.125+0.125+0.5) = 25 bytes

@nimi, edited to answer both questions in your second comment.

@nimi, For bonus 3, yes that is the correct understanding

why does the second test case repeat 1.1.6.1?

You say the set values never change - are they always 1's? Are all the numbers in start and end single digits, or could 1.1.22.1 to 1.1.24.1 happen?

@Maltysen, because I missed that, its just a typo, disregard

@TessellatingHeckler, Set values never change, but there's no reason why they couldn't be values other than 1.  Yes, double digit values can be present

Haskell, 201 194 188*0.25 = 47 bytes
import Data.Lists
l=length
p x=read<$>splitOn"."x
(s#e)r=intercalate".".map show<$>(fst$span(<=e)$sequence$zipWith enumFromTo s$take(l e-l r)e++r)
s!e|s<e=s#e|1<2=reverse.(e#s)
(.p).(!).p

I'm going for all bonuses.
"Normal" use:
*Main> ((.p).(!).p) "1.5.1.1" "1.6.1.1" [5,2]
["1.5.1.1","1.5.1.2","1.5.2.1","1.5.2.2","1.5.3.1","1.5.3.2","1.5.4.1",
"1.5.4.2","1.5.5.1","1.5.5.2","1.6.1.1"]

Bonus 1:
*Main> ((.p).(!).p) "1.5.1.1" "1.6.4.1" [5,2]
["1.5.1.1","1.5.1.2","1.5.2.1","1.5.2.2","1.5.3.1","1.5.3.2","1.5.4.1",
 "1.5.4.2","1.5.5.1","1.5.5.2","1.6.1.1","1.6.1.2","1.6.2.1","1.6.2.2",
 "1.6.3.1","1.6.3.2","1.6.4.1"]

Bonus 2:
*Main> ((.p).(!).p) "1.5.1.1" "1.6.1.1" [3]
["1.5.1.1","1.5.1.2","1.5.1.3","1.6.1.1"]

Bonus 3:
*Main> ((.p).(!).p) "1.6.1.1" "1.5.1.1" [5,2]
["1.6.1.1","1.5.5.2","1.5.5.1","1.5.4.2","1.5.4.1","1.5.3.2","1.5.3.1",
 "1.5.2.2","1.5.2.1","1.5.1.2","1.5.1.1"]

How it works:
Split start and end into lists of numbers, e.g. "1.5.1.1" -> [1,5,1,1]. Prepend elements from end to range so that the resulting list has the same length as end, e.g. [5,2] and "1.6.1.1" -> [1,6,5,2]. Zip this list and start with the list building function enumFromTo, e.g. [1,5,1,1] and [1,6,5,2]-> [[1],[5,6],[1,2,3,4,5],[1,2]]. sequence builds all combinations thereof, where numbers at position i are drawn from sublist i, -> [[1,5,1,1],[1,5,1,2],[1,5,2,1],[1,5,2,2],...]. Re-insert the dots and take elements as long as the they are less or equal than end.

PowerShell, 214 bytes, no bonuses :(
param($s,$e,$r)
$f={param($v,$w)if($w){$w[0]|%{&$f "$v.$_" $w[1..$w.Count]}}else{$v;if($v-eq$e){break}}}
$x,$y=($s-split'\.'|diff $e.split('.')).inputobject
$q=,($x..$y)
$r|%{$q+=,(1..$_)}
&$f ($s-split".$x")[0] $q

e.g.
PS C:\Scripts> .\nestedh.ps1 '1.5.1.1' '1.6.1.1' @(5,2)
1.5.1.1
1.5.1.2
1.5.2.1
1.5.2.2
1.5.3.1
1.5.3.2
1.5.4.1
1.5.4.2
1.5.5.1
1.5.5.2
1.6.1.1

It:

Uses -split '\.' feeding to diff/Compare-Object to find the two differing numbers, (this approach blocks the bonus where the tail values can change, because it changes the diff output).
Builds an array of the ranges it will need for each header position, taking from the range parameters.This leaves something like "$q=[[5,6], [1,2,3,4,5], [1,2]]"
Those get fed into the recursive function $f which takes the set values prefix and a list of sublists, adds the prefix to each number, and calls itself with that as the new prefix, and the remaining sublists
quits when it hits the $end string


text:
Make a simple pretty-comment tool
Challenge:
Some ascii-art is a pain to make, but makes code comments easier to read, especially when the code is dense. The challenge is to make a simple tool that converts comments to simple ascii-art with arrows. The comments to modify are delimited by empty comments.
For example, supposing Haskell comment syntax, convert this:
--
-- Here's a thing
-- Here's another thing
-- The most important thing
-- *    *     *
--
f x=x+1*x*1*1*0

To this:
-- /------------< Here's a thing
-- |    /-------< Here's another thing
-- |    |     /-< The most important thing
-- |    |     |
-- v    v     v
f x=x+1*x*1*1*0

Rules:

Your answer may be either a function or full program
You may pick the language this is made to work with, replacing the "--" with two or more characters that delimit a comment in some language
If using another comment format that requires beginning and ending delimiters, each line of the reformatted sections must be a proper comment
The sections to be reformatted are delimited by the empty comment "\n--\n"
Besides adding newlines, the program must not change any of the input except the delimited sections
A comment filled with an arbitrary number of spaces may come immediately before a properly formatted section of output
Standard loopholes are disallowed

Additional Examples:
(input)
--
--
(output)
nothing

(input)
[Code Here]
--
-- important
--    *
--
(output)
[Code Here]
--    /-< important
--    |
--    v

(input)
--
-- Do
-- Re
-- Mi
-- Fa
-- So
-- *****
--
(output)
-- /-----< Do
-- |/----< Re
-- ||/---< Mi
-- |||/--< Fa
-- ||||/-< So
-- |||||
-- vvvvv

Scoring:

Fewest bytes wins
Submissions without explanations or non-trivial example input/output will not be considered (though I will leave a grace period to allow time to add such)

What if only one character is needed to delimit a comment?

As long as it's a valid comment in the language, it's fine

We can assume that each comment section which is subject to reformatting will contain exactly one line of position marker asterisks, right? Will that line be always the last one?

Yup, exactly one and always last (comment before end delimiter)

And the amount of asterisks will be equal with the number of preceding lines in that section, right?

@manatwork excluding the delimiter, yes. So (delimiter)(N commented lines)(N asterisks commented)(delimiter).

Additional example 1 - an empty comment section with 2 adjacent rows containing --. Must it be removed altogether? It seems the only case when there is a change to the number of the rows in output. Or could we just replace the comments with 2 empty lines?

@edc65 It may be replaced with empty lines

Ruby, 160 characters
->c{c.gsub(/^--$(.+?)^--$/m){*t,a=$&.lines[1..-2]
a&&a.chop!&&(t.map{|l|a[?*]=?/
l[0,2]=a.gsub(/(?<=\/).*/){?-*$&.size}+'-<'
a[?/]=?|
l}< puts ->c{c.gsub(/^--$(.+?)^--$/m){*t,a=$&.lines[1..-2];a&&a.chop!&&(t.map{|l|a[?*]=?/;l[0,2]=a.gsub(/(?<=\/).*/){?-*$&.size}+'-<';a[?/]=?|;l}< --
2.1.5 :003"> -- Here's a thing
2.1.5 :004"> -- Here's another thing
2.1.5 :005"> -- The most important thing
2.1.5 :006"> -- *    *     *
2.1.5 :007"> --
2.1.5 :008"> f x=x+1*x*1*1*0
2.1.5 :009"> "]

-- /------------< Here's a thing
-- |    /-------< Here's another thing
-- |    |     /-< The most important thing
-- |    |     |
-- v    v     v
f x=x+1*x*1*1*0
 => nil

Brief description:
.lines splits the section to array items ─────────╮
                                                  ▽

.gsub extracts ⎧   --                             0
these sections ⎪   -- Here's a thing              1   t[0]
for processing ⎨   -- Here's another thing        2   t[1]
and replaces   ⎪   -- The most important thing    ⋮   t[2]
them with the  ⎪   -- *    *     *               -2   a
pretty version ⎩   --                            -1
rest untouched —   f x=x+1*x*1*1*0
                                                      △
only the needed lines get into variables ─────────────╯

a = "-- *    *     *" + "-<"           inside .gsub's block
        ↓↓                             the first 2 characters
t[0] = "-- Here's a thing"             of t's each item are
t[1] = "-- Here's another thing"       replaced with a's value
t[2] = "-- The most important thing"   and the the separator

not only t's items are transformed inside .gsub's block,
but a's value also gets changed in multiple small steps

                       change a's value    change the value    change a's value
   a's initial value   before insertion   being inserted now   after insertion
   ╭───────────────╮   ╭───────────────╮   ╭───────────────╮   ╭───────────────╮

0  "-- *    *     *" → "-- /    *     *" → "-- /-----------" → "-- |    *     *"
1  "-- |    *     *" → "-- |    /     *" → "-- |    /------" → "-- |    |     *"
2  "-- |    |     *" → "-- |    |     /" → "-- |    |     /" → "-- |    |     |"

                       ╰───────────────╯   ╰───────────────╯   ╰───────────────╯
                      change first * to /  change everything  change first / to |
                                          after / with string
                                          of - of same length

JavaScript(ES6), 418, 237, 233, 236 bytes
f=(s)=>(d='\n//',s.split(d+'\n').map((x,y)=>y%2?'//'+(l=x.slice(2).split(d),t=l.pop().split('*'),l.map((i,j)=>t.map((k,m)=>m==j?k+'/':m<j?k+'|':k.replace(/ /g,'-')+'-').join('')+'<'+i).join(d)+d+t.join('|')+d+t.join('v')):x).join('\n'))

Whew, this is my first submission on CG. Took, I think, a totally different tack from Washington Guedes. Ended up 54 bytes shorter than his first pass. Minifying all this by hand was grueling. My one regret is not being able to eliminate the while loop yet, which would also let me cut the return.
Total rewrite, taking partial inspiration from a couple of the other answers. I got to close the whole thing in maps, making returning much better. The code snippet contains the commented version.
Took a few more bytes off, and made the example operate on itself. (You're gonna need a bigger monitor.) :)
Forgot an entire letter in the spec! Fortunately, adding the leading '<' was a tiny, trivial fix.

var comments = `
//
// New function, declare the comment delimiter
// Chop the string by the fancy comment delimiter
// Iterate over the array.
// Because of how it's delimited, and how JS splits strings, only the even elements will contain fancy comments.
// Add the original comment delimiter to the front of the first line, because join won't.
// we've got a single fancy comment, split it into lines.
// Take the last line, our asterisk template, and split it on the asterisks themselves. We were only gonna replace them anyway.
// Now we get to the real work. Iterate the remaining lines.
// For each chunk of whitespace in the template array, toss a different character on the end based on where we are in the series of lines.
// if we're at the matching asterisk, insert a slash
// Otherwise, if we're at a prior asterisk, add a pipe.
// Finally, replace anything afer the matching asterisk with dashes, join the template, and add it to the line text.
// Join the lines with the delimiter
// Add the pipe line...
// And the v line...
// For odd chunks, just return the chunk.
// Join all the code chunks and autoreturn.
//      *        *               *          *   *     *                     *                    *            *            *          *         *                                        *           *             *          *  *
//
`
f=(s)=>(d='\n//',s.split(d+'\n').map((x,y)=>y%2?'//'+(l=x.slice(2).split(d),t=l.pop().split('*'),l.map((i,j)=>t.map((k,m)=>m==j?k+'/':m<j?k+'|':k.replace(/ /g,'-')+'-').join('')+'<'+i).join(d)+d+t.join('|')+d+t.join('v')):x).join('\n'))

str = `
//
// This is a test
// with two lines
// actually three
// *  *       *
//
var myCode = function () {

}
// This doesn't cause any trouble.

moreCode(stuff--)

//
// another test?
//  *
//

`
document.getElementById('before').textContent = str;
document.getElementById('after').textContent = f(str);
document.getElementById('self').textContent = f(comments)+'f='+f.toString();
Test cases before:

Test cases after:

Self-annotated:

Python 2, 299 bytes
Expects a trailing newline in the input
i=input().split('--\n')
a=0
for j in i:
 a+=1
 if a%2:print j,;continue
 if''==j:continue
 l=j.split('\n');n=l[-2];r=l[:-2];R=[n.replace('*','v'),n.replace('*','|')];L=R[1]
 for x in range(len(l)-2)[::-1]:L=L[:L.rfind('|')]+'/';R+=[L.ljust(n.rfind('*')+2,'-')+'< '+r[x][3:]]
 print'\n'.join(R[::-1])

Explanation/Example
Input:
[Code Here]
--
-- important
--    *
--

Splits the input by --\n. Every second string is a delimited comment block.
['[Code Here]\n',
'-- important\n-- stuff\n--    *  *\n',
'']

Runs through each string. If the string is not a comment, then just prints the string. Otherwise:
Splits each line in the comment block.
['-- important', '-- stuff', '--    *  *', '']

Makes the bottom two lines by replacing the lines of *s with v and |.
['--    v  v', '--    |  |']

For each line of comments(backwards) remove rightmost column, add /, pad with - and add comment.
'--    |  /'
'--    /'
'--    /----< important'

Print Everything
--    /----< important
--    |  /-< stuff
--    |  |
--    v  v

Less golfed:
i=input().split('--\n')
a=0
for j in i:
 a+=1
 if a%2:print j,;continue # Not commment
 if''==j:continue # Empty comment
 l=j.split('\n') # Split comment into lines
 r=l[:-2]
 # Replace line of *s with v and | respectively
 R=[l[-2].replace('*','v'),l[-2].replace('*','|')]
 L=R[1][3:] # line of |
 for x in range(len(l)-2)[::-1]: # For each comment line
  L=L[:L.rfind('|')]+'/' #Remove rightmost column
  # Add a line with '-- ',columns, and comment
  R+=['-- '+L.ljust(n.rfind('*')-1,'-')+'< '+r[x][3:]]
 print'\n'.join(R[::-1]) #Print all comment lines

JavaScript (ES6), 253
As an anonymous function, with the code to format as a string parameter and returning the formatted code.
Notes

The pair of marker comments must enclose the right text (comment lines, then stars)
... or the pair must enclose nothing (additional example 1)

t=>(t=t.split`
`,t.map((r,i)=>r=='--'?(c++&&l.map((r,j)=>(p+=q[j],z+=~q[j].length,t[i-n+j]=p+`/${'-'.repeat(z+1)}<`+r.slice(3),p+=`|`),q=l.pop(c=p=``)||p,z=q.length,q=q.split`*`,t[i]=p+q.join`v`,t[i-1]=p+q.join`|`),l=[]):n=l.push(r),c=0,l=[]),t.join`
`)

Less golfed
f=t=>{
  t = t.split`\n`; // string to array of lines
  l = []; // special coment text
  c = 0; // counter of marker comment '--'
  t.forEach((r,i)=>{ // for each line of t - r: current line, i: index
    if (r == '--') // if marker comment
    {
       ++ c; // increment marker counter
       if (c > 1) // this is a closing marker
       {
          c = 0; // reset marker counter
          if (n > 0) // n is the length of array l
             q = l.pop(); // get last line from l, have to be the star line
          else
             q = ''; // no text comment, no star line
          p = '';  // prefix for drawing the tree
          z = q.length; // length of star line, used to draw the tree horiz lines
          q = q.split('*'); // split to get star count and position
          // each element in q is the spaces between stars
          // modifiy the current and previous text line
          t[i] = p + q.join`v`; // current row was '--', becomes the V line
          t[i-1] = p + q.join`|`; // previous row was the star line, becomes the last tree line
          l.forEach((r,j)=>{ // for each line in l, r: current line, j: index
             // each line in tree is: prefix("-- |  |"...) + ... "---< " + text
             p = p + q[j]; // adjust prefix
             z = z - q[j].length - 1 // adjust length of '---'
             // modify text in t
             t[i-n+j] = p // prefix
                + '/' + '-'.repeat(z+1) + '<'  // horiz line and <
                + r.slice(3); // text, removed '-- '
             p = p + '|'; // add vertical bar to prefix
          });
       } // end if closing comment
       l = []; // reset l
    }
    else // not a special comment marker
       n = l.push(r) // add current line to l, set n to array size
  });
  return t.join`\n` // join to a single string
}

Test

f=t=>(
  t=t.split`\n`,
  t.map((r,i)=>
    r=='--'
    ?(
      c++&&l.map((r,j)=>(
        p+=q[j],z+=~q[j].length,t[i-n+j]=p+`/${'-'.repeat(z+1)}<`+r.slice(3),p+=`|`),
        q=l.pop(c=p=``)||p,z=q.length,q=q.split`*`,t[i]=p+q.join`v`,t[i-1]=p+q.join`|`
      ),l=[]
    ):n=l.push(r)
    ,c=0,l=[]
  ),
  t.join`\n`
)

function update(){O.textContent=f(C.value)}

update()
textarea, pre { width:50%; height: 200px }
Input

<textarea id=C>
code line 1
--
-- Do
-- Re
-- Mi
-- Fa
-- So
-- *****
--
code to explain
--
--
code line n
code line n+1
--
-- important
--    *
--

</textarea>

Output <button onclick="update()">Update</button>

This misses the second comment block for me on chrome 47 without erroring. Also, crap, I didn't see before that you could use any comment syntax with any language.

Uh, yes, you are right. @EmmettR. thanks. I'll try to fix it


text:
Attraction Between Words
Newton's theory of gravitation says that the gravitational force between two point masses is
 F=(Gm1m2)/ r2
Where

G is the gravitational constant: 6.674×10−11 N · (m/kg)2
m1 is the mass of the first object
m2 is the mass of the second object
r is the distance between their centers of mass

Challenge
You need to simulate the pull between two words. Each lowercase letter has mass given by its position in the alphabet. Capital letters have twice the mass of their lowercase counterparts! You will be given a string containing two words separated by several spaces, as well as a positive integer number of seconds, s. Output what the string would look like after s seconds.
Info

Because words are abstract they have a different set of units and constants

Mass: WMU (Word Mass Unit) - equal to the mass of the letter 'a'.
Distance: em, the length of one character.
Force:  NW (Word Newton) = WMU · em/s2
Gravitational Constant: G = 1 Nw · (em/WMU)2

The first character corresponds to the position 0 on the x-axis.
All calculations should be done with as much precision as possible, only at the end do you round to the nearest em.
You do not need to use calculus, you just need to recalculate the F every second, automatically apply the new acceleration to the velocity, and after a second apply the velocity to the position (see example).
Once two words collide with each other (like    catdog   ), they don't move any further.

Center of Mass
The center of mass of a word can be found with the formula:

Where M is the total mass of the word, mi is the mass of a letter, and ri is the position of the letter.
Example:
(Note: Although this example doesn't show it, remember that capital letters have twice the mass of their lowercase counterparts.)
Input: cat      dog, 2

First what are the positions of each word? "cat" starts at position 0 and "dog" starts at position 9, so

xc = 0 and xd = 9

Next, let's find the center of mass of "cat".

It has a mass of 24 WMU (3+1+20).
Rc = 1/24(3*0+1*1+20*2) = 41/24 = 1.70833 em
So unsurprisingly the center of mass is very close to the letter 't'.

Now let's get the center of mass of "dog"

Rd = 1/26(4*9+15*10+7*11) = 263/26 = 10.11538 em
So the center of mass for dog is close to the letter 'o', slightly towards 'g'.

Now we can calculate the force between the two words.

F = 24*26/(10.11538-1.70833)2 = 8.82871 Nw

Now we need to apply this force to both words and get their accelerations

ac = 8.82871/24 = .36786 em/s2
ad = -8.82871/26 = -.33957 em/s2

Following the rules above, we apply the acceleration to the velocity, so

vc = .36786 em/s
vd = -.33957 em/s

Then we apply the velocity to the position, so after one second,

xc = .36786 em
xd = 9 -.33957 = 8.66043  em.
Rc = 1.70833+.36786 = 2.07619 em
Rd = 10.11538-.33957 = 9.77581 em

Now we repeat the procedure one more time with the new positions:

F = 24*26/((9.77581)-(2.07619))2 = 10.52558 Nw
ac = 10.52558/24 = .43857 em/s2, ad = 10.52558/26 = -.40483 em/s2
vc = .36786 + .43857 = .80643 em/s, vd = -.33957 - .40483 = -.74440 em/s
xc = .36786 + .80643 = 1.17429 em, xd = 8.66043 - .74440 = 7.91603 em
Rc = 2.07619 + .80643 = 2.88262 em, Rd = 9.77581 - .74440 = 9.03141 em

So we end up with "cat" at x=1.17429 and "dog" at x=7.91603.

We round those to the nearest integer so "cat" goes to position 1 and "dog" goes to position 8, so the output is  cat    dog

Handling Collisions
Remember that the new acceleration is immediately added to the velocity every second. Therefore, if two words collide at certain time, use algebra to find the point of collision. Take this example:

word 1 is 4 letters long (||w1|| = 4)
word 2 is 4 letters long (||w2|| = 4)
x1 = 3, x2 = 8
v1 = 2,v2 = -6
Solve 3 + (4-1) + 2t = 8 - 6t. t = .25s. The position of the collision is xcol = 6.5. Therfore, the collision should appear as occurring between x = 6 and x = 7, as such
   ####@@@@    .

The explicit formula for the positions of the words after a collision is

x1 = floor(xcol)-||w1||+1
x2 = floor(xcol)+1

@FryAmTheEggman The last bullet point in "info" talks about collision. You can do it in one step but make sure to follow the rules laid out.

Might the words pass through each other?

@xnor No, they're won't. I'm added a part about properly handling collisions.

I'm trying to understand the physics involved here. Consider the configuration xx a (one space between the words xx and a). In Newtonian physics, the force that a feels would be due to the closer x pulling from a distance of two em's, and the other x pulling from a distance of three em's, yes? That's not the same as the force of a single point-mass X pulling from a distance of 2.5 em's (i.e., the center of mass of the xx), due to the inverse-square law...

...so just to clarify, I'm supposed to treat each WORD as if it were a point-mass with all its mass concentrated at its center of mass, where by "its center of mass" we mean "where its center of mass would be if we instead treated its LETTERS as point-masses". Is this correct?

@mathmandan Yes, I was having that exact question, but I was recommended to do it like this. Your interpretation of the rules is correct.

Python 3, 556 bytes
Thanks to FryAmTheEggman and Sherlock9 for some bytes
s,E,a,b,e=str.split,enumerate,lambda c:ord(c)%32*-~c.isupper(),lambda w:sum(map(a,w)),' '
def j(w):z,y=map(len,s(w));h=w.count(e);return sum(i*a(x)for i,x in E(w)if i<z)/b(w[:z]),sum(i*a(x)for i,x in E(w)if i>=y+h)/b(w[-y:])
def f(w):x,v=j(w);m,n=map(b,s(w));return m*n/(x-v)**2
def q(w):x,v=s(w);return f(w)/b(x),-f(w)/b(v)
def p(w,t):
 x,v=q(w);c,d=x,v;m,n=map(b,s(w));r,u=j(w);g,h=r,u;
 for i in range(t):r+=x;u+=v;f=m*n/(r-u)**2;c,d=f/m,f/n;x+=c;v+=d
 return int(r-g),int(1+h-u)
def g(w,t):x,y=p(w,t);u,v=s(w);return e*x+u+e*(len(w)-len(u+v)-x-y)+v+e*y

g(w,t) takes the string (w) and the time (t), and returns the result. The other functions are helpers.
Try it online (prints out *s instead of spaces so that it is more visible)


text:
Finite State Machine validity
I've been around for a while, watching you golf and I really enjoy it.
I came up with a challenge for you all so let's begin!
Challenge
I assume that everyone knows what Finite State Machine (FSM) is, I will edit the the description if needed.

Your program will take only one input consisting in a string that represents a FSM.
The first character of the input is the FSM's initial state and the last character is the FSM's final state.
Transitions are represented as two consecutive characters (AB will be the transition from state A to state B. ABCD will be the two transitions A to B and C to D)
In this challenge, the FSM is considered valid when you have at least one path from the initial state to the final state.

Goal
Output a truthy value, telling the world if the input is a valid FSM (any equivalent for True of False is fine)
Bonus

-20% if you add all the sequences of valid paths to the output

Examples
AB should output (with bonus) true AB
ABC should output false (No transition to state C)
ABCEBD should output (with bonus) true ABD (The presence of unreachable states C and E doesn't make it false)
ISSTSFTF should output (with bonus) true ISF ISTF
ABACBCCD should output (with bonus) true ACD ABCD
ABACBCD should output false
ABACADCDBCDEBE should output (with bonus) true ABE ADE ACDE ABCDE
Final word
If you think this challenge lacks something, please tell me, I'd really like to see the answers you can come up with

You should probably clarify that the transition pairs are not overlapping. So ABCD represents only two transitions A->B and C->D and not B->C. Otherwise the challenge would be trivial.

It would also be a good to have a truthy test case where some state other than the final state is not reachable.

Never assume that we know. :P I know I don't know what a Finite State Machine is.

This is not that related to finite state machines. It's just reachability in a directed graph.

Welcome to PPCG! With respect to bonusses, check out this meta answer.  4 votes is certainly not to be taken as consensus, but IMO your bonuses - especially the first one - add little to the challenge

Darn.. I looked in Peter Taylor's graph theory challenge index for a dupe target, but the entry under reachability was 'too many to mention'.

@FryAmTheEggman I think this is supposed to illustrate an answer with only the second bonus

@feersum, pretty much everything in [tag:path-finding] is close to a dupe, but I can't find such a minimalistic reachability question before, so I will hold off on the supervote.

Thank you. I'll edit the post to take @MartinBüttner 's advices in account.
If you think this is a dupe, I'm sorry but since I haven't found a challenge close to what I had in mind, I posted this one.

Which characters are valid names for states?

@feersum I would say that [A-Z] are valid names to keep it simple.

The third test case is wrong as: In this challenge, the FSM is considered valid when you have at least one path from the initial state to the final state.  or is there something I do not understand?

@MegaTom You're totally right. I edit that right away

You should also include a test case that doesn't start with A.

@user81655 It doesn't matter as I said The first character of the input is the FSM's initial state and the last character is the FSM's final state.

Test cases are meant for testing if a program follows the specs or not. Hardcoding A as the initial state would save 6 bytes in my solution, but technically make it invalid even though it passes all the test cases. The only way anyone would know is by studying the code.

In that case, I'll add one.

I think this is a dupe. While I think a pure canonical is-there-a-path question would distinguish itself from the many other, this one is yet another challenge to extract the graph from a somewhat inconveninent input format and then do pathfinding. While I have to choose a single question when specifying a dupe, there's many reachability questions that cover similar ground

JavaScript (ES6), 81 bytes
s=>(a=[...s]).map(_=>a.map((m,i)=>p=i%2&r[s[i-1]]?r[m]=1:r[m]),r={},r[s[0]]=1)&&p

Explanation
Takes the states as a string and returns a 1 for true or undefined for false. This method was the shortest I could find, but it means that it's impossible to include the bonus because it just determines reachability, not the paths.
s=>
  (a=[...s])        // a = states as an array
  .map(_=>          // loop a number of times to ensure all states have been reached
    a.map((m,i)=>   // for each state m at index i
      p=            // p = the reachability of the final state
        i%2         // if this is the last state of a pair
        &r[s[i-1]]? // and the first state is reachable
          r[m]=1    // set the last state and p to reachable
          :r[m]     // else set p to the reachability of the state
    ),
    r={},           // map of truthy values for reachable states
    r[s[0]]=1       // set the initial state to reachable
  )
  &&p               // return the final result

Test

var solution = s=>(a=[...s]).map(_=>a.map((m,i)=>p=i%2&r[s[i-1]]?r[m]=1:r[m]),r={},r[s[0]]=1)&&p
<input type="text" id="input" value="ABACADCDBCDEBE" />
<button onclick="result.textContent=solution(input.value)">Go</button>

Nice one! I like the explanation. :)

@Askirkela Thanks. Nice first challenge, by the way! I enjoyed making this.


text:
Find the line guaranteed by Sylvester-Gallai
The Sylvester-Gallai theorem says: Suppose you have a finite list of points in the plane. Suppose further that not all of those points are collinear (lie in a single line). Then there is some line containing precisely two of the points. (That is, there's some line on which two of the points lie, but not more than two.)
You task is to find such a line. Note that more than one exists; you need to find one.
Input:
A bunch of points denoted by their Cartesian coordinates. You may assume the coordinates are nonnegative integers, if you like. The string (1,2),(0,4),(5,6) and the list 1, 2, 0, 4, 5, 6 and other formats are fine, and can be function parameters or read from STDIN or whatever.
If you prefer, allow also radical-root input (with positive-integer index). Then, each point will be represented by four numbers: the index and radicand of the abscissa, and the index and radicand of the ordinate. A rational number will be represented with index 1. Again, the input can be like ((1,2),(3,4)),((6,7),(8,9)),((2,3),(4,5)) or like 1, 2, 3, 4, 6, 7, 8, 9, 2, 3, 4, 5, or what-have-you. You may assume that the radicand is a nonnegative integer.
You may assume the points are distinct from one another and are not all collinear (and thus, in particular, that there are more than two points).
Output:
A line guaranteed by Sylvester-Gallai. This can be presented in any Cartesian-based form that completely specifies the line and allows people to visualize it. (I expect that answers will typically use either the line's slope and a point on it or two points on the line.)
Scoring:
This is a popularity contest. The answer with the greatest number of net votes after about a week will get the checkmark. Everyone can vote at will, obviously, but I, personally, will bear in mind at least these factors: ingenuity of the solution (including avoidance of the brute-force method), explanation of the code, ability to accept radical-root input, and simplicity of the code (in flop count / runtime).

Why a pop con for such a specific task? Having specific criteria as a voting guide is good, but I don't imagine there being much room for ingenuity for solutions.

@xnor, afaik there's no nice algorithm for generating such a line. So someone's gonna have to come up with something. If it's the obvious brute force, so be it. If it's not, well, that's better.

@msh2010 Yes, I was thinking the obvious brute force. You don't mention run-time as a criterion, and it's quite simple. If you don't want that, you should say so.

@xnor, better now, you think?

I find it weird to put not brute-forcing under ingenuity, since without giving a reason the brute force is bad, it feels like asking for creativity for the sake of creativity, which is broad. Regardless, beware that popularity contests are really disfavored by site culture now and have always been a grey area in the site rules for objectivity, so your question has a good chance of getting closed just as a pop-con. Someone should have mentioned this in the sanbox...

@xnor, probably shoulda, yeah... well, we'll see what happens.

Can we assume, when you say "all points are distinct from one another" that "all points are at least x distance from one another for some threshold x"? This would help with doing floating point arithmetic.

@quintopia, "You may assume the coordinates are nonnegative integers, if you like"

@PeterTaylor But what if you don't like? For instance if you want to do the radical roots version?

"afaik there's no nice algorithm for generating such a line" puzzles me, because you link to a Wikipedia page which links to a O(n lg n) algorithm.

@quintopia, even in the radical-roots version you can assume the radicands are integers. But yeah I suppose you can assume the points are some distance apart.

@PeterTaylor, right, when I wrote that comment I forgot that.

Python 2, not golfed
Sure, they say there's a worst case O(n*log(n)) algorithm, but who cares about the worst case? It's the average case we usually care about, and this simple random algorithm runs in expected linear time on arbitrary inputs!
(By comparison, the deterministic brute force algorithm can be fed carefully constructed inputs to force it to run in quadratic time at least.)
import random,math
def radical_to_normal(x,y): return (x[1]**(1./x[0]),y[1]**(1./y[0]))

def distance_to_line(p1,p2,p3):
 dx = p2[0] - p1[0]
 dy = p2[1] - p1[1]
 return abs(dy*p3[0] + dx*p3[1] + p2[0]*p1[1] - p2[1]*p1[0]) / math.sqrt(dy*dy + dx*dx)

points = input() #input as list of pairs
c = True
while c:
    c = False
    p1,p2 = random.sample(set(points), 2)
    for p3 in points:
        if distance_to_line(radical_to_normal(*p1), radical_to_normal(*p2), radical_to_normal(*p3)) < 0.00001:
            c = True
print p1,p2

Example run:
➤ python sylvester.py
[((1,0),(1,0)),((1,1),(1,0)),((1,2),(1,0)),((1,0),(1,1)),((1,1),(1,1)),((1,2),(1,1)),((1,0),(1,2)),((1,1),(1,2)),((1,2),(1,2))]
((1, 2), (1, 2)) ((1, 0), (1, 1))

How it works
It's been proved (Csima and Sawyer 1993) that roughly 6/13 of all lines in any set are ordinary (only involve 2 points from the set) except when n=7. As the number of points goes to infinity, the lower bound goes to 1/2 of the lines (Green and Tao 2013). Therefore, we expect to have to test around 2-3 pairs of points on average before finding an ordinary line if we sample pairs of points at random.
This simple program just selects a random pair of points, then checks the distance from the line they form to a third point, which ranges over all points in the set. All three points are converted from radical root form to floats by radical_to_normal() before the distance is calculated by distance_to_line(). If the distance is below a threshold (indicating they are collinear), we set a sentinel to try again. Until every point tested passes above the threshold, we try, try again. (This threshold could be made much smaller and still work, of course.)
Since we test an expected constant number of point pairs, and we test n points for each pair, the algorithm runs in expected time O(n).

I must not have been very good at Python when I wrote this, because it is stupid to use a sentinel on a while loop here. A cleaner, faster solution would be to use while True:, put a break in the inner loop condition, and another break in an else clause on the for loop to leave the while loop cleanly. Python learners take note.

Mathematica, 73 bytes
Cases[#~Subsets~{2},p_/;InfiniteLine@p~RegionMember~#~Count~True==2,1,1]&

Test Case:
%[{{0,0},{1,1},{3,2},{3,3},{6,4},{4,5}}]
(* {{{0,0},{4,5}}} *)

Explanations:
#~Subsets~{2} gives all pairs of points; InfiniteLine@p~RegionMember~#~Count~True==2 tests whether there are exactly two points intersect the infinite line given by a pair of points p; Cases[..., ..., 1, 1] gives the first pair of points that meet the condition.
Mathematica naturally accepts numbers like 3/5, Pi, Sqrt[2], etc, and gives accurate results as long as the inputs are accurate.