text:
Compose two Brainfuck programs
Given 2 brainfuck code snippets A and B, output some brainfuck code C which has the same behavior as running B with the input of As result. Note that C must work for any input that match the following assumptions, as if it were given to A.
You can assume:

Finite input.
both A and B halt.
EOF is consistently 0 or consistently -1.
Consistently allow or disallow cells to left
Unbounded tape (otherwise the requirement may be impossible)
Consistently 8-bit wrapping or unbounded integer
No stream(input or output for A or B) contain the byte representing EOF
Code A and B can contain characters that possibly appear in your C, and +-[]<>,.

E.g. (EOF=0)
A = ,[..,]
B = ,[...,]
C = ,[......,]

A = >,[>,]<[.<]
B = ,[...,]
C = >>>>,[[-<+<+<+>>>]>>>,]<<<<[.<]

A = >,[>,]<[.<]
B = ,[...,]
C = >,[>,]<[...<]

A = ,.
B = ,.
C = ,>,[,]<.

A = ,.
B = ,.
C = ,.

are valid tests
Shortest code in each language win. Winner in Brainfuck will be accepted.

Shortest code in each language win and Shortest Brainfuck solution will be accepted are two different winning criteria.

@Mego I meant if you answer in brainfuck and you win, you're accepted

Can you explain what "Winner in Brainfuck will be accepted." is supposed to mean?

The composer must output brainfuck code?
The composer code length doesn't matter, but the shortest brainfuck code wins?
If the composer is written in brainfuck, it wins?

@Dorian Your submission is written in BF and you win. (option 3)

Some of the tests doesn't make sense. How can #3 ,. with ,. become eqvivalent with ,>,[,]<.. The composition will only read once, but your result reads more.

@dzaima What I mean is if you compose ,. and ,. you get ,. not ,>,[,]<. since that reads more than once and ends up printing the second input. It isn't a second input since ,. does only read ONCE. You even see that in the #4 example which is the exact same two programs with correct outcome

@dzaima ,>,[,]<. with one byte input prints whatever EOF is. That is different than the composition of ,. and ,. which only prints the first initial input once and perhaps ignore all other input if any.

Also. can you elaborate on 4.Consistently allow or disallow cells to left. The leading answer requires cells on left in the answer to work but disallow A, B, and C to not move passed the first byte. My answer diallows move to left in answer, A, B, and C.  If the rules for my program and C can be different from A, and B then i surely can shorten my answer a lot.

@Sylwester no it doesn't? The middle >,[,]< is guaranteed to always finish as input is finite (assuming an interpreter where EOF == 0) and it doesn't move the pointer and doesn't output so it's a noop

@dzaima Ah. I see it now. Thanks for your patience. Could you please answer about the 4th rule?

The entire problem statement is about A, B, and C, and only the last two sentences make any reference to the language of the answer. Perhaps the author did intend for the answer to be in the same flavor as A, B, and C, but that would not be my fault. Solvers should not be punished for problem authors' lack of foresight. At any rate it is really trivial to add a few >s to the beginning of my answer to make it comply with a more restrictive flavor (but for golf, we should also consider alternatives). Also, it seems clear to me that A, B, and C must be in the same flavor as each other.

Also @dzaima "invalid" in your comment seems slightly misleading to me -- we are not talking about validity in the usual sense (whereby invalid answers should be fixed or deleted), but merely of eligibility for acceptance (and I'm not a fan of accepting answers on this site, but if such a criterion for acceptance had been clearly specified then I would have answered accordingly, because why not). If my point on validity seems unclear, consider a correct answer in e.g. self-modifying brainfuck, which would be clearly valid but not eligible.

@dzaima If you really do mean "invalid" in the usual sense, that would be equivalent to the author specifying "You may answer in any language this site allows, except for flavors of brainfuck that differ from the flavor you chose for A, B, and C.", which seems rather elaborate to me... (And I feel slightly dirty even addressing this whole issue, since it is so trivial and has nothing to do with golf or problem solving.)

Maybe I'm completely misunderstanding the challenge, but test cases #3 and #4 seem to clash.

brainfuck, 526 bytes
-<+++++<+<+++++<-[+++++++[<++++++++>-]<--->>]<<--<--<+..<<<<,[[<+>>+<-]----[>-<-
---]>[+[++[++++++++++++++[++[[-]<]<<<[>-->>>-.>>>.<<<.>.>.<<.+>>--..>.<..<.>.>..
<++.<.>..>.<..<.>--.>>.<<.>.<..<.>.>.<.<.>++.<<.>.>.>.<.<.>..>.<..<.>>>.<<--.++<
<<]>>>>[<]<]>[<<<<[>]>[+>>>>>.>.<<<.>.<.>>>.<.[.<.>>>]<++[<<.<.>>.<<--.<<.>.>.++
>>>-]<<<<.>.>>.<.<<<.>>..>>.<<<.>--.>.<++...<<.>>--..>>.<.<..<.>.>>.<<++...>.<..
<.>>>.<<--...++<<[.>]<<<--.<<.>>++.<.>>>.<<--.++<<<]]<]>[<<<.>>]<]>[>>.>.<<<.>.>
>>.[<]]<]>[>>.>.<..<.>>>.[<]<<<+>->>]<<.[-]>,]

Formatted:
-<+++++<+<+++++<-[+++++++[<++++++++>-]<--->>]
<<--<--<+..<<<<
,
[
  [<+> >+<-]
  ----[>-<----]>
  [
    not question mark
    +
    [
      not greater than
      ++
      [
        not less than
        ++++++++++++++
        [
          not period
          ++
          [
            not comma
            [-]<
          ]
          <<<
          [
            comma B
            >-->>> -.>>>.<<<.>.>.<<.+>>--..>.<..<.>.>..<++.<.>..>.<..<.>--.>>.<<
            .>.<..<.>.>.<.<.>++.<<.>.>.>.<.<.>..>.<..<.>>>.<<--.++<<<
          ]
          >>>>[<]<
        ]
        >
        [
          period
          <<<<
          [
            B
            >
          ]
          >
          [
            A
            +>>> >>.>.<<<.>.<.>>>.<.[.<.>>>]<++[<<.<.>>.<<--.<<.>.>.++>>>-]<<<<.
            >.>>.<.<<<.>>..>>.<<<.>--.>.<++...<<.>>--..>>.<.<..<.>.>>.<<++...>.<
            ..<.>>>.<<--...++<<[.>]<<<--.<<.>>++.<.>>>.<<--.++<<<
          ]
        ]
        <
      ]
      >
      [
        less than
        <<<.>>
      ]
      <
    ]
    >
    [
      greater than
      >>.>.<<<.>.>>>.[<]
    ]
    <
  ]
  >
  [
    question mark
    >>.>.<..<.>>>.[<]
    <<<+>->>
  ]
  <<.[-]>,
]

With respect to A, B, and C: EOF = 0, cells left of start disallowed, 8-bit wrapping cells.
Expects A followed by ? followed by B.
Try it online
(This answer can be made compliant with a brainfuck interpreter that doesn't allow going left of the start at the cost of one byte by transliterating y/<>/></ and prepending a >.)
The basic idea is to use a series of string replacements in order to simulate the tapes of A and B using 2-cell nodes, with special attention given to replacing . in A and , in B so that the intermediate data stream is kept in a block of cells to the left of the simulated tape. The string replacement scheme is:

Insert >> before A
In both A and B, replace > with >[-]+> and < with <<
In A, replace . with >[-]-[>>]+[[>+<-]<[>+<-]<]>+[->>+]<[>>>-<<+[<<]<+>>>[>>]+<<<-]>[+<->]+</
Insert >[>>]+> after A and before B
In B, replace , with ,[,]>,<<[<<]<[[>]>>[>>]<+<[<<]<[<]>-]>[>]>>[>>]+<*

,[>,]<[.<]?,[...,] input 12345 returns 111, even with enough > before?

@l4m2 Hmm, it's working for me on TIO. (,[>,]<[.<] is not valid but >,[>,]<[.<] is.)

So what's your "it allows going to the left of the start cell"?

The program that takes A and B as input and produces C. See the first three bytes.

So your answer needs a BF that starts in the middle of an infinite tape, but the nature of A and B is limited to the standard where one starts at first cell on an infinite tape to the right?

For this solution, going to the left of the start cell is disallowed in A, B, and C, but it is allowed in the program (we may call it D for convenience) that takes A and B and then produces C. I don't think this is very remarkable, and is a natural choice given the nature of the solution. Going to the left of start has major consequences in the context of A, B, and C, but it is quite trivial for D, and subjectively makes for a more enjoyable golf experience as well as a slightly shorter score, and also should not make testing any more tedious, as it is easy to prepend >s to D as needed.

brainfuck, 1287 bytes
++++++++++++++++[->+++>+++>++++>++++>++++++>++++++<<<<<<]>----->--->---->-->----->--->+<<<.....<<.>>....<<.>>.<<..>...>>>>[>+>,->[-]++++[-<-------->]+<[>>]>[<<-<-<<<..>.<.....>>.<<<.....>>.<<<<.>>..>>.<<<.>>>>.<<<...>>>.<<.<<<..>>>>.<<<..>>.....<<<..>>>>>.<<<<<.>>>>.<<<.>.....<<.>>>>>.<<<<.>>..>>>>>>>>]<<<-------------[>>]>[<<-<<<<..<<.>..>>.<<<.>.<<.>>>....<<<.>>>>.<<<.>.....<<.>>>>>.<<<<<.>>>>.<<<..>>.....<<<..>>>>>.<<<<..>..<<.>>>..<<<.>>>>.<<<.>.....<<.>>>>>.<<<<.>.<<..>>>>.<<<..>>.....<<<..>>>>>.<<<<..>..>>>.<<<.>>.<<<.>>.<<<.>>.>>>.<<....<<<.>>>>.<<<.>.....<<.>>>>>.<<<<<.>>>>.<<<..>>.....<<<..>>>>>.<<.....<<.>>>.<<<.>.....<<.>>>>>.<<<<.>.<<..>>>>.<<<..>>.....<<<..>>>>>.<<<<.>..>>>>>>>>>]<<<--------------[>>]>[<<-<<<<<...>>.<<<<.>>>>>.<<<<.>..>>>>>>>>>]<<<--[>>]>[<<-<<<<.......>.<<<<.>>>>>.<<<<.>..>>>>>>>>>]<<<<[+++++++[->++++++++<]>--.<]<]>>,[<+>>++++[-<--------->]+<+[>>]>[<<-<<<.<<<.>>>>.<<..<<.>>.>.<.....>>.<<<<<.>>>>.<<<.>.....<<.>>>>>.<<<<.>>...>.<<<.>...>>.<<.....>>>.<<....<<<.>>>>.<<<.>>.....<<<.>>>>>.<<<<.>..<<.>>>...>.<.....>>.<<<<<.>>>>.<<<.>.....<<.>>>>>.<<<<.>>...>>.<<..<<.>>>.<<.....>>>.<<....<<<.>>>>.<<<.>>.....<<<.>>>>>.<<<..>>>>>>>>>]<<<----------------[>>]>[<<-<<<<<.....>>>>>>>>>]<<<--[>>]>[<<-<<<<.....>>>>>>>>]<<<<[+++++++[->++++++++<]>--.<]>,]

Try it online!
Here it is! The brainfuck code that composes two brainfuck codes. Use a "!" to separate the two input code snippets. For example snippet A: >,[>,]<[.<], snippet B: ,[...,]. Input for my program: >,[>,]<[.<]!,[...,]. It will not terminate if no "!" is found.
This does essentially the same as my VBA Version. The code that is generated is the same as in the VBA version (note that the examples in the VBA post were made before the latest change in the brainfuck snippets).
Explanation
This is my source code:
[
Tape: "+"(43) "-"(45) "<"(60) ">"(62) "["(91) "]"(93) readA(1) printInput(0) input else exitIf exitElse
]

++++ ++++ ++++ ++++ [->+++>+++>++++>++++>++++++>++++++<<<<<<]>----->--->---->-->----->--->+

<<<.....<<.>>....<<.>>.<<..>... print init routine
>>>>[                           while readA
  >+                              set printInput = true
  >,                              read character
  ->[-]++++[-<-------->]          decrease input by 33 to check for "!"
  +                               set else flag

  # A check for "!"
  <[                              if input not "!"
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <-                              set readA = false
    <<<..>.<.....>>.<<<.....>>.<<<< print routine between A and B
    .>>..>>.<<<.>>>>.<<<...>>>.<<.<
    <<..>>>>.<<<..>>.....<<<..>>>>>
    .<<<<<.>>>>.<<<.>.....<<.>>>>>.
    <<<<.>>..>>>
    >>>>>                           go to exitElse
  ]

  # A check for "dot"
  <<<----- ----- ---              decrease input by 13 (total 46) to check for dot
  [                               if input not dot
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<<..<<.>..>>.<<<.>.<<.>>>.... print list storing routine
    <<<.>>>>.<<<.>.....<<.>>>>>.<<<
    <<.>>>>.<<<..>>.....<<<..>>>>>.
    <<<<..>..<<.>>>..<<<.>>>>.<<<.>
    .....<<.>>>>>.<<<<.>.<<..>>>>.<
    <<..>>.....<<<..>>>>>.<<<<..>..
    >>>.<<<.>>.<<<.>>.<<<.>>.>>>.<<
    ....<<<.>>>>.<<<.>.....<<.>>>>>
    .<<<<<.>>>>.<<<..>>.....<<<..>>
    >>>.<<.....<<.>>>.<<<.>.....<<.
    >>>>>.<<<<.>.<<..>>>>.<<<..>>..
    ...<<<..>>>>>.<<<<.>..>>>>>
    >>>>                            go to exitElse
  ]

  # A check for "less than"
  <<<----- ----- ----             decrease input by 14 (total 60) to check for "less than"
  [                               if input not "less than"
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<<<...>>.<<<<.>>>>>.<<<<.>..>>>>> print A move left routine
    >>>>                            go to exitElse
  ]

  # A check for "greater than"
  <<<--                           decrease input by 2 (total 62) to check for "greater than"
  [                               if input not "greater than"
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<<.......>.<<<<.>>>>>.<<<<.>..>>>>> print A move right routine
    >>>>                            go to exitElse
  ]

  # print remaining character
  <<<<[                           if printInput
    +++++++[->++++++++<]>--.<     print original character
  ]

<                               go to readA
]

>>,                             read next character
[                               while input
  <+                              set printInput = true

  # B check for comma
  >>++++[-<----- ---->]+<+        decrement input by 44 to check for comma
  [                               if input not comma
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<.<<<.>>>>.<<..<<.>>.>.<..... print B list reading routine
    >>.<<<<<.>>>>.<<<.>.....<<.>>>>
    >.<<<<.>>...>.<<<.>...>>.<<....
    .>>>.<<....<<<.>>>>.<<<.>>.....
    <<<.>>>>>.<<<<.>..<<.>>>...>.<.
    ....>>.<<<<<.>>>>.<<<.>.....<<.
    >>>>>.<<<<.>>...>>.<<..<<.>>>.<
    <.....>>>.<<....<<<.>>>>.<<<.>>
    .....<<<.>>>>>.<<<..>>>>>
    >>>>                            go to exitElse
  ]

  # B check for "less than"
  <<<----- ----- ----- -          decrease input by 16 (total 60) to check for "less than"
  [                               if input not "less than"
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<<<.....>>>>>                 print B move left routine
    >>>>                            go to exitElse
  ]

  # B check for "greater than"
  <<<--                           decrease input by 2 (total 62) to check for "greater than"
  [                               if input not "greater than"
    >>                              go to exitIf
  ]
  >[                              else
    <<-                             set printInput = false
    <<<<.....>>>>                   print B move right routine
    >>>>                            go to exitElse
  ]

  # print remaining character
  <<<<[                           if printInput
    +++++++[->++++++++<]>--.<     print original character
  ]

>,                              input next character
]

Why no output?

@l4m2: Sorry, I made a little mistake in the test data. I wrote >[,>]<[.<]!,[...,], so snippet A doesn't output anything. Of course it must be >,[>,]<[.<]!,[...,] for a working example.

VBA, 512 489 479 bytes
Sub f(A,B):Debug.?">>>>>->>>>->--<<<"&Replace(Replace(Replace(A,"<","<<<[+]-<<"),">",">>>>>>>[+]-<<"),".",">>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<")&">>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>"&Replace(Replace(Replace(B,"<","<<<<<"),">",">>>>>"),",","[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<"):End Sub

Explanation
The VBA code changes the brainfuck code in a way, that the output of snippet A will be stored in a list and the input of snippet B will be read from that list.
It first initializes some variables
>>>>>->>>>->--<<<

Then it reads snippet A and replaces every < by <<<[+]-<<, every > by >>>>>>>[+]-<< and every . by the storing routine
>>>>>>>[+]-<<"),".",">>->+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]--<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>+<<

after that it deletes the memory of snippet A and makes changes to the stored list, so it can be read as input for snippet B:
>>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>>>>-<<<

Then snippet B will be read, every < will be replaced by <<<<<, every > will be replaced by >>>>> and every , will be replaced by the list reading routine:
[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<

Brainfuck source code
This is my source for the brainfuck portions of the code. I will explain that in detail later.
[
Tape: tempMem data out/in dataAnchors outAnchors (all repeating)
dataAnchors of Snippet A: -1 = memory has been used, -2 = active memory cell for copying to out/in
dataAnchors of Snippet B: -1 = active memory cell for copying from out/in
outAnchors of Snippet A: -1 = start of list, -2 = next output position
outAnchors of Snippet B: -1 = character has been read (or start of input)
]

### Init
>>              two blank data cells (for non wrapping pointer)
>>>-            set start of input
>> >>-          set first "used" flag
>--             set end of input
<<<             return to first usable data cell

### A move right routine
>>>>>           move to the next data cell
>>[+]-          clear and set "used" flag
<<              return to data cell

### A move left routine
<<<[+]-         clear and set "used" flag of previous data cell
<<              go to data cell

### A print routine
>>-             set flag
<<[             while value greater 0
  -               decrement value
  <+              increment tempMem
  >>>>+[-<<<<<+]  find start of input
  +[-->>>>>++]--  find end of input
  <<+             increment input
  >>+[-<<<<<+]-   find start of input
  <++[-->>>>>++]--find flag
  <<              go to active data cell
]
<[->+<]         move stored value back to data
>>>>+[-<<<<<+]  find start of input
+[-->>>>>++]    find end of input
>>>>>-          set new end of input
[-<<<<<+]-      return to start of input
<++[-->>>>>++]- return to and delete data flag
<<              go to data cell

### After snippet A: Delete memory of A and configure out/in list
>>[>>>>>]<<<<< go to last used data
[+<<[-]<<<]    delete each data
>++[-->>>>>++] find and delete end of input flag
+[-<<<<<+]-    go to start of input
>>             go to first data cell

### B move right routine
>>>>>          go to next data cell

### B move left routine
<<<<<          go to previous data cell

### B reading routine
[-]                      set cell = 0
>>-                      set flag
>[>>>>>]+[-<<<<<+]-      find start of input
>>>[                     if value greater 0
  -                        decrement value
  <<<[<<<<<]>>>>           go to initial start of input (combined with next)
  +[->>>>>+]-              find mem cell flag
  <<+                      increment mem cell
  >>>[>>>>>]+[-<<<<<+]->>> return to input cell
]
>>-                      set new start of input
[<<<<<]>>>>              go to initial start of input (combined with next)
+[->>>>>+]               find and delete mem cell flag
<<                       go to mem cell

Output for test case 1: f ",[..,]",",[...,]"
>>>>>->>>>->--<<<,[>>->+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]--<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>+<<>>->+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]--<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>+<<,]>>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>>>>-<<<[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<[...[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<]

Try it online!
Output for test case 2: f ">,[>,]<[.<]",",[...,]"
>>>>>->>>>->--<<<>>>>>>>[+]-<<,[>>>>>>>[+]-<<,]<<<[+]-<<[>>->+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]--<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>+<<<<<[+]-<<]>>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>>>>-<<<[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<[...[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<]

Try it online!
Output for test case 3: f ",.",",."
>>>>>->>>>->--<<<,>>->+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]--<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>+<<>>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>>>>-<<<[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<.

Try it online!
Complex test case:
Snippet A: Build alphabet triangle >+++++[<+++++>-]<+[>>[>[.>]]>++++++++++.--[<++++++++>-]<[+.<]<-]>>,>[.>]++++++++++.[<[.<]>,>[.>]<] Try it online!
Snippet B: Sort input in ascending order >>,[>>,]<<[[-<+<]>[>[>>]<[.[-]<[[>>+<<-]<]>>]>]<<] Try it online!
Result:
>>>>>->>>>->--<<<>>>>>>>[+]-<<+++++[<<<[+]-<<+++++>>>>>>>[+]-<<-]<<<[+]-<<+[>>>>>>>[+]-<<>>>>>>>[+]-<<[>>>>>>>[+]-<<[>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<>>>>>>>[+]-<<]]>>>>>>>[+]-<<++++++++++>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<--[<<<[+]-<<++++++++>>>>>>>[+]-<<-]<<<[+]-<<[+>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<<<<[+]-<<]<<<[+]-<<-]>>>>>>>[+]-<<>>>>>>>[+]-<<,>>>>>>>[+]-<<[>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<>>>>>>>[+]-<<]++++++++++>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<[<<<[+]-<<[>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<<<<[+]-<<]>>>>>>>[+]-<<,>>>>>>>[+]-<<[>>-<<[-<+>>>>+[-<<<<<+]+[-->>>>>++]--<<+>>+[-<<<<<+]-<++[-->>>>>++]--<<]<[->+<]>>>>+[-<<<<<+]+[-->>>>>++]>>>>>-[-<<<<<+]-<++[-->>>>>++]-<<>>>>>>>[+]-<<]<<<[+]-<<]>>[>>>>>]<<<<<[+<<[-]<<<]>++[-->>>>>++]+[-<<<<<+]->>>>>>>>>>>>[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<[>>>>>>>>>>[-]>>->[>>>>>]+[-<<<<<+]->>>[-<<<[<<<<<]>>>>+[->>>>>+]-<<+>>>[>>>>>]+[-<<<<<+]->>>]>>-[<<<<<]>>>>+[->>>>>+]<<]<<<<<<<<<<[[-<<<<<+<<<<<]>>>>>[>>>>>[>>>>>>>>>>]<<<<<[.[-]<<<<<[[>>>>>>>>>>+<<<<<<<<<<-]<<<<<]>>>>>>>>>>]>>>>>]<<<<<<<<<<]

Try it online!

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

Try it online!
To split A from B I opted for /.
Explaination:
The actual code that generates this is just a read-loop with a flag for A/B and a switch that reduces the input to look for >, <, /, ,, and . and otherwise just output the input. It is actually just a transpiler where the transpiled code lives within a data structure such that it don't interfere with the stored data from A or each other. The / just moves the active cell to the first unused cell. I originally cleaned it up, but that makes the program and output larger.
The program result has the following memory model:
|0|input*|cz|d0|c0|d2|c0|...

The c is crumble. cz is always 0 It points out where in my emulated BF data the pointer is. The active value is -1 while all visited cells will have 1. In operations like aprint and bread some c get special meaning.
A-code print skips all cells 1 byte to leave room for one more byte input which is copies with a backup in the next bytes crumble to copy back.
B-code read fetches input from input. Here being destructive is ok and when you "read" the last byte you get 0 as EOF regardless of the implementation.
I started out as Extended BrainFuck code making EBF result. Most of the debugging was done on the result files and then updates to the source that generated it. Then i just run the operations independent to get BF output, but I noticed Dorian's answer, which beat me in length so I continued golfing EBF source for smaller BF output. The original source is quite readable and simple compared to other stuff I've done with it:
:bck
:i
:t
:z
:r
:rc
:rz

;;; outputs a header with most of the result logic
{cinit
  |"
    ;; memory model of the result
    ML/i/z/d/c
    PTR=1/1/2
    :iz:i:z:d:c:d2:c2

    ;; moves pointer back. Bad things will happen to
    ;; A output if out of bounds
    {backward @d2 $c2++ $c-- $d
    }

    ;; moves pointer forward
    {forward $c++ $c2[-]- $d2 @d
    }

    ;; stores the current cell in input a the start of bf data
    {aprint
      $c2(-)+                 ; mark next cell as used even if it maybe
      $c[$c2]                 ; go to the end of used data
      $c((->+)$d(->+)@d2)     ; as long as c is something move d and c one place right
      @i$c+[->>+]@c           ; go to active cell, zero it
      $d(-                    ; copy:
        $c2+                  ; backup in c2
        $z[<<]@z              ; back to i
        $i+ $c[>>]@c          ; increement and back to zero carry
      )
      $c2-(- $d+)+            ; copy backup in c2 back to d
      $c-                     ; mark active cell
      $d                      ; move to d
    }

    ;; removes all the data from A. And initializes for B
    {aend
      $c[$c2]
      $c((-)<(-)<@c)@z
      $c-$d
    }

    ;; instead of read b fetched from input area
    {bread
      (-)>+@c2          ; clear d and c
      $c[$z]            ; go to z
      $i<[<] @iz        ; go to iz
      $i(-$iz+)         ; switch places between i and iz
      $iz(-             ; copy from iz to d
         $z[>]@z        ; move to z
         $c[$c2]        ; move to the current c
         $d2+           ; increase d
         $c[$z]         ; back to z
         $i[$iz]        ; back to iz
         @i             ; but since we shave switched correct
      )
      $z[>]@z           ; go back to z
      $c[$c2]-          ; move to active cell and make it -1
      $d2 @d            ; go to d
    }

    $c-$d               ; init. Go to c t mark it active, then go to d
    "
  (-)
}

{cmain
  &cinit
  $t,(
    (-$i+$bck+) ; pour to i and bck

    ;; switch ( $i ) cases '<>,./' using $t
    $t+++++++(-$i------)+$i--; ,
    ($i--; .
      ($i-; /
        ($i-------------; <
          ($i--; >
            ((-) $t(-)  $bck.)
              $t (- |"&forward "(-) )
          ) $t (- |"&backward "(-) )
        ) $t (- |"&aend "(-) $r+ )
      ) $t (- $rc+$r[$rc-$bck.$rc]@r$rc[- |"&aprint "(-) $rz])
    ) $t (- $rc+$r[$rc-|"&bread "(-)]@r$rc[-$bck.$rz])
    $bck (-) ; clear backup
      $t,    ; read into t
  )
}

&cmain

If I've understood properly, [->+] in program C causes failure for inputs like ->->,./,., and this could be fixed using [->>+] (making sure the pointer starts on a cell with the desired parity). For [-<+], I think you can change the navigation scheme to rely on all of A's output being nonzero?

I'm not sure what you mean. When A is ->->,. and B is ,., does your preferred interpreter produce the same C as TIO, and does C work as expected on your interpreter? Because it fails on TIO. (I wrote this in response to a comment that is now deleted.)

@MitchSchwartz Thanks for your comment. I was a little cocky since I didn't expect to scan for -1 though user data, but indeed I did on the line "go to active cell, zero it". I've updated my answer and then I added a byte :-O but at least it works. BTW. If Im not using scan for -1 to when fetching input in B i will have to move the active byte with a copy >[-<+]< and thus I add more chars than i save by replacing +[-<+]- with [<]. If you don't copy you will not be able to know if the byte you compied was finished and copy all bytes.

Well my mention of [-<+] was actually also in regard to eliminating bugs (as opposed to saving bytes), for input such as -./,>++++++[<++++++>-]<., which should print # rather than %. :) But I do see some opportunities to save bytes as well. Good luck! I will try to optimise my doubly infinite tape solution, although seeing what you did makes me think maybe right-infinite tape is golfier in the end.

So, after examining your code more closely, I found that our setups are very similar, and that your use of a right-infinite tape is far better for golf than my doubly infinite tape. Please see my recent sed update for a solution that combines our ideas. I feel that golfing C is the most interesting part of this problem, but there is also some room to make the string replacement program shorter outside of that...

Wow, this is really great. I try to golf my version a little bit, but i don't think I can beat you. I even tried this with my Game of Life Beta and a pattern preselector. The resulting code is too long for tio.run, but works fine on the offline Interpreter of The Lost Kingdom. Enter a number between 1 and 8. Try it online!

(I found a test that doesn't work. -./,. Since tio.run uses 8-bit wrapping data cells, A should print ÿ and B should just read and print it, but it doesn't print anything test. Well this is a special case, I think it can be ignored.)

@Dorian I've updated by answer. I got a little longer but -./, should work now. Mitch check -./,>++++++[<++++++>-]<. is easier to check though :) Btw. I use my own bf interpeter and the same GoL code on that runs in 0.08 real         0.05 user         0.01 sys but I fear the composition will be crazy slow since this is not optimized for speed :)

sed, 165 bytes
s > >[-]+> g
s < << g
1s \. >[-]-R+[[>+<-]<[>+<-]<]>+[->>+]<[>+>>-<L+>R+<<<-]>[<+>-]+< g
1s .* R&<R+>
2s , ,[,]>,<L[[>]R<+L[<]>-]>[>]R+< g
s L <[<<]< g
s R >>[>>] g

For flavors with EOF = 0, cells left of start disallowed, 8-bit wrapping cells.
Expects program A on the first line and B on the second line.
Try it online
This uses 2-cell nodes to simulate the tapes of A and B, with A's output occupying contiguous cells to the left of the leftmost node.
Alternative 173-byte solution:
1i>>
s > >[-]+> g
s < << g
1s \. >[-]-[>>]+[[>+<-]<[>+<-]<]>+[->>+]<[>>>-<<+[<<]<+>>>[>>]+<<<-]>[<+>-]+< g
1a>[>>]+>
2s , ,[,]>,<<[<<]<[[>]>>[>>]<+<[<<]<[<]>-]>[>]>>[>>]+< g

Try it online
Originally my design was based on a doubly infinite tape, which required significantly more work to move left (moving data when passing beyond the leftmost cell previously encountered) and to transition from A to B (clearing the data instead of just traveling past the rightmost cell previously encountered).
Thanks to Sylwester and Dorian for tricks and ideas.

This looks great. Unfortunately it fails on the first test. Program A ,[..,] and program B ,[...,].

Oh, this is a silly oversight on my part, I hurried too much. It is fixable but I should delete it for now.

@Dorian It should be fixed now. (I'll keep looking it over.) Thanks for pointing out the mistake, and sorry for the inconvenience.

I'm aware that some bytes can be saved by e.g. having s/x/>>/g at the very end, but I'm more interested in improvements that will shorten the output for now.


text:
Sort odd numbers first
Rearrange a given list such that all the odd numbers appear before all the even numbers. Besides for this requirement, the output list may be in any order.
The input will only contain integers, but they may be negative and there may be duplicates, and they may appear in any order.
Shortest solution wins.
Test cases
[1,2] → [1,2]
[2,1] → [1,2]
[1,0,0] → [1,0,0]
[0,0,-1] → [-1,0,0]
[3,4,3] → [3,3,4]
[-4,3,3] → [3,3,-4]
[2,2,2,3] → [3,2,2,2]
[3,2,2,2,1,2] → [1,3,2,2,2,2] or [3,1,2,2,2,2]
[-2,-2,-2,-1,-2,-3] → [-1,-3,-2,-2,-2,-2,] or [-3,-1,-2,-2,-2,-2,]
[] → []

Ty. Good question. Answer: odd numbers can come in any order. :)

this is somewhat similar

Can there be any negative numbers in the input?

Integers expected.

Even though the challenge is quite simple, adding some test cases would be nice. E.g. at first glance I thought the block of odd and even numbers also needs to be sorted.

@Laikoni I agree.

for test cases I'd suggest [1,2], [2,1], [1,0,0], [0,0,-1], [3,4,3], [-4,3,3], [2,2,2,3], [3,2,2,2,1,2] (with both possible outputs) and [-2,-2,-2,-1,-2,-3] (again giving both outputs).

You may also want to add some edge cases: [], [3,1,3], and [2,8,8]

Nice first challenge!

@dylnan, given that the majority of the solutions to that challenge use this sorting method, I'd lean towards this being a dupe, but I won't VTC as my vote is a hammer.

Will there be repeated numbers in the array?

@AsoneTuhid Yes:), numbers can repeat.

@Willmore what about negatives?

@AsoneTuhid Negatives allowed since integers include negatives.

@Willmore You never know with code golf, rules are important. Please use the Sandbox next time to clarify your question before you post it.

Please edit your question to include the clarifications you gave in the comments.

05AB1E, 2 bytes
ΣÉ

Try it online!

Pyth, 4 3 bytes
-1 byte thanks to isaacg
iD2

Try it online!
crossed out 4 is still regular 4

Nice, I had oiI2.

How about iD2?

Alternate 3 byte solution: oi2

C++, 79 76 64 bytes
[](auto a,auto b){while(a<--b)*a%2?*++a:(*a^=*b,*b^=*a,*a^=*b);}

This function accepts a pair of iterators (which must be random access iterators), and steadily moves them towards each other.  When a points to an odd number, it is advanced.  Otherwise, a points to an even number; b is decremented, and iter_swap'ed with a.  (We use XOR swap, which saves us having to include <algorithm> - or <utility> for std::swap).
There are unnecessary swaps when b points to an even number, but we're golfing, not squeezing efficiency!
Demo
auto f=[](auto a,auto b){while(a<--b)*a%2?*++a:(*a^=*b,*b^=*a,*a^=*b);};

#include <array>
#include <iostream>
int main()
{
    auto a = std::array{ 3,2,2,5,2,1,2 };

    f(a.begin(),a.end());

    for (auto i: a)
        std::cout << i << " ";
    std::cout << std::endl;
}

Non-competitive answer
The natural C++ method is std::partition, but that comes out at 83 bytes:
#include<algorithm>
[](auto a,auto b){std::partition(a,b,[](auto x){return x&1;});}

I believe that's 80 bytes, since you need a newline after the #include directive. My math sucks though^^. You can replace != with -, saving 1 byte. I like your approach, it's clever!

otherwise the iterators could pass each other without ever becoming equal.  If you're using RandomAccessIterator, you can use while(a<b) if that's more convenient than a!=b using a @O.O.Balance's a-b version.

You can shorten the 83-byte answer a bit by replacing algorithm with regex: https://codegolf.stackexchange.com/a/150895

R, 30 24 bytes
(x=scan())[order(!x%%2)]

Try it online!
-6 bytes thanks to JayCe

Nice! you can do 26 bytes

24 for full program

@JayCe facepalm golfing at 3am with a new baby is not optimal. Thanks!

Congrats! A future Scratch golfer ?

This gives you a 25 bytes answer to this linked question

@JayCe haha, maybe!! I started on Terrapin Logo, so we'll see what newfangled teaching language has been developed by the time she can program!

My congrats also Giuseppe, as our Dr said to us, well done you have an expensive one :)

J, 5 bytes
\:2&|

Try it online!
\: sort descending by
2&| mod-2

Nice to see you coming over to the dark side...

@Jonah I had a weak moment.

Japt, 2 bytes
ñv

Try it online!

Perl 6, 12 bytes
*.sort(*%%2)

Try it online!
Some Whatever code that sorts the input by parity, with odd numbers first. You can remove a % to get even numbers first instead. Note that 'Whatever' is the name of this sort of anonymous function.

Haskell, 23 22 bytes
f odd<>f even
f=filter

Try it online! This is equivalent to
g x = filter odd x ++ filter even x

-1 byte thanks to Lynn

Other approaches:
(<>).($odd)<*>($even)$filter
import Data.List;sortOn even
g x=[i|m<-[0,1],i<-x,odd$m+i]
g x=[i|m<-[1,0],i<-x,mod i 2==m]
g x=id=<<filter<$>[odd,even]<*>[x]

But doesn't this need import Data.Semigroup?

@AlexJ136 As of GHC 8.4.1, (<>) is part of Prelude. As TIO still runs an older version, the import is needed there. But you're right, I should have mentioned this directly.

k odd<>k even;k=filter saves a byte.

MATL, 6 bytes
tog&)v

Try it on MATL Online
Alternately:
to_2$S

Try it on MATL Online

Python 2, 37 36 bytes
lambda a:sorted(a,key=lambda x:~x%2)

Try it online!
1 byte tip o' the hat to Mr. Xcoder.

~ should work instead of 1-.

@Mr. Xcoder: indeed, it does!

JavaScript (Node.js), 29 bytes
a=>a.sort((a,b)=>(b&1)-(a&1))

Try it online! Save 4 bytes by only supporting positive values using b%2-a%2. If you write this as:
function(a){return a.sort((a,b)=>(b&1)-(a&1))}

then it will work on all sorts of old JavaScript implementations that didn't sort stably.

Doesn't a=>a.sort((a,b)=>b&1-a&1) work ?

@AlexisFacques No, that parses as b&(1-a)&1.

a=>a.sort(a=>++a&1) is shorter :)

@Max It might work on the given test cases but I wouldn't be surprised if someone found an example where it doesn't work.

Ah, my appologies! Let me re-write it: a=>a.sort(a=>++a&1-.5). This always returns a negative or a positive -- depending on the parity. Hence, whenever a is odd, and b is even, a will be placed before b. If they are of the same parity, the output of our callback shouldn't matter

@Max You might as well submit that as your own answer.

@Neil, @Max it should be valid for all valid inputs. (x+1)&1 is 0 for all odd x and 1 for all even x, where x is an integer in the range [-Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], inclusive.

@asgallant I agree -- but disagree it's valid for all inputs. Returning 0 means "you decide" to JS. You need to return a negative value. (EDIT: my fix for this was also wrong, you need to add brackets to make things work)

@Max I still think it's valid under the ECMAScript specs (browser implementations may vary, of course). The spec says 0 means leave the order unchanged, not "you decide" (MDN docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description). I haven't tested across browsers, but at least Chrome follows the spec here.

Very interesting, I'll add that version to my answer (unless @Neil wants to add it to theirs?)

Stax, 5 bytes
{|eom

Run and debug it
Explanation:
{|eom Full program, implicit input
{  o  Sort by key:
 |e     Is odd?
    m Map over result:
        Implicit output with newline

PHP, 55 bytes
~14 months later and I'm a little bit better at golfing now:
for(;''<$n=$argv[++$i];$s=$n%2?"$n $s":"$s $n");echo$s;

Try it online!

PHP (>=5.4), 84 82 bytes
(-2 bytes, thanks to Ismael Miguel)
<?array_shift($a=&$argv);usort($a,function($i){return$i%2==0;});echo join(' ',$a);

To run it:
php -n <filename> <number_1> <number_2> ... <number_n>

Example:
php -n sort_odds_first.php 2 0 1 -1 3 8 29 -666

Or Try it online!

Instead of $a=array_slice($argv,1);, use array_shift($a=&$argv);, which saves 1 byte. Also, remove the space before $a in join(' ', $a), saving another byte. Also, PHP 5.3 gives different results. You should specify for which version of PHP this solution is for.

@IsmaelMiguel: Thanks for the  array_shift idea and pointing out the space mistake. I'm not sure how did I miss the space :D I have added the PHP >= 5.4 in title as well.

It is a common mistake. I actually was surprised by the array_shift when I tried it and worked.

Attache, 11 bytes
SortBy!Even

Try it online!
Explanation
Even returns true for even numbers and false otherwise. SortBy ranks false < true (by a numerical cast to 0 < 1), thus placing odd numbers before even ones.

T-SQL, 26 bytes
SELECT*FROM t ORDER BY~i&1

Uses the bitwise AND operator "&" to compare the last digit with 1.
EDIT: Bitwise NOT then shorter than adding 1.
EDIT2: Reorder to allow removal of the space.

Nice! Beat me by 5! Save one more byte by swapping the order and dropping the space: ORDER BY~i&1

Jelly, 3 bytes
ḂÞṚ

Try it online!
One of the more oft-wanted atoms seems to be an is-even one (which would make this 2 bytes), without it we must reverse I believe...
ḂÞṚ - Link: list of integers
 Þ  - sort by:
Ḃ   -   bit (least significant bit - i.e. 1 if odd 0 if even)
  Ṛ - reverse

JavaScript, 22 20 bytes
a=>a.sort(a=>!(a%2))
Try it online!

I think you can drop the parentheses around your third a.

Doesn't work if 0 is included in the array.

That's wrong. js comparator doiesn't work in such way. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description

I know how it should work and how you should use it for production, but in this case, this also works

According to the ECMA specification, "If comparefn is not undefined and is not a consistent comparison function for the elements of this array (see below), the behaviour of sort is implementation-defined."  This compare function is not consistent.  So this is not a JavaScript answer, but it might be an answer for some particular JavaScript implementation, and you'd have to name which implementation.

I think this fails for [1,2,3,4,5,6,6,-1,-2,-3,-4]. JavaScript array.sort is weird.

It is weird, that it works with just one parameter

a%2 will be weird for negative numbers. For example, -1 % 2 is -1 which is truthy.

@Max: If you can assume 2's complement in JS, you can use a&1 to get 0 or 1.  Negative odd numbers still have their low bit set in 2's complement and sign/magnitude, but not one's complement.

@user5090812: The wording about consistency in Qwerty's link only says it must return the same for the same inputs.  Does consistency also require that if (a,b) => -1, (b,a) must return +1 rather than also -1?  I think another problem is maybe treating a and b as equal when they're not.  So return !(a%2)*2-1 to get -1 or +1.  Or something like 1-2*(a&1) might also work, with some operator-precedence golfing.

Python, 35 bytes
lambda l:sorted(l,key=(-1).__pow__)

Try it online!
Sorts by the function x -> (-1)**x, which gives -1 for odd and 1 for even.

Prolog (SWI), 50 bytes
A+S:-predsort([X,Y,Z]>>(Y/\1>Z/\1,X= <;X= >),A,S).

Try it online!
-8 thanks to Jo King

50 bytes using a lambda

Red, 42 bytes
func[a][sort/compare a func[n][n % 2 = 1]]

Try it online!
If we need to account for negative values:
Red, 43 bytes
func[a][sort/compare a func[n][n // 2 = 1]]

Try it online!

Husk, 4 bytes
↔Ö%2

Try it online!
Explanation
 Ö     sort input according to the result of the following function
  %2   modulo 2
↔      reverse result to get odd numbers to the front

Scala, 18 bytes
_.sortBy(_.+(1)%2)

Ruby, 23 bytes
->a{a.sort_by{|i|~i%2}}

Try it online!
Explanation:
sort_by sorts every number as if its value were the result of the block (~i%2)
~x is equivalent to -x-1 and takes precedence over %2
Odd numbers will evaluate to 0 and even numbers will evaluate to 1 so odd numbers will be sorted first.
Barely related: this works on ruby from homebrew 2.5.1p57 (because it's based on a small bug) but only for non-negative integers, 20 bytes
->a{a.sort{|i|i%-2}}

Explanation:
This uses sort which expects a block that takes 2 values and returns -1, 0 or 1 depending on whether the first one is bigger, they're equal or the second one is bigger.
The block given here ignores the second value and returns -1 if the first number is odd or 0 if it's even.
It's not guaranteed to work but it does in some (I think buggy) implementations.

We define languages by their implementation here so your 20 byte solution is valid.

@Shaggy Never mind, I had messed up my testing yesterday.

PowerShell, 22 19 bytes
$args|sort{!($_%2)}

Try it online!
Takes input via splatting, e.g., $a=(3,4,3); .\sort-odd-numbers-first.ps1 @a, which on TIO manifests as separate arguments for each entry.
Like some other answers here, Sort-Object can compare based on an expression. Here the expression is !($_%2), i.e., odds get sorted to $false and evens get sorted to $true. Thanks to how Boolean values are compared, falsey values are sorted first. This moves the odds to the beginning of the output, and the evens to the end. Sort-Object is stable, so the ordering of the individual items in their respective categories doesn't change (as in the TIO example).
-3 bytes thanks to mazzy.

It can to use a splatting. For example $a=(3,4,3); .\sort-odd-numbers-first.ps1 @a. So $args|sort{!($_%2)} is enough. Isn't it?

why "cheating"? it's native powershell feature. One more question: can we to use splatting inside codeGolf solution? for example, a solution contains several functions. if we can then why external call should not? if we cannot then why this feature banned? and what features are banned too?

@mazzy Thanks for pointing that out. I've updated my submission.

6502 machine code routine, 47 bytes
A0 00 84 FE B1 FB 4A 90 07 C8 C4 FD F0 20 D0 F4 2A 85 02 84 FE A4 FD 88 C4 FE
F0 12 B1 FB 4A 90 F6 2A AA A5 02 91 FB A4 FE 8A 91 FB 90 D6 60

Expects a pointer to an array of numbers in $fb/$fc and the length of this array in $fd. Manipulates the array in place to have all odd numbers in front. This is position independent code, so no load address is needed.
As the 6502 is an 8bit chip (so the instructions only deal with 8bit values, optionally signed), the valid number range is [-128 .. 127] and the maximum array size is 256.
Commented disassembly
; function to "partially sort" array, so all odd numbers come before all
; even numbers.
;
; input:
;   $fb/$fc: address of array to sort
;   $fd:     length of array to sort, 0 means 256 (maximum size)
;
; clobbers:
;   $fd/$fe: position from back/front of array
;   $2:      temporary for exchanging two values
;   A, X, Y

 .oddfirst:
A0 00       LDY #$00            ; initialize index from front
84 FE       STY $FE             ; to 0

 .search_front:
B1 FB       LDA ($FB),Y         ; load number from front
4A          LSR A               ; check for even/odd by shifting
90 07       BCC .search_back    ; if odd -> to searching from back
C8          INY                 ; next position from front
C4 FD       CPY $FD             ; same as position searching from back?
F0 20       BEQ .done           ; then we're finished
D0 F4       BNE .search_front   ; else check next from front
 .search_back:
2A          ROL A               ; shift carry back in
85 02       STA $02             ; and save number to temp
84 FE       STY $FE             ; save index from front
A4 FD       LDY $FD             ; load index from back
 .sb_loop:
88          DEY                 ; previous position from back
C4 FE       CPY $FE             ; same as position searching from front?
F0 12       BEQ .done           ; then we're finished
B1 FB       LDA ($FB),Y         ; load number from back
4A          LSR A               ; check for even/odd by shifting
90 F6       BCC .sb_loop        ; if odd -> check previous position
2A          ROL A               ; shift carry back in
AA          TAX                 ; remember in X
A5 02       LDA $02             ; load temporary from front
91 FB       STA ($FB),Y         ; store at current position
A4 FE       LDY $FE             ; load index from front
8A          TXA                 ; load remembered number
91 FB       STA ($FB),Y         ; store at current position
90 D6       BCC .search_front   ; and back to searching from front
 .done:
60          RTS

Example C64 assembler program using the routine:
Online demo

Code in ca65 syntax:
.import oddfirst ; link with routine above

.segment "BHDR" ; BASIC header
                .word   $0801           ; load address
                .word   $080b           ; pointer next BASIC line
                .word   2018            ; line number
                .byte   $9e             ; BASIC token "SYS"
                .byte   "2061",$0,$0,$0 ; 2061 ($080d) and terminating 0 bytes

.bss
linebuf:        .res    5               ; maximum length of a valid signed
                                        ; 8-bit number input
convbuf:        .res    3               ; 3 BCD digits for signed 8-bit
                                        ; number conversion
numbers:        .res    $100            ; maximum array size that can be
                                        ; directly handled with indexing
                                        ; instructions

.data
prompt:         .byte   "> ", $0
message:        .byte   $d, $d, "Enter one number per line.", $d
                .byte   "just press enter (empty line) when done.", $0
errmsg:         .byte   "Error parsing number, try again.", $d, $0

.code
                lda     #$17            ; set upper/lower mode
                sta     $d018

                lda     #0
                sta     $2a             ; index for number array
                sta     $52             ; flag that at least one number was
                                        ; entered

                lda     #<message       ; display message
                ldy     #>message
                jsr     $ab1e

inputloop:
                lda     #<prompt        ; display prompt
                ldy     #>prompt
                jsr     $ab1e

                lda     #<linebuf       ; read string into buffer
                ldy     #>linebuf
                ldx     #5
                jsr     readline

                lda     linebuf         ; empty line?
                beq     process         ; -> start processing

                lda     #<linebuf       ; convert input to int8
                ldy     #>linebuf
                jsr     toint8
                bcc     numok           ; successful -> store number
                lda     #<errmsg        ; else show error message and repeat
                ldy     #>errmsg
                jsr     $ab1e
                bcs     inputloop

numok:          ldx     #$ff            ; set flag that we have a number
                stx     $52
                ldx     $2a
                sta     numbers,x
                inc     $2a             ; next index
                bne     inputloop       ; if array not full, next input

process:        lda     $52             ; check we have some numbers
                beq     exit            ; otherwise exit program

                lda     #<numbers       ; address of array to $fb/fc
                sta     $fb
                lda     #>numbers
                sta     $fc
                lda     $2a             ; length of array to $fd
                sta     $fd
                jsr     oddfirst        ; call "sorting" function

                lda     #$0             ; index variable for output loop
                sta     $52
outloop:        ldy     $52             ; load current index
                lda     numbers,y       ; load current number
                jsr     printnum        ; -> output
                inc     $52             ; next index
                lda     $52             ; compare with ...
                cmp     $2a             ; ... array size
                bne     outloop         ; not reached yet -> repeat

exit:           rts                     ; done, exit program

; read a line of input from keyboard, terminate it with 0
; expects pointer to input buffer in A/Y, buffer length in X
.proc readline
                dex
                stx     $fb
                sta     $fc
                sty     $fd
                ldy     #$0
                sty     $cc             ; enable cursor blinking
                sty     $fe             ; temporary for loop variable
getkey:         jsr     $f142           ; get character from keyboard
                beq     getkey
                sta     $2              ; save to temporary
                and     #$7f
                cmp     #$20            ; check for control character
                bcs     checkout        ; no -> check buffer size
                cmp     #$d             ; was it enter/return?
                beq     prepout         ; -> normal flow
                cmp     #$14            ; was it backspace/delete?
                bne     getkey          ; if not, get next char
                lda     $fe             ; check current index
                beq     getkey          ; zero -> backspace not possible
                bne     prepout         ; skip checking buffer size for bs
checkout:       lda     $fe             ; buffer index
                cmp     $fb             ; check against buffer size
                beq     getkey          ; if it would overflow, loop again
prepout:        sei                     ; no interrupts
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and clear
                and     #$7f            ;   cursor in
                sta     ($d1),y         ;   current row
output:         lda     $2              ; load character
                jsr     $e716           ;   and output
                ldx     $cf             ; check cursor phase
                beq     store           ; invisible -> to store
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and show
                ora     #$80            ;   cursor in
                sta     ($d1),y         ;   current row
                lda     $2              ; load character
store:          cli                     ; enable interrupts
                cmp     #$14            ; was it backspace/delete?
                beq     backspace       ; to backspace handling code
                cmp     #$d             ; was it enter/return?
                beq     done            ; then we're done.
                ldy     $fe             ; load buffer index
                sta     ($fc),y         ; store character in buffer
                iny                     ; advance buffer index
                sty     $fe
                bne     getkey          ; not zero -> ok
done:           lda     #$0             ; terminate string in buffer with zero
                ldy     $fe             ; get buffer index
                sta     ($fc),y         ; store terminator in buffer
                sei                     ; no interrupts
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and clear
                and     #$7f            ;   cursor in
                sta     ($d1),y         ;   current row
                inc     $cc             ; disable cursor blinking
                cli                     ; enable interrupts
                rts                     ; return
backspace:      dec     $fe             ; decrement buffer index
                bcs     getkey          ; and get next key
.endproc

; print an int8 number to the screen
; input:
;   A - the number to print
; clobbers:
;   X, Y
.proc printnum
                bpl     doprint         ; positive? -> direct number output
                eor     #$ff            ; else invert,
                sta     $2              ; ...
                inc     $2              ; add one,
                lda     #'-'            ; output a minus sign
                jsr     $e716
                lda     $2
doprint:        tax                     ; number to X reg
                lda     #$0             ; set A to 0
                jsr     $bdcd           ; routine for uint16 in X/A output
                lda     #' '
                jmp     $e716           ; and print a space
.endproc

; parse / convert int8 number using a BCD representation and double-dabble,
; handle negative numbers.
.proc toint8
                sta     $fb
                sty     $fc
                ldy     #$0
                sty     $fd
                sty     $fe
                sty     convbuf
                sty     convbuf+1
                sty     convbuf+2
scanloop:       lda     ($fb),y
                beq     copy
                iny
                cmp     #$20
                beq     scanloop
                cmp     #$2d
                beq     minus
                cmp     #$30
                bcc     error
                cmp     #$3a
                bcs     error
                inc     $fd
                bcc     scanloop
minus:          lda     $fd
                bne     error
                lda     $fe
                bne     error
                inc     $fe
                bne     scanloop
error:          sec
                rts
copy:           dey
                bmi     error
                ldx     #$2
copyloop:       lda     ($fb),y
                cmp     #$30
                bcc     copynext
                cmp     #$3a
                bcs     copynext
                sec
                sbc     #$30
                sta     convbuf,x
                dex
copynext:       dey
                bpl     copyloop
                lda     #$0
                sta     $fb
                ldx     #$8
loop:           lsr     convbuf
                lda     convbuf+1
                bcc     skipbit1
                ora     #$10
skipbit1:       lsr     a
                sta     convbuf+1
                lda     convbuf+2
                bcc     skipbit2
                ora     #$10
skipbit2:       lsr     a
                sta     convbuf+2
                ror     $fb
                dex
                beq     done
                lda     convbuf
                cmp     #$8
                bmi     nosub1
                sbc     #$3
                sta     convbuf
nosub1:         lda     convbuf+1
                cmp     #$8
                bmi     nosub2
                sbc     #$3
                sta     convbuf+1
nosub2:         lda     convbuf+2
                cmp     #$8
                bmi     loop
                sbc     #$3
                sta     convbuf+2
                bcs     loop
done:           lda     $fe
                beq     positive
                lda     #$ff
                eor     $fb
                sta     $fb
                inc     $fb
positive:       lda     $fb
                clc
                rts
.endproc

JavaScript (Chrome v67) - 24 19 23 bytes
a=>a.sort(a=>!(a&1)-.5)

The use of &1 rather than Math.abs()%2 was stolen from @Neil. Thanks!
Thanks to @Shaggy for showing my hacky 19 byte solution wasn't valid. If anyone wants it:
 Depends on how the browser handles a hacky return value of 0. Chrome v67, after 100000 iterations of random arrays never sorted it wrong. I'm very sure it works -- and it relies on the specific sort algorithm Chrome uses too, I believe. (It might work in other browsers, that's not the point)
a=>a.sort(a=>++a&1)

Welcome to PPCG :) This fails for input [-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] in my Chrome 67 console, outputting [7,-5,-3,17,-1,15,1,13,3,11,5,9,2,19,14,-4,6,18,-2,16,0,10,8,12,4].

@Shaggy -- oops! you're absolutely right!

C#, 23 bytes
i=>i.OrderBy(u=>u%2==0)

Quite straigt forward really: This basically converts the numbers to booleans, whilst true means that the number is even and false that it's odd. Because true is higher than false the even numbers appear first.
The formatted version looks like that:
i => i.OrderBy (u => u % 2 == 0)

And you can test it like that:
Console.WriteLine (string.Join (",", new Func <IEnumerable <int>, IEnumerable <int>> (
                                    i => i.OrderBy (u => u % 2 == 0)
                                ).Invoke (new [] {3, 2, 2, 2, 1, 2, 5, 5})));

Which results in the following:
3,1,5,5,2,2,2,2

Try it online!

JavaScript, 23 bytes
6 bytes shorter than @Neil's answer using the same language :D
a=>a.sort(n=>-(n&1)||1)

Explanation:
The function passed to sort only cares about the first parameter. If it is odd it returns -1 (the result of -(n&1)). Otherwise (when -(n&1) yields 0) it returns 1.
Try it online!

Welcome to PPCG!

JavaScript, 21 bytes
a=>a.sort(n=>(-1)**n)

Try it online

APL (Dyalog Extended), 9 bytes
-7 thanks to @rak1507.
{⍵[⍒2|⍵]}

Explanation:
{⍵[⍒2|⍵]}
    2|⍵      ⍝ ⍵ mod 2, return 1 for each odd element and 0 for each even element
   ⍒         ⍝ pick the indices that produce the array sorted in descending order
  [    ]     ⍝ pick elements corresponding to indices in provided order...
 ⍵           ⍝ from ⍵

For example:
2|6 7 8 9        => 0 1 0 1
⍒0 1 0 1         => 2 4 1 3
6 7 8 9[2 4 1 3] => 7 9 6 8

Try it online!

{⍵[⍒2|⍵]} I think this works

C (gcc), 71 49 48 bytes
Many thanks to the commenters for the suggestions. Apparently gcc is happy with just a partial ordering of {equal, greater than} for qsort (just to check, clang seems to be happy with this as well.) Although I'm not happy with hardcoding type sizes, it does reduce 7 bytes from sizeof b: change 4 to 8 for systems with a 64-bit int.
q(int*a){a=1-*a&1;}f(a,b)int*a;{qsort(a,b,4,q);}

Try it online!
Alternative version using two passes through the array (79 bytes):
i,j;f(a,b)int*a;{for(i=2;~--i;)for(j=b;~--j;)!(a[j]%2)-i&&printf("%d\t",a[j]);}

Try it online!

72 byte version using qsort: Try it online!

64 bytes if you replace sizeof(b) by 4 (obviously tying it to a common size of int).

Even if not, sizeof b is one byte shorter than sizeof(b).

@TobySpeight I keep forgetting that sizeof is an operator, not a function. In any case, I've found that it pays to be liberal with parentheses in C, because some of the operator precedence rules are strange and often the cause of many hours of debugging and head-scratching in real programs!

If you sort char elements, the element size is a constant 1.  But char is allowed to be an unsigned type, and signed char would be required for correctness on one's complement systems, where checking the low bit does not determine odd/even.  Of course, caring about extreme portability is pretty ridiculous when you're using a=blah blah instead of return.  That's dependent on the implementation detail that gcc -O0 makes sure to evaluate expression in the return-value register (on all architectures I've looked at), but it of course breaks when compiled normally with optimization.

If you're being gcc-specific anyway, you could limit it to 2's complement systems where you do only need to check the low bit.  x(a,b)int*a,*b;{return(*a&1)*2-1;}  returns -1 or +1 according to the oddness of a.  (Treating equal as less-than is fine, but we can't just return *a&1 because treating less-than as equal is not fine: qsort isn't guaranteed stable.)  You can probably save bytes with a !(*a%2) version of that.  I played around with a few versions on Godbolt, looking at the asm output to make sure they did the same thing as the working version. https://godbolt.org/g/zo7WG6

I mean to see if they did the same thing.  I'm not 100% sure that all of the ones I left uncommented actually work.

70 bytes if you use C89 style function declaration instead of K&R style

If qsort works properly with something like return(*a&1)*2-1, we can leave out the ,*b from the declaration.  (Some sorts might not like it if a<b and b<a are both true.  IDK if qsort requires that.   Yeah, the official POSIX qsort(3) man page says: The application shall ensure that the function returns an integer less than, equal to, or greater than 0, if the first argument is considered respectively less than, equal to, or greater than the second.  Some implementations may work anyway, though.

@ceilingcat Indeed it should. I had *a%2 in there previously and the number got skipped.

May be able to get away with ~*a&1 instead of 1-*a&1

f(a,b)int*a;{qsort(a,b,4,"\x8b\7\xf7Ѓ\xe0Ã");} would be 47(+1) bytes. So no gain from lambdafying that function, unfortunately. Also, there's an invisible char there. I think.

However, using a macro in place of f gains you -6 bytes. Compile with -Df(a,b)=qsort(a,b,4,q).

Elixir, 37 35 bytes
Code:
fn x->Enum.sort_by x,&(-rem&1,2)end

Expanded version:
fn x -> Enum.sort_by(x, fn y -> -rem(y, 2) end) end

Try it online!

Java 8, 46 29 27 bytes
l->l.sort((i,j)->1-(i&1)*2)

Uses Java 8's List.sort(), thanks to JollyJoker for making me aware of it and for saving me 19 bytes. Try it online here.
Ungolfed:
l -> // lambda taking a List of Integers and modifying it
        l.sort( // sort the List according to ...
        (i, j) ->                // ... a Comparator<Integer> with a compare() method ...
                 1 - (i & 1) * 2 // ... that finds a number smaller than another if it's odd, and greater otherwise

Java 8 has List.sort() (if you don't interpret the question as requiring an array specifically)

@JollyJoker In the absence of a comprehensive spec, I'll choose to interpret it that way :D Thanks for teaching me about List.sort(). This is one of the few instances where golfing suggestions actually improve your real-life programming knowledge. With regards to lists vs. arrays I would reason that since some languages don't have arrays, we can allow lists instead (in keeping with the general rule of when a limited language is allowed something, all languages are allowed that too). Meta post, vote if you like: https://codegolf.meta.stackexchange.com/a/16670/79343

Upvoted your meta post. Also played around with the comparator a little but just got equivalent lengths with 1-((i&1)*2) and 1-(i*i%2*2). Thought I'd post them if you see something I missed.

@JollyJoker You can drop the outer parentheses due to operator precedence: 1-(i&1)*2 or 1-i*i%2*2 => 27 bytes

Just came up with (i&1)*-2 for 26

@JollyJoker 24 bytes with -(i&1)

Let us continue this discussion in chat.

C++, 174 165 164 149 129 bytes

Replace the two include lines with a single include, regex, that happens to include both required headers

#include <regex>
int main(int c,char**v){std::sort(v+1,v+c,[](auto s,auto t){return atoi(s)%2>atoi(t)%2;});for(;*++v;)puts(*v);}

149 Bytes

For loop trick for printing. This uses the fact that, on Linux at least, the argv array is null-terminated.
replace &1 with %2 to remove need for some brackets. Thank you Toby Speight!

#include<algorithm>
#include<cstdio>
int main(int c,char**v){std::sort(v+1,v+c,[](auto s,auto t){return atoi(s)%2>atoi(t)%2;});for(;*++v;)puts(*v);}

Older: 164 bytes
#include<algorithm>
#include<cstdio>
int main(int c,char**v){std::sort(v+1,v+c,[](auto s,auto t){return(atoi(s)&1)>(atoi(t)&1);});for(auto i=1;i<c;i++)puts(v[i]);}

Compile as C++14 or higher. Input is taken on the command line, and prints to standard output.
EDIT: removed un-needed return 0; statement
EDIT 2: Removed space after 'return'

Welcome to PPCG! I think you can remove the space after the first return to save a byte.

@Toby That would work but finding the last character of the string would involve a call to strlen, which already puts us behind.

You can save 1 byte: for(int i=1;i<c;)puts(v[i++]);

Thanks for the input -- I've managed to get it down to 129 bytes by removing an include line, and implementing the %2 trick to remove parens, and the second for loop trick!

That's certainly some golfing!  Welcome to the crazy world of PPCG!  I'm glad those tips helped - I'll just observe that Standard C++ guarantees that argv[argc] is null, so that's a portable technique, and not Linux-specific.  Nice trick on the include (although that one is compiler-specific). I don't know whether you've found it yet, but if not: have a browse through the [tag:tips] tag, and especially Tips for golfing in C++.

TIO reports a byte count of 128, and you can remove the space in the #include to bring it to 127: https://bit.ly/2LyHlLL

Clojure - 35 bytes
(defn o[c](sort(fn[p _](odd? p))c))

Ungolfed:
(defn oddsort [col]
  (sort (fn [p _] (odd? p)) col))

There is lots of room for improvement, for example you can submit an anonymous function which has a shorter creation syntax via #(...). Also you could give sort-by a try, although the submission already exists.

@NikoNyrh: tried a #() anonymous function but got an arity error as two parameters were passed but only on expected/used, and bringing %2 into it added more characters. Would be interested to see how this could be done.

Retina 0.8.2, 21 bytes
O$`.*(([02468])|.)
$2

Try it online! Link includes header that splits on commas for convenience. Explanation: The last digit of the number is captured if it is even, otherwise it is just matched (this avoids degenerate matches). The $ option then uses the matched digit as the sort key. Odd numbers don't match and end up with an empty sort key, causing them to be sorted first (in their original order), then the even numbers are sorted in order of last digit.

T-SQL, 33 bytes
SELECT*FROM t ORDER BY 1-ABS(i)%2

Per our IO standards, input is taken via pre-existing table t with integer column i.
The ABS() function is annoyingly necessary here because the T-SQL modulus operator % returns negative values for negative numbers, which in this case meant I was getting three possible results for i%2: -1, 0, and 1.
Subtracting from 1 is a couple bytes shorter than using DESC.
Note that per the question, I'm not doing any secondary sort, so the order of the odds and evens isn't predictable. If you want a secondary sort, add 2 bytes by adding ,i to the end.

sed 4.2.2, 51 43 bytes
Includes +1 for -r
-8 Thanks to Toby Speight
:
s/([^,]*[02468]),([^,]*[13579])/\2,\1/
t

Try it online!

><>, 40 bytes
l\ /nao01.
:<}\?%2:$-1/?(1
l0=?;naof2.\~

Try it online!
Filter through the list, printing odd numbers, keeping even numbers
l                  Get the length of the stack, use it as an iterator
:          /?(1    Check that there is at least one value left to process
        $-1        Decrement the iterator
    \?%2           Test if the next number is divisible by two
    /nao           Print it if so,
   }               Else, move it to the bottom of the stack
            ~      Delete the iterator after exiting the loop

Print the even numbers left on the stack
l0=?               If there are no values left on the stack,
    ;              Terminate
     nao           Print the next value

Clojure, 18 bytes
#(sort-by even? %)

Try it online!

Haskell, 44 bytes
Not as byte efficient as Laikoni's answer, but a different approach.
import Data.List
f=uncurry(++).partition odd

Try it online!
Using a sort instead, 47 bytes.
import Data.List
f=sortBy((.even).compare.even)

Try it online!

Welcome to the site! If you want to talk Haskell/Haskell golfing with us we have a chat room.

><>, 25 bytes
l/!?:-1$v?%2:{~
$/<+2oan<

Try it online!
Input is via the -v flag. Ends with an error.
Explanation:
l\            ~  Push length of stack as the counter
 \<

         ?%2:{   Pull a number from the bottom of the stack and check if it is odd

 /   -1$v  If even, subtract one from the counter
 /<+2oan<  If odd, print the number and a newline and add two to the counter

 /!?:      If the counter is 0, go down
$/+2oan<   Print the even number anyway, and set the counter to 2

For a non-erroring version, you can replace the last ~ on the first line with ;?=1

Python 2, 34 bytes
lambda a:sorted(a,lambda x,y:x%-2)

Try it online!
This seems to work, but I don't actually understand why it works.  If anyone can explain why my half-witted compare function (It returns -1 if the first argument is odd and 0 if the first argument is even, and that's it) works, I'd greatly appreciate it.

Welcome to PPCG! :)

Go, 105 bytes
import."sort"
func f(I[]int)[]int{Slice(I,func(i,j int)bool{k:=I[i]
if k<0{k=-k}
return k%2>0})
return I}

Attempt This Online!

Perl 5 with -M5.010 + -MList::MoreUtils+(sort_by), 21 bytes
sub{sort_by{$_%-2}@_}

Try it online!

Wolfram Language (Mathematica),  15  12 bytes
SortBy@EvenQ

Try it online!
(saved three bytes thanks to JungHwan Min)

Previous version:
#~SortBy~EvenQ&

Try it online!

Awk: 50 bytes
{and($1,1)?(o=o $1 RS):(e=e $1 RS)}END{print o e}

Input on stdin, Output on stdout
I use RS, the record separator, as a stand-in for "\n", saving two characters each time.

Ruby, 19 20 bytes
Works on ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] from Arch Linux repos.
->a{a.sort{|i|~i%2}}

Are you sure? It seems to me that this sorts even numbers first. Also, for me (ruby 2.5.1p57 from homebrew) this fails for negative numbers.

@AsoneTuhid It did not fail for negative numbers for me and i just fixed it to sort odd numbers first (+1 byte)

18 bytes no question. The improvement comes from using implicit params introduced in Ruby 2.7

Rust, 38 bytes
|l:&mut Vec<_>|l.sort_by_key(|e|1^e&1)

Try It Online

Pyke, 4 bytes
.#t1.&

Try it here!
.#t1.& - sorted(input, key=lambda i: ↓)
  t    -   i-1
   1.& -  ↑ & 1

4 byte hexdump:
A3 74 31 A6

Try it here!

Swift 4, 40 bytes
print(n.filter{$0%2>0}+n.filter{$0%2<1})

Try it online!
n is the input array
print will be like: [1, 3, 2, 2, 2]

Mathematica 25 bytes
Flatten@GatherBy[#, OddQ] &

Chip -z, 44 bytes
V z.
>~#<
|at|Bb
|A-}]~S
>vvv+Cc
DEFGH
defgh

Try it online!
Chip works in bytes, so this expects a sequence of byte-width values on stdin. I use 0x00 as a special delimiter, so that can't be one of the values. (This could be modified to use a different delimiter, at the expense of code size).
The TIO link above uses ASCII "123456789" as the input, corresponding to values 0x31, 0x32, 0x33, ..., 0x39.
This solution reads though the input twice (it knows it hit the end when it sees the 0x00 mentioned earlier, which is tacked onto the end by the flag -z). On the first pass, it prints the odd values, on the second the evens. It actually starts a third pass, but the termination logic kicks in before it does anything else.
Let's look at a rough overview of the code (Chip is 2D, so regions are described, each line on its own would do nothing useful):
           The V is a bookmarker of sorts. The mark is set at the start of a
V z.       pass, and then recalled when the input is exhausted. This does the
>~#<       looping (as opposed to using a stack or queue to hold the data).
|at|Bb     The # is a half-adder, it increments on each pass. When it
>A-}]~S    carries, the t is triggered, terminating the program. The S
>vvv+Cc    suppresses the values we don't want to print on this pass.
DEFGH      The remaining A-H letter pairs are a cat program, smooshed around
defgh      so that the input elements (capital letters) can do double duty,
           for things like detecting oddness, and the end of input.

Lua, 142 134 bytes
loadstring'p={...}n={}for i=1,#p*2 do n[#n+1]=i<=#p and p[i]%2==1 and p[i]or i>#p and p[i-#p]%2==0 and p[i-#p]or n[#n+1] end return n'

Try it online!

k, 8 bytes
{x@>2!x}

Try it online! Loosely based off of the J answer.
{      } /function
    2!x  /  modulo 2 (mapped through list)
   >     /  get indices to sort descending
 x@      /  return the original list at those indices

Julia 1.0, 27 bytes
f(l)=l[sortperm(l.%2 .==0)]

Try it online!
This works too and is a lot more elegant:
f(l)=sort(l,lt=(a,b)->b%2==0)

But it's a few bytes longer :(

Zsh, 31 bytes
grep [02468]$<i
grep [13579]$<i
Attempt This Online!
Takes input from a file called i.

You don't need the $<, just a space. ATO

@DeathIncarnate The $ is needed, because I need grep to only match at the end of the line, because otherwise it would break for numbers of more than one digit (example). And then changing <i to  i doesn't make any difference.

Vyxal, 2 bytes
µ₂

Try it Online!
µ  # Sort by...
 ₂ # Even?

Fig, \$3\log_{256}(96)\approx\$ 2.469 bytes
^@E

See the README to see how to run this
Aww loses to fancier languages.
^@E # Full program
^   # Sort...
 @  # by...
  E # Is even?

Thunno 2, 2 bytes
ÞE

Attempt This Online!
Explanation
ÞE  # Implicit input
Þ   # Sort by:
 E  #  Is even?
    # Implicit output

sed 4.2.2, 32 bytes
:
s/(<(!!)*>)(<(!!)*!>)/\3\1/g
t

Try it online!
Input is formatted as a exclamation marks surrounded by <>. Output is the same.
Ex: <><!><!!><!!!><!!!!> => <!><!!!><><!!><!!!!>

x86-16 machine code, 25 bytes
00000000: e316 8bd7 03d1 4afc aca8 0174 03aa eb06  ......J....t....
00000010: 87d7 fdaa 87d7 e2ef c3                   .........

Listing
E3 16       JCXZ EXIT           ; handle empty input list
8B D7       MOV  DX, DI         ; DI = output list head
03 D1       ADD  DX, CX         ; DX = output list tail (1 past)
4A          DEC  DX             ; DX = output list tail
        INLOOP:
FC          CLD                 ; string direction forward
AC          LODSB               ; get next char
A8 01       TEST AL, 1          ; is even? NZ if odd, ZF if even
74 03       JZ   EVEN
        ODD:
AA          STOSB               ; write to list head
EB 06       JMP  DONE
        EVEN:
87 D7       XCHG DX, DI         ; DI = list tail
FD          STD                 ; string direction reverse
AA          STOSB               ; write to list tail
87 D7       XCHG DX, DI         ; DI = list head
        DONE:
E2 EF       LOOP INLOOP         ; continue looping input list
        EXIT:
C3          RET                 ; return to caller

Callable function, input list at DS:SI, length in CX. Output list buffer at ES:DI.
If input number is odd, is added to the beginning of output list. If even, is added to the end of the output list.
Test cases:
[1, 2] → [1, 2]

[0, 0, -1] → [-1, 0, 0]

[-1, -2, 3, -4, -5] → [-1, 3, -5, -4, -4]

[3, 2, 2, 2, 1, 2] → [3, 1, 2, 2, 2, 2]

Kotlin, 33 bytes
{l:List<Int>->l.sortedBy{1-it%2}}

Try it online!

is it correct with negative even? 0,0,-1, -2,-2,-2,-1,-2,-3

This answer does not work for negative numbers. Suggestion (38 bytes, you may be able to improve on that): https://tio.run/##TY7bCoJAFEXf/YqDEMzEUdLuoka9Bb71BQNeODSOMp4CEb/dTAhaj3uzL8@GNZmpfBmoFRmhbNVFcLVW9fGDLZkqlTA4MPNWGkpIpkFHGXUc3w2nXqr9rrFc5Ld@CDziNfEqXIfjOP0iGhIQtlB5RqYQEi4RuK5cGr/4XauJhYv/Wq3agdjnZt4QclyMdj7DohRaSmecNhhgiFvc4R4PeMQTntELPg

Swift, 22 bytes
Two different answers with the same byte count!
In-place
{$0.partition{$0&1<1}}

Argument type is any MutableCollection whose element type conforms to BinaryInteger. Technically this returns the index where it changes from odd to even numbers, but this can be made to return Void with a warning: SwiftFiddle link
C brain keeps telling me to do ~$0&1 but Swift doesn't do int-bool conversion
New array
{$0.sorted{$0&1>$1&1}}

Argument type is any Sequence whose element type conforms to BinaryInteger. Returns an array with the same element type. SwiftFiddle link

Arturo, 22 bytes
$=>[arrange&=>[^0-1&]]

Try it!
$=>[             ; a function where input is assigned to &
    arrange&=>[  ; sort input by
        ^0-1&    ; -1 to the (current element) power
    ]            ; end arrange
]                ; end function

source: Stack Exchange

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

authors: Bob Jarvis - Слава Україні

sort: votes