g | x | w | all
Bytes Lang Time Link
039Ruby n250603T013704ZValue In
nan241124T170432Zl4m2
nanChef241122T190211ZSeggan
081Janet250504T182053ZAdam
082Wolfram Language Mathematica250109T075947ZIntroduc
053JavaScript Node.js231206T021548Znoodle p
077AWK241126T155939Zxrs
106C#241126T144211ZEzlandin
137QBasic241121T225709ZDLosc
183BrainChild241121T224141ZATaco
077Bash240613T092112ZThemooni
085Python 3.8 prerelease240613T080342ZJitse
030Pip231221T181759ZDLosc
203TypeScript’s type system231224T181404Znoodle p
077Scala 3231206T113435Z138 Aspe
038Gema231224T200328Zmanatwor
156Swift231224T145049ZAnnett S
113C gcc231208T102952ZNicholas
038Uiua 0.6.1231208T165548ZRomanPro
024Vyxal 3231206T072121Zmath sca
040JavaScript ES11231206T030301ZArnauld
077Python 3231206T130533ZRhaixer
042Charcoal231207T011146ZNeil
036Retina 0.8.2231206T094814ZNeil
025Retina231206T232215ZLeo
024Jelly231206T202306ZNick Ken
051R231206T160608ZJDL
034Perl 5 + p231206T110049ZDom Hast
03705AB1E231206T100836ZKevin Cr

Ruby -n, 39 bytes

$~ holds the MatchData object associated with the last regex lookup, and end(0) gives the position of the end of that match; since we need the position of the o subtract 1. Returns nil if not found.

p~/three.*?two.*?one.*?go/&&$~.end(0)-1

Attempt This Online!

This 1369 works on esolangpark but not TIO and I don't figure why

Chef, 1464 bytes

Now time without loop of tens and O(1) space, so 20ms per instruction(default on esolangpark) is reasonable time for the 91 input(took 3463 cycles).

a.

Ingredients.
100 T
88 H
98 R
85 E
103 W
95 O
94 N
87 G
0 j
1 k
256 p
4 a

Method.
Put j into mixing bowl.Put O into mixing bowl.Put G into mixing bowl.Put j into mixing bowl.Put E into mixing bowl.Put N into mixing bowl.Put O into mixing bowl.Put j into mixing bowl.Put O into mixing bowl.Put W into mixing bowl.Put T into mixing bowl.Put j into mixing bowl.Put E into mixing bowl.Put E into mixing bowl.Put R into mixing bowl.Put H into mixing bowl.Put T into mixing bowl.Put j into 3th mixing bowl.Put j into 7th mixing bowl.F the a.Fold E into mixing bowl.Put E into 3th mixing bowl.G the E.Add k to 7th mixing bowl.Take R from refrigerator.Put k into mixing bowl.H the R.Remove k.Set aside.V until hed.Fold T into mixing bowl.I the T.Refrigerate.V until ied.Put R into mixing bowl.Remove E.Fold T into mixing bowl.Put T into mixing bowl.Combine T.Remove p.Fold T into mixing bowl.J the T.K the T.Fold T into 3th mixing bowl.Put T into mixing bowl.V until ked.Fold T into mixing bowl.Put T into 3th mixing bowl.Fold E into mixing bowl.Put E into 3th mixing bowl.Put R into mixing bowl.Remove E.Fold H into mixing bowl.Put H into mixing bowl.Combine H.Remove p.Fold H into mixing bowl.L the H.Fold E into 3th mixing bowl.Put E into mixing bowl.Set aside.V until led.V until jed.Fold E into mixing bowl.Put E into 3th mixing bowl.V until ged.V the a until fed.Remove k from 7th mixing bowl.Pour contents of the 7th mixing bowl into the baking dish.

Serves 1.

Try it online!

I don't understand why someone took months to do this.

Generator using fasmg:

macro var nam, id, val
    nam equ id
    repeat 1, i:val
        db `i, ' ', id, 10
    end repeat
end macro
macro var0 nam, id
    nam equ id
    db id, 10
end macro
; x.push(y)
macro push x, y
    db 'Put ', y, ' into ', `x, 'th mixing bowl.'
end macro
; Before, 1 is only used for temporary operations
; It's now also used as to-read stack(was 4)
; Text "push 4" is preserved to keep thing clear
macro push1 y
    db 'Put ', y, ' into ', 'mixing bowl.'
end macro
macro push4 y
    db 'Put ', y, ' into ', 'mixing bowl.'
end macro
macro pop x, y
    db 'Fold ', y, ' into ', `x, 'th mixing bowl.'
end macro
macro pop1 y
    db 'Fold ', y, ' into ', 'mixing bowl.'
end macro
macro pop4 y
    db 'Fold ', y, ' into ', 'mixing bowl.'
end macro
; x[0] += y
macro add x, y
    db 'Add ', y, ' to ', `x, 'th mixing bowl.'
end macro
macro add1 y
    db 'Add ', y, '.'
end macro
macro sub x, y
    db 'Remove ', y, ' from ', `x, 'th mixing bowl.'
end macro
macro sub1 y
    db 'Remove ', y, '.'
end macro
macro mul x, y
    db 'Combine ', y, ' into ', `x, 'th mixing bowl.'
end macro
macro mul1 y
    db 'Combine ', y, '.'
end macro
macro read y
    db 'Take ', y, ' from refrigerator.'
end macro
whil_cnt = 'F'
; Also for IF
macro whil y
    whil_cur =: whil_cnt
    db whil_cnt, ' the ', y, '.'
    whil_cnt = whil_cnt + 1
end macro
macro wend
    db 'V until ', whil_cur+32, 'ed.'
    restore whil_cur
end macro
macro wendec y
    db 'V the ', y, ' until ', whil_cur+32, 'ed.'
    restore whil_cur
end macro
macro endif
    db 'Set aside.'
    wend
end macro

db 'a.', 10, 10
db 'Ingredients.', 10 ; Variables
    var char_T, 'T', 'T'+16
    var char_H, 'H', 'H'+16
    var char_R, 'R', 'R'+16
    var char_E, 'E', 'E'+16
    var char_W, 'W', 'W'+16
    var char_O, 'O', 'O'+16
    var char_N, 'N', 'N'+16
    var char_G, 'G', 'G'+16
    var int_0, 'j', 0
    var int_1, 'k', 1
    var int_256, 'p', 256
    tmp1 equ char_T
    tmp2 equ char_H
    input equ char_R
    input2 equ char_E
    var count, 'a', 4
db 10, 'Method.', 10 ; Program
; Initialize
push4 int_0
push4 char_O
push4 char_G
push4 int_0
push4 char_E
push4 char_N
push4 char_O
push4 int_0
push4 char_O
push4 char_W
push4 char_T
push4 int_0
push4 char_E
push4 char_E
push4 char_R
push4 char_H
push4 char_T
push 3, int_0

push 7, int_0
whil count
    pop4 input2
    push 3, input2
    whil input2
        add 7, int_1
        read input
        ; Not sure how "IF NOT" is expected to write
        ; Here "t=1; if(x)t=0; if(t)" is used
        push1 int_1
        whil input
            sub1 int_1
        endif
        pop1 tmp1
        whil tmp1
            db 'Refrigerate.'
        wend
        push1 input
        sub1 input2
        pop1 tmp1
        push1 tmp1
        mul1 tmp1
        sub1 int_256
        pop1 tmp1
        whil tmp1
            whil tmp1
                pop 3, tmp1
                push4 tmp1
            wend               ; [ ]T h r e e
            pop4 tmp1
            push 3, tmp1       ;   [T]h r e e
            pop4 input2
            push 3, input2
            push1 input
            sub1 input2
            pop1 tmp2
            push1 tmp2
            mul1 tmp2
            sub1 int_256
            pop1 tmp2          ;    T[h]r e e   | <input>-T
            whil tmp2
                pop 3, input2
                push4 input2
            endif
        wend
        pop4 input2
        push 3, input2
    wend
wendec count
sub 7, int_1

db 'Pour contents of the 7th mixing bowl into the baking dish.'
db 10, 10, 'Serves 1.'

No less than comparation needed.

See revision for version with weak toUpperCase

Chef, 35274 32905 31090 27687 21543 20546 19709 bytes

a.

Ingredients.
a
27 b
84 c
72 d
82 e
69 f
87 h
79 i
78 j
71 k
m
13 n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
0 H
1 I
J
K
L
M
2 N
O
P
3 Q
4 R
S
5 T
U
6 V
W
7 X
Y
10 Z
ab
8 bb
cb
11 db
9 eb
fb
gb
96 hb
ib
12 jb
32 kb
lb
14 mb
nb
15 ob
pb
qb
26 rb
16 sb
17 tb
ub
vb
22 wb
18 xb
19 yb
zb
20 Ab
Bb
Cb
25 Db
21 Eb
Fb
Gb
24 Hb
23 Ib
Jb
Kb
Lb
Mb
28 Nb
Ob
29 Pb
Qb
Rb
31 Sb
30 Tb
Ub
Vb
Wb
34 Xb
33 Yb
Zb
35 ac
bc
cc
37 dc
36 ec
fc
38 gc
hc
ic
40 jc
39 kc
lc

Method.
Put b into mixing bowl.Fold a into mixing bowl.Put c into 7th mixing bowl.Put d into 7th mixing bowl.Put e into 7th mixing bowl.Put f into 7th mixing bowl.Put f into 7th mixing bowl.Put c into 7th mixing bowl.Put h into 7th mixing bowl.Put i into 7th mixing bowl.Put i into 7th mixing bowl.Put j into 7th mixing bowl.Put f into 7th mixing bowl.Put k into 7th mixing bowl.Put i into 7th mixing bowl.Put n into mixing bowl.Fold m into mixing bowl.Put H into 5th mixing bowl.V the a.Put a into mixing bowl.Remove I from mixing bowl.Fold J into mixing bowl.Put I into mixing bowl.V the J.Fold K into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold J into mixing bowl.V the J.Fold K into mixing bowl.Fold L into mixing bowl.Fold L into mixing bowl.Put L into mixing bowl.Add K to mixing bowl.Fold K into mixing bowl.Put m into mixing bowl.Remove K from mixing bowl.Fold K into mixing bowl.Put K into mixing bowl.Fold M into mixing bowl.V the M.Fold L into 7th mixing bowl.Put L into 8th mixing bowl.V the M until ved.Fold L into 8th mixing bowl.Put L into mixing bowl.Put L into 7th mixing bowl.Put K into mixing bowl.Remove I from mixing bowl.Fold K into mixing bowl.V the K.Fold L into 8th mixing bowl.Put L into 7th mixing bowl.V the K until ved.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove N from mixing bowl.Fold L into mixing bowl.Put I into mixing bowl.V the L.Fold M into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold L into mixing bowl.V the L.Fold M into mixing bowl.Put M into mixing bowl.Combine I into mixing bowl.Fold M into mixing bowl.Put m into mixing bowl.Fold O into mixing bowl.Put M into mixing bowl.Fold P into mixing bowl.V the P.Put H into 7th mixing bowl.Put m into mixing bowl.Add I to mixing bowl.Fold m into mixing bowl.V the P until ved.Put O into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Q from mixing bowl.Fold O into mixing bowl.Put I into mixing bowl.V the O.Fold M into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold O into mixing bowl.V the O.Fold o into mixing bowl.Put o into mixing bowl.Put R into 5th mixing bowl.Put N into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove R from mixing bowl.Fold P into mixing bowl.Put I into mixing bowl.V the P.Fold S into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold P into mixing bowl.V the P.Fold p into mixing bowl.Put p into mixing bowl.Put o into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove T from mixing bowl.Fold S into mixing bowl.Put I into mixing bowl.V the S.Fold U into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold S into mixing bowl.V the S.Put H into mixing bowl.Put V into 5th mixing bowl.Put Q into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove V from mixing bowl.Fold U into mixing bowl.Put I into mixing bowl.V the U.Fold W into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold U into mixing bowl.V the U.Fold r into mixing bowl.Fold q into mixing bowl.Put X into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove X from mixing bowl.Fold W into mixing bowl.Put I into mixing bowl.V the W.Fold Y into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold W into mixing bowl.V the W.Put Z into mixing bowl.V the I.Fold ab into mixing bowl.Put bb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove bb from mixing bowl.Fold Y into mixing bowl.Put I into mixing bowl.V the Y.Fold ab into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Y into mixing bowl.V the Y.Take ab from refrigerator.Put ab into mixing bowl.Fold s into mixing bowl.Put s into mixing bowl.Fold ab into mixing bowl.Put I into mixing bowl.V the ab.Fold cb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ab into mixing bowl.Put db into mixing bowl.V the ab.Fold cb into mixing bowl.Put eb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove eb from mixing bowl.Fold ab into mixing bowl.Put I into mixing bowl.V the ab.Fold cb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ab into mixing bowl.V the ab.Put Z into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Z from mixing bowl.Fold cb into mixing bowl.Put I into mixing bowl.V the cb.Fold fb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold cb into mixing bowl.V the cb.Put q into mixing bowl.Put r into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove db from mixing bowl.Fold fb into mixing bowl.Put I into mixing bowl.V the fb.Fold gb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold fb into mixing bowl.V the fb.Put s into mixing bowl.Remove hb from mixing bowl.Fold gb into mixing bowl.V the gb.Put H into 9th mixing bowl.Remove I from 9th mixing bowl.Put I into 9th mixing bowl.Stir gb into the 9th mixing bowl.Fold ib into 9th mixing bowl.Fold gb into 9th mixing bowl.Set aside.V until ved.Put gb into mixing bowl.Remove I from mixing bowl.Fold gb into mixing bowl.Put I into mixing bowl.V the gb.Fold ib into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold gb into mixing bowl.Put n into mixing bowl.V the gb.Fold ib into mixing bowl.Put jb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove jb from mixing bowl.Fold gb into mixing bowl.Put I into mixing bowl.V the gb.Fold ib into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold gb into mixing bowl.V the gb.Put s into mixing bowl.Remove kb from mixing bowl.Fold s into mixing bowl.Put n into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove n from mixing bowl.Fold ib into mixing bowl.Put I into mixing bowl.V the ib.Fold lb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ib into mixing bowl.V the ib.Put s into 7th mixing bowl.Put m into mixing bowl.Add I to mixing bowl.Fold m into mixing bowl.Put q into mixing bowl.Put r into mixing bowl.Add I to mixing bowl.Fold r into mixing bowl.Fold q into mixing bowl.Put X into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove mb from mixing bowl.Fold lb into mixing bowl.Put I into mixing bowl.V the lb.Fold nb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold lb into mixing bowl.V the lb.Fold u into mixing bowl.Fold t into mixing bowl.Fold v into mixing bowl.Fold x into mixing bowl.Fold w into mixing bowl.Put v into mixing bowl.Fold y into mixing bowl.Put ob into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove ob from mixing bowl.Fold nb into mixing bowl.Put I into mixing bowl.V the nb.Fold pb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold nb into mixing bowl.V the nb.Put y into mixing bowl.Put x into mixing bowl.Fold pb into mixing bowl.Remove pb from mixing bowl.Fold pb into mixing bowl.V the pb.Put H into 9th mixing bowl.Remove I from 9th mixing bowl.Put I into 9th mixing bowl.Stir pb into the 9th mixing bowl.Fold qb into 9th mixing bowl.Fold pb into 9th mixing bowl.Set aside.V until ved.Put pb into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold pb into mixing bowl.Remove pb from mixing bowl.Fold pb into mixing bowl.Put I into mixing bowl.V the pb.Fold qb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold pb into mixing bowl.Put rb into mixing bowl.V the pb.Fold qb into mixing bowl.Put sb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove sb from mixing bowl.Fold pb into mixing bowl.Put I into mixing bowl.V the pb.Fold qb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold pb into mixing bowl.V the pb.Put H into mixing bowl.Fold z into mixing bowl.Put tb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove tb from mixing bowl.Fold qb into mixing bowl.Put I into mixing bowl.V the qb.Fold ub into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold qb into mixing bowl.V the qb.Put z into mixing bowl.Put u into mixing bowl.Fold ub into mixing bowl.Remove ub from mixing bowl.Fold ub into mixing bowl.V the ub.Put H into 9th mixing bowl.Remove I from 9th mixing bowl.Put I into 9th mixing bowl.Stir ub into the 9th mixing bowl.Fold vb into 9th mixing bowl.Fold ub into 9th mixing bowl.Set aside.V until ved.Put ub into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold ub into mixing bowl.Remove ub from mixing bowl.Fold ub into mixing bowl.Put I into mixing bowl.V the ub.Fold vb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ub into mixing bowl.Put wb into mixing bowl.V the ub.Fold vb into mixing bowl.Put xb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove xb from mixing bowl.Fold ub into mixing bowl.Put I into mixing bowl.V the ub.Fold vb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ub into mixing bowl.V the ub.Put w into mixing bowl.Put x into mixing bowl.Put y into mixing bowl.Add z to mixing bowl.Put yb into 5th mixing bowl.Put I into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove yb from mixing bowl.Fold vb into mixing bowl.Put I into mixing bowl.V the vb.Fold zb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold vb into mixing bowl.V the vb.Put t into mixing bowl.Put u into mixing bowl.Put z into mixing bowl.Put Ab into 5th mixing bowl.Put I into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Ab from mixing bowl.Fold zb into mixing bowl.Put I into mixing bowl.V the zb.Fold Bb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold zb into mixing bowl.V the zb.Fold Bb into mixing bowl.Remove Bb from mixing bowl.Fold Bb into mixing bowl.Put H into mixing bowl.V the Bb.Fold Cb into mixing bowl.Put I into mixing bowl.Set aside.V until ved.Fold Bb into mixing bowl.Put Db into mixing bowl.V the Bb.Fold Cb into mixing bowl.Put Eb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Eb from mixing bowl.Fold Bb into mixing bowl.Put I into mixing bowl.V the Bb.Fold Cb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Bb into mixing bowl.V the Bb.Put wb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove wb from mixing bowl.Fold Cb into mixing bowl.Put I into mixing bowl.V the Cb.Fold Fb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Cb into mixing bowl.V the Cb.Put z into mixing bowl.Put u into mixing bowl.Fold Fb into mixing bowl.Remove Fb from mixing bowl.Fold Fb into mixing bowl.Put I into mixing bowl.V the Fb.Fold Gb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Fb into mixing bowl.Put Hb into mixing bowl.V the Fb.Fold Gb into mixing bowl.Put Ib into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Ib from mixing bowl.Fold Fb into mixing bowl.Put I into mixing bowl.V the Fb.Fold Gb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Fb into mixing bowl.V the Fb.Put y into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Hb from mixing bowl.Fold Gb into mixing bowl.Put I into mixing bowl.V the Gb.Fold Jb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Gb into mixing bowl.V the Gb.Put y into mixing bowl.Add I to mixing bowl.Fold y into mixing bowl.Put ob into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Db from mixing bowl.Fold Jb into mixing bowl.Put I into mixing bowl.V the Jb.Fold Kb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Jb into mixing bowl.V the Jb.Put z into mixing bowl.Add I to mixing bowl.Fold z into mixing bowl.Put tb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove rb from mixing bowl.Fold Kb into mixing bowl.Put I into mixing bowl.V the Kb.Fold Lb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Kb into mixing bowl.V the Kb.Put H into mixing bowl.Remove I from mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove b from mixing bowl.Fold Lb into mixing bowl.Put I into mixing bowl.V the Lb.Fold Mb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Lb into mixing bowl.V the Lb.Put Nb into 5th mixing bowl.Put T into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Nb from mixing bowl.Fold Mb into mixing bowl.Put I into mixing bowl.V the Mb.Fold Ob into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Mb into mixing bowl.V the Mb.Fold B into mixing bowl.Fold A into mixing bowl.Put H into mixing bowl.Fold C into mixing bowl.Put A into mixing bowl.Put B into mixing bowl.Put C into mixing bowl.Put H into mixing bowl.Put T into mixing bowl.Put Pb into 5th mixing bowl.Put mb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Pb from mixing bowl.Fold Ob into mixing bowl.Put I into mixing bowl.V the Ob.Fold Qb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Ob into mixing bowl.V the Ob.Fold D into mixing bowl.Put D into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold Qb into mixing bowl.Remove Qb from mixing bowl.Fold Qb into mixing bowl.Put I into mixing bowl.V the Qb.Fold Rb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Qb into mixing bowl.Put Sb into mixing bowl.V the Qb.Fold Rb into mixing bowl.Put Tb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Tb from mixing bowl.Fold Qb into mixing bowl.Put I into mixing bowl.V the Qb.Fold Rb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Qb into mixing bowl.V the Qb.Put H into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Sb from mixing bowl.Fold Rb into mixing bowl.Put I into mixing bowl.V the Rb.Fold Ub into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Rb into mixing bowl.V the Rb.Put D into mixing bowl.Add T to mixing bowl.Fold C into mixing bowl.Put A into mixing bowl.Put B into mixing bowl.Put C into mixing bowl.Put T into mixing bowl.Put Q into mixing bowl.Put kb into 5th mixing bowl.Put mb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove kb from mixing bowl.Fold Ub into mixing bowl.Put I into mixing bowl.V the Ub.Fold Vb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Ub into mixing bowl.V the Ub.Fold E into mixing bowl.Put E into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold Vb into mixing bowl.Remove Vb from mixing bowl.Fold Vb into mixing bowl.Put I into mixing bowl.V the Vb.Fold Wb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Vb into mixing bowl.Put Xb into mixing bowl.V the Vb.Fold Wb into mixing bowl.Put Yb into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Yb from mixing bowl.Fold Vb into mixing bowl.Put I into mixing bowl.V the Vb.Fold Wb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Vb into mixing bowl.V the Vb.Put H into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove Xb from mixing bowl.Fold Wb into mixing bowl.Put I into mixing bowl.V the Wb.Fold Zb into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Wb into mixing bowl.V the Wb.Put E into mixing bowl.Add Q to mixing bowl.Fold C into mixing bowl.Put A into mixing bowl.Put B into mixing bowl.Put C into mixing bowl.Put bb into mixing bowl.Put Q into mixing bowl.Put ac into 5th mixing bowl.Put mb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove ac from mixing bowl.Fold Zb into mixing bowl.Put I into mixing bowl.V the Zb.Fold bc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold Zb into mixing bowl.V the Zb.Fold F into mixing bowl.Put F into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold bc into mixing bowl.Remove bc from mixing bowl.Fold bc into mixing bowl.Put I into mixing bowl.V the bc.Fold cc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold bc into mixing bowl.Put dc into mixing bowl.V the bc.Fold cc into mixing bowl.Put ec into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove ec from mixing bowl.Fold bc into mixing bowl.Put I into mixing bowl.V the bc.Fold cc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold bc into mixing bowl.V the bc.Put H into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove dc from mixing bowl.Fold cc into mixing bowl.Put I into mixing bowl.V the cc.Fold fc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold cc into mixing bowl.V the cc.Put F into mixing bowl.Add Q to mixing bowl.Fold C into mixing bowl.Put A into mixing bowl.Put B into mixing bowl.Put C into mixing bowl.Put db into mixing bowl.Put N into mixing bowl.Put gc into 5th mixing bowl.Put mb into mixing bowl.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove gc from mixing bowl.Fold fc into mixing bowl.Put I into mixing bowl.V the fc.Fold hc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold fc into mixing bowl.V the fc.Fold G into mixing bowl.Put G into mixing bowl.Put H into mixing bowl.Remove I from mixing bowl.Fold hc into mixing bowl.Remove hc from mixing bowl.Fold hc into mixing bowl.Put I into mixing bowl.V the hc.Fold ic into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold hc into mixing bowl.Put jc into mixing bowl.V the hc.Fold ic into mixing bowl.Put kc into mixing bowl.Set aside.V until ved.Fold a into mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove kc from mixing bowl.Fold hc into mixing bowl.Put I into mixing bowl.V the hc.Fold ic into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold hc into mixing bowl.V the hc.Put H into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.Put a into mixing bowl.Remove jc from mixing bowl.Fold ic into mixing bowl.Put I into mixing bowl.V the ic.Fold lc into mixing bowl.Put H into mixing bowl.Set aside.V until ved.Fold ic into mixing bowl.V the ic.Put G into mixing bowl.Add I to mixing bowl.Fold lc into mixing bowl.Put lc into 3rd mixing bowl.Pour contents of the 3rd mixing bowl into the baking dish.Clean 3rd mixing bowl.Put H into mixing bowl.Fold a into 5th mixing bowl.Set aside.V until ved.V until ved.

Serves 1.

Repository

Golfs

-2369: inspired by l4m2's answer, I tweaked the Gourmet code to reduce the expensive comparisons and removed newlines, since for some reason I thought it needed that.

-1815: since the only risk of ingredients being overwritten is when calling recursive functions, the compiler no longer emits instructions for saving the ingredients to the call stack

-3403: a really stupidly simple optimization of the not and bool Recipe macros

-6144: A 6K GOLF WHAT THE- I literally just removed a multiplication from eq now that not can handle negative numbers fine

-997: unrolled most macros emitted by the compiler, allowing for some optimizations. Also optimized the branching logic in the same manner as not

-837: some pretty aggressive Recipe register merging, allowing for a lot of redundant push-pop pairs to be removed

Explanation

FINALLY! After 8 months of working on this, the creation of not one, but two programming languages to abstract over Chef, and the help of many many people over in The Nineteenth Byte, I have done this. I have solved the challenge... in Chef. This will inevitably get shorter as I improve the compiler optimizations.

Forget the explanation, how do I run this?

The official Chef spec is underspecified. Therefore, I have taken the liberty of assuming three things:

  1. The interpreter is capable of handling negative numbers.
  2. The interpeter is capable of handling decimal numbers (implied but not stated outright in the spec).
  3. The Stir instruction does not go past the bottom of the bowl.

Now, with those constraints in place, the only online interpreter I found that follows them is the Esolang Park interpreter. To run the code, simply copy-paste it into the input box. I do suggest setting the delay from 20ms to 0ms, and even then it will take a bit for the code to run.

As for input, Chef does not have any way of inputting strings. Threfore, the input format is as follows: the integer value of each code point, with the string terminated by a 0. Here is a quick Vyxal program to automatically do it for you.

Just get to the point already, how does it work?

Ok ok, I'll get to the point. Remember when I said I created two new languages? Well Chef is a language that is... not exactly well suited for string manipulation. I learned that the hard way, pretty quickly. So I thought, why not make a quick "psuedo assembly language" to compile too it? Surely it cannot be that hard.

That was March 18th of this year. 8 months ago.

Recipe

So I began coding. And coding. And coding. Soon I had a workable "assembly language". It looked something like this (this is a truth machine):

def $input;
read $input;
while $input {
    print 1;
    flush;
};
print 0;

"With the addition of macros," I thought, "this will be able to solve the challenge."

Nuh uh.

I soon realized that while this language made Chef a lot more bearable to deal with, it still wasn't capable of doing this.

But I was resolved to get that 200 rep bounty.

So, on May 27th, I officially named the assembly language "Recipe" and began work on a newer, better language that I called "Gourmet".

Gourmet

Gourmet is a language I made with the explicit aim of being like C. That is, higher-level concepts, compiling down onto a stack machine (which is essentially what Chef is). To make it simpler, I reused my older work on Recipe, and made Gourmet compile down into Recipe first, which then gets compiled into Chef. Over the months, I worked on Gourmet, and it actually turned out to be a pretty nice language. It has monomorphized generics, inlining, all your standard C control flow and operations (except modulo, I still haven't figured out how to implement that in a language with no distinction between intergers and floats. Also no goto.), comments, pointers (heap only), structs, a proper Unit type, and a few compiler optimizations even. About the only C feature it doesn't have is unions (and also function pointers, but that'd be trivial to add, I just don't need of them). As a code sample, have a fibonacci:

fun fib(n: Number): Number {
    if (n == 0) {
        return 0;
    } else if (n == 1) {
        return 1;
    } else {
        return fib(n - 1) + fib(n - 2);
    }
}

@entry
fun main() {
    print(fib(read()));
}

more examples

Our sister site PLDI helped out a lot, particularly the question How to transpile goto to a language that lacks it?. Based on that question, Gourmet uses a giant state machine to implement control flow.

Probably the most interesting proablem I had to solve is pointers and the heap. In Gourmet, pointers are heap-only, as the "stack" is simply stored as Chef ingredients. There's just one tiny problem: Chef is a stack based language. While this makes compiling easier, it also means that there is no way to randomly access something in a stack. So to implement the heap, I did the following: the heap is a Chef stack (or "bowl", as Chef calls them), containing the heap data. Pointers point into this heap, starting at index 0 being the bottom. There is also an "anti heap". When dereferencing a pointer, all values after the requested one are popped off the heap one by one and pushed onto the anti heap. Then the value is get/set, and the reverse happens. If you pay careful attention as the Chef program runs, you will see bowls 7 (the heap) and 8 (the anti heap) juggle values as pointers are en- and de-referenced.

Finally, the program itself

After that bit of detour, let's finally get to the program itself.

fun readInputLower(): String {
    let arr = newArray[Number](0);
    while (true) {
        let input = read();
        if (!transmute[Number, Boolean](input)) {
            break;
        }
        if (input > 96) {
            input -= 32;
        }
        asm[Nothing]("""
            @heap.push [input];
            inc $heapSize;
        """);
        arr.len += 1;
    }
    return transmute[Array[Number], String](arr);
}

fun indexOf(s: String, start: Number, other: String): Number {
    let i = start;
    while (i < s.len) {
        let j = 0;
        while (j < other.len) {
            if (get(s, i + j) != get(other, j)) {
                break;
            }
            j += 1;
        }
        if (j == other.len) {
            return i;
        }
        i += 1;
    }
    return -1;
}

@entry
fun main() {
    let input = readInputLower();
    let startIndex = 0;
    let three = indexOf(input, startIndex, "THREE");
    if (three == -1) {
        return;
    }
    startIndex = three + 5;
    let two = indexOf(input, startIndex, "TWO");
    if (two == -1) {
        return;
    }
    startIndex = two + 3;
    let one = indexOf(input, startIndex, "ONE");
    if (one == -1) {
        return;
    }
    startIndex = one + 3;
    let go = indexOf(input, startIndex, "GO");
    if (go == -1) {
        return;
    }
    print(go + 1);
}

Ok. Let us take apart the first function.

fun readInputLower(): String {
    let arr = newArray[Number](0);
    while (true) {
        let input = read();
        if (!transmute[Number, Boolean](input)) {
            break;
        }
        if (input > 96) {
            input -= 32;
        }
        asm[Nothing]("""
            @heap.push [input];
            inc $heapSize;
        """);
        arr.len += 1;
    }
    return transmute[Array[Number], String](arr);
}

readInputLower does exactly what it says: it reads the program's input as lowercase.

let arr = newArray[Number](0);

This calls a function in the stdlib that creates a new Array[Number] with size 0. Array[T] is a struct with two components: a T pointer data, and a Number len.

while (true) {
    let input = read();

We now start looping for the input. read is a stdlib function that simply reads a number from the Chef input.

if (!transmute[Number, Boolean](input)) {
    break;
}

Now we're getting to the interesting stuff. transmute is a builtin function that performs a "bit cast". That is, it reinterprets the bytes of the input as the given output type. In this case, the Number input is getting converted to a Boolean and NOT-ed. If you're wondering why I'm not simply doing input == 0, it's simple. This produces less code.

if (input > 96) {
    input -= 32;
}

This is an age-old trick to make a character uppercase. Nothing special.

asm[Nothing]("""
    @heap.push [input];
    inc $heapSize;
""");
arr.len += 1;

More cursed code! Yay!

Now while I could theoretically deallocate and reallocate the string/array every time I want to append, this is code golf, and code golf never wastes bytes. Since we know newly allocated objects are always at the end of the heap, we simply... append to the heap! And increment the size, of course. Don't want any memory leaks. We ignore the fact that Gourmet has no free function. Now asm is another one of those builtin functions, and it takes in a Recipe string and a type parameter that tells the compiler what asm returns. In this case, Nothing. Literally. It has a size of 0. Now the Recipe code in there is not inserted verbatim. In order to prevent issues, Gourmet variables are mangled. The [input] code in the asm tells the compiler to replace the [input] with the mangled form of input.

}
return transmute[Array[Number], String](arr);

We transmute again! This time, from an Array[Number] to a String. String is a builtin struct that has the same layout as Array: a Char pointer data, and a Number len. Therefore we can effortlessly transmute between the two.

fun indexOf(s: String, start: Number, other: String): Number {
    let i = start;
    while (i < s.len) {
        let j = 0;
        while (j < other.len) {
            if (get(s, i + j) != get(other, j)) {
                break;
            }
            j += 1;
        }
        if (j == other.len) {
            return i;
        }
        i += 1;
    }
    return -1;
}

There's not really much to explain here, it's just your standard "find substring past this index" function.

@entry
fun main() {
    let input = readInputLower();
    let startIndex = 0;
    let three = indexOf(input, startIndex, "THREE");
    if (three == -1) {
        return;
    }
    startIndex = three + 5;
    let two = indexOf(input, startIndex, "TWO");
    if (two == -1) {
        return;
    }
    startIndex = two + 3;
    let one = indexOf(input, startIndex, "ONE");
    if (one == -1) {
        return;
    }
    startIndex = one + 3;
    let go = indexOf(input, startIndex, "GO");
    if (go == -1) {
        return;
    }
    print(go + 1);
}

Now the good stuff! @entry is an attribute that specifies "hey compiler, listen up. This is where you start executing." There is also @inline, which tells the compiler to inline the function at all call sites. print is a good example of the latter.

let input = readInputLower();
let startIndex = 0;
let three = indexOf(input, startIndex, "THREE");
if (three == -1) {
    return;
}
startIndex = three + 5;

So we read the input string (as uppercase of course), and then we start searching from the start for "THREE". If the index is -1, we know it's not found, and we just return. Otherwise, we set the start index to the index of "THREE" plus the length of "THREE".

let two = indexOf(input, startIndex, "TWO");
if (two == -1) {
    return;
}
startIndex = two + 3;
let one = indexOf(input, startIndex, "ONE");
if (one == -1) {
    return;
}
startIndex = one + 3;
let go = indexOf(input, startIndex, "GO");
if (go == -1) {
    return;
}

Now we do the same with "TWO", "ONE", and "GO".

print(go + 1);

Finally, we print the index of "GO" plus one, which is the index of "O".

Whew! We are done! That took a while. Be sure to like, subscribe and-

But Chef recipes are supposed to be delicious

Shut up.

Janet, 81 bytes

|(peg/match~(*(to"three")(thru"two")(to"one")(to"go")1($))(string/ascii-lower $))

Wolfram Language (Mathematica), 82 bytes

Last@#&@@StringPosition[ToLowerCase@#,"three"~~___~~"two"~~___~~"one"~~___~~"go"]&

Try it online!

Struggled to optimise this more. I feel like there is lots of repeated symbols like ~~ and ___. I tried to do k=___; and then StringExpression@@{"three","two","one","go"}~Riffle~k but could not make this work.

JavaScript (Node.js), 53 bytes

s=>(z=/three.*?two.*?one.*?go/gi).test(s)*z.lastIndex

Attempt This Online!

This outputs 0 for no match, or the index.

The RegExp.lastIndex property (which only works for RegExes that have the g flag enabled) gives the index of the end of the previous match.

AWK, 77 bytes

{if(11<match($0,"[T|t]hree.*?[T|t]wo.*?O|one.*?G|go"))print match($0,"G|go")}

I'm sort of skeptical that my regex-fu is good enough to catch edge cases.

106 bytes

{b=match($0,"[T|t]wo")
c=match($0,"O|one")
d=match($0,"G|go")
print match($0,"[T|t]hree")<b&&b<c&&c<d?d:0}

C#, 106 bytes

using System.Text.RegularExpressions;int F(string s)=>Regex.Match(s,"(?i)(?<=three.*two.*one.*g)o").Index;

Alternate solution, 106 bytes

using System.Text.RegularExpressions;int F(string s)=>Regex.Match(s,"(?i).*three.*two.*one.*go").Length-1;

Try it online!

QBasic, 137 bytes

LINE INPUT s$
w$="three
DATA two,one,go,
1i=i+1
IF LCASE$(MID$(s$,i,LEN(w$)))=w$THEN READ w$:i=i+2
IF""=w$THEN?i-2:END
IF i<LEN(s$)GOTO 1

Explanation

Lacking regex or any string find/split options, we loop through the input one character at a time (mostly) and check for the desired strings.

LINE INPUT s$
w$ = "three"

Read a line of input and store it in s$. Initialize w$ (the current word we're looking for) to three.

DATA two,one,go,

Set the remaining words as DATA that can be read later (plus a trailing empty string after the final comma).

1 i = i + 1

Define label 1 (top of the loop). Increment i (the current character index, one-based).

IF LCASE$(MID$(s$, i, LEN(w$))) = w$ THEN
  READ w$
  i = i + 2
END IF

Take a substring of s$, starting at index i, the same length as w$. Lowercase it. If that equals w$, then read the next word into w$ and skip forward two characters (to avoid incorrectly matching twone).

IF w$ = "" THEN
  PRINT i - 2
  END
END IF

If w$ is now the empty string, we've matched all four words. The current value of i is two more than the one-based index of go, which is also two more than the zero-based index of the o in go. So we subtract two, print it, and end the program.

IF i < LEN(s$) THEN GOTO 1

Otherwise, if i hasn't walked off the end of the string yet, goto the top of the loop. If we've looped through the whole string without finding all four words in order, the program ends without printing anything.

BrainChild, 183 bytes

include*;@string L=alloc(4)L[0]="three"L[1]="two"L[2]="one"L[3]="go"int K int S int i gets()(int c=>{if(K<4&&(c|32)==L[K][S]){if(++S>=L[K].length){S=0K++if(K>3)print(i)}}else S=0i++})

Try It Online!

Ungolfed & Explained

include io.bc;
include extmacros.bc;
include int.bc;
// Sadly the shortest way to make an array of strings.
@string strings=alloc(4);
strings[0]="three"
strings[1]="two"
strings[2]="one"
strings[3]="go"
int state=0;
int score=0;
int i=0;
// Iterate through the input one char at a time
gets()(int c => {
    // If we're not done, and the next character (lowercased via |32) matches the next character in the current string
    if(state<4&&(c|32)==strings[state][score]){
        // Increment the score
        score++;
        // If we've reached the end of the current string
        if(score>=strings[state].length){
            // Reset the score and move to the next string
            score=0;state++;
            // If we've reached the end of the strings, print the current character index
            if(state==4)print(i)
        }
    }else{
        // If the character doesn't match, reset the score
        score=0;
    }
    // Increment the character index
    i++;
})

Bash, 77 bytes

IFS=: read l m<<<`grep -bioP three.*?two.*?one.*?go<<<$1`
echo $((${#m}+l-1))

Attempt This Online! (test cases shamelessly stolen from @manatwork's answer)

Bash + bc, 73 bytes

IFS=: read l m<<<`grep -bioP three.*?two.*?one.*?go<<<$1`
bc<<<${#m}+$l-1

ATO does not ship bc, so no link, sorry.

Use as script or bash function, with input string as first argument.
Outputs -1 if the chefs can't go.

Explanation:

                 grep -                         <<<$1   # in the first argument, match
                            three.* two.* one.* go      # the words anywhere
                         o                              # output only the match
                       b                                # and the index of the start of the match (format is hardcoded "index:match")
                          P        ?     ?     ?        # find words lazily, so the first instance allows the chefs to go
                        i                               # case-insensitive

IFS=:                                                   # set the Internal Field Separator to ':'
      read l m<<<`                                    ` # store output of grep in variables l and m, split input on IFS (implicit)
echo $((${#m}+l-1))                                     # output value of (length of match) + (index of start of match) -1

Python 3.8 (pre-release), 85 bytes

lambda s:([0]<sorted(x:=[*map(s.lower().find,('three','two','one','go'))])==x)*-~x[3]

Try it online!

Solution without regex

Pip, 30 bytes

a~-`three.*?two.*?one.*?go`D$)

Outputs an index, or nothing if the chefs cannot go. Attempt This Online!

Explanation

   `three.*?two.*?one.*?go`     ; Regex, with non-greedy quantifiers
  -                             ; Make it case-insensitive
a~                              ; Find the first match in the program argument
                            $)  ; Get the index of the end of that match
                           D    ; Decrement

TypeScript’s type system, 213 203 bytes

//@ts-ignore
type F<S,A=0,Z=any,B=Lowercase<S>>=B extends`${Z}three${Z}two${Z}one${Z}go${infer D}`?F<B extends`${infer B}go${D}`?B:0,[1]>:A extends 0?0:S extends`${Z}${infer R}`?F<R,[...A,1]>:A["length"]

Try it at the TS playground

Scala 3, 77 bytes

s=>new Regex("(?i)(?<=three.*two.*one.*g)o").findFirstMatchIn(s).map(_.start)

Attempt This Online!

Gema, 38 characters

*\Cthree*two*one*g\Po*=@column@end
*=0

Sample run:

bash-5.2$ gema '*\Cthree*two*one*g\Po*=@column@end;*=0' <<< 'There are three of you here; after this round there will be two; but only one of you will go shop for up to $20,000.'
91

Try it online! / Try all test collected cases online!

Swift, 156 bytes

Short version:

func c(_ s:String)->Int{let s=s.lowercased();return s.ranges(of: /three.*two.*one.*go/).first.map({s.distance(from:s.startIndex,to:$0.upperBound)-1}) ?? 0}

Verbose version:

func c2_(_ s: String) -> Int {
    let s = s.lowercased()
    return s.ranges(of: /three.*two.*one.*go/).first.map({
        s.distance(from: s.startIndex, to: $0.upperBound) - 1
    }) ?? 0
}

C (gcc): 119 113 bytes

main(c,v)char**v;{char*s="go\0.one\0two\0three",*p=*++v;for(c=4;c--;)p+=strcasestr(p,s+4*c)-(int)p;exit(++p-*v);}

Edit: Thanks to everyone helping in improving the answer! :D

  1. As always a minor improvement was made thanks to @ceilingcat (124 -> 122 bytes).
  2. Thanks to @Command Master for getting rid of the prototype (119 -> 113 bytes).

C (gcc -m32): 105 bytes

main(c,v)char**v;{char*s="go\0.one\0two\0three",*p=*++v;for(c=4;c--;)p=strcasestr(p,s+4*c);exit(++p-*v);}

The prototype feels like a huge waste of bytes. Unfortunately, I could not figure out how to work around that. :/

Edit: Using the -m32 flag you can get rid of the prototype entirely (explained in the comments below). Thanks to @Command Master for suggesting this trick. :)

Try it online

Explanation:

main(c,v)char**v;{
    // 's' contains the keywords that are padded with '.' so the pointer can
    // be moved by a fixed value to go to the next keyword.
    //
    // 'p' contains the index of each keyword (eventually the index of 'go').
    // If no match is found 'p' will be NULL and cause a segmentation fault.
    // which indicates that the input does not allow the chefs to go.
    // The sequence is stored in reverse as it saves more space.
    char*s="go\0.one\0two\0three",*p=*++v;

    for(c=4;c--;)
        // The haystack is 'p' instead of v[1] since this discards any characters
        // before the last match which prevent false positives like:
        // "two...three..one..go..."
        //
        // Adds the needle's offset from 'p' to 'p', the casting tricks the
        // compiler to get around the issue of having the declare the prototype
        // of strcasestr().
        p+=strcasestr(p,s+4*c)-(int)p;

    // 'p' has to be incremented as it contains the index of 'g' of 'go'.
    exit(++p-*v);
}

Uiua 0.6.1, 38 bytes

-1⧻⊢⊢regex"(?is).*three.*two.*one.*go"

Try it yourself

Vyxal 3, 24 bytes

ʀ"ỌṚUmn»\6”Ṃ".*?"j∥ẋMṪL+

Try it Online! | Literate mode equivalent (doesn't work)

Explanation:

ʀ"ỌṚUmn»\6”Ṃ".*?"j∥ẋMṪL+­⁡​‎⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏⁠‎⁡⁠⁣⁤‏⁠‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏⁠‎⁡⁠⁤⁣‏⁠‎⁡⁠⁤⁤‏⁠‎⁡⁠⁢⁡⁡‏⁠‎⁡⁠⁢⁡⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏⁠‎⁡⁠⁢⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢⁢‏⁠‎⁡⁠⁢⁢⁣‏⁠‎⁡⁠⁢⁢⁤‏‏​⁡⁠⁡‌­
 "ỌṚUmn»\6”Ṃ".*?"j        # ‎⁡Split "ỌṚUmn»\6” ("three two one go") on spaces and join by ".*?"
ʀ                 ∥ẋM     # ‎⁢Parallel apply regex search and regex match to lowercased input
                     ṪL+  # ‎⁣Add length - 1 to index
💎

Created with the help of Luminespire.

JavaScript (ES11), 40 bytes

-6 bytes thanks to InSync

Returns -1 for invalid inputs.

s=>s.search(/(?<=three.*two.*one.*g)o/i)

Attempt This Online!

Method

Using a lookbehind assertion, we look for the position of the first "o" in the input string which is preceded by the pattern "three.*two.*one.*g".

Python 3, 93 77 bytes

I'm new to regex, so open to golfs. Returns an integer for truthy and a None object for falsy.

lambda n:((x:=re.search("three.*?two.*?one.*?go",n,2))and~-x.end())
import re

Charcoal, 42 bytes

≔θηF⪪”↶⌊¶z₂1γmι.Jχ” ≔✂η⌕↧ηιLη¹η¿⊖LηI⁻Lθ⊖Lη

Try it online! Link is to verbose version of code. Does not output anything for disallowed inputs. Explanation:

≔θη

Make a copy of the input string.

F⪪”....” 

Loop over the four relevant words.

≔✂η⌕↧ηιLη¹η

Slice the string so that it starts at that word. (But if the word is not present, the Find returns -1, which causes the Slice to return the last character.)

¿⊖Lη

If the string still contains at least two characters (which means it begins go), then...

I⁻Lθ⊖Lη

Output 1 more than the number of characters removed.

Retina 0.8.2, 36 bytes

i1M!`.*?three.*?two.*?one.*?g(?=o)
.

Try it online! Link includes test cases. Outputs 0 for disallowed inputs. Explanation:

i1M!`.*?three.*?two.*?one.*?g(?=o)

Keep only the text up to the g of go (or delete the text entirely if it doesn't contain the words in the right order).

.

Count the number of characters remaining.

Retina, 25 bytes

I^iw0`three.*two.*one.*go

Try it online!

The regex is pretty straightforward, all the magic comes from the configuration flags at the beginning:

In practice, w0 will make sure that we return the earliest possible complete match, and is shorter than any other option based on lazy matching (.*?)

Jelly, 24 bytes

“Ç<*tẉ{cIE»Ḳṫw¥ƒŒlL’ȧạ¥L

Try it online!

A monadic link taking a string and returning an integer.

Thanks to @JonathanAllan for pointing out the case-insensitive requirement!

Explanation

“Ç<*tẉ{cIE»Ḳ              | Compressed string "three two one go" split at spaces
            ṫw¥ƒŒl        | Reduce, starting with the main link argument lower-cased, then for each of the strings above, find the first position in the current string and take the tail starting from there
                   L      | Length
                    ’     | Decrease by 1
                     ȧạ¥L | And with absolute difference from this and the length of the original string

R, 51 bytes

regexpr("three.*two.*one.*g\\Ko",scan(,""),,T)[1]-1

Thanks to Bbrk24 for pointing out that \K (you have to use an extra backslash in R) sets where the match is considered to start.

R has a lot of built in regex functions, and this one handily tells you where the first match starts (-1 if there is no match). It's 1-indexed though, so we have to take 1 off (and hence, if the chefs can't go, -2 is returned, but that's less than 11 so we're good).

We need to specify perl=TRUE to use the \K feature. It's cheapest to specify that positionally rather than use pe=T.

two example cases where the code returns 25 for a string where the cooks can go, and -2 for a case where they can't go at all

Depending on conventions for how the input is available, the scan(,"") could turn into a variable (e.g. x) or function (\(x)) saving 8 or 4 bytes respectively.

Perl 5 + -p, 34 bytes

Returns 0 on invalid inputs. Performs a match against the input, using the result to decrement the last position of the match, via @+, by 1 (on successful matches, otherwise 0).

$_=-/three.*?two.*?one.*?go/i+"@+"

Try it online!

05AB1E, 39 37 bytes

lηÅΔηU“„í‚•€µ‚œ“#εXsδÅ¿ƶ0K}.«âε˜D{Q}à

What a mess.. Once again I hate that 05AB1E lacks a builtin to get all matching indices, instead of only the first.. The ηU and εXsδÅ¿ƶ0K} are all to do that manually.. -_-

Will output -1 if it's invalid.

Try it online or verify a few test cases.

Explanation:

l                # Convert the (implicit) input-string to lowercase
 η               # Convert it to a list of prefixes
  ÅΔ             # Get the index of the first prefix that's truthy for
                 # (or -1 if none are):
    η            #  Get the prefixes of the current prefix
     U           #  Pop and store it in variable `X`
    “„í‚•€µ‚œ“   #  Push dictionary string "three two one go"
     #           #  Split it on spaces
      ε          #  Map over all four words:
       X         #   Push the earlier list of prefixes of the prefix
        s        #   Swap so the current word is at the top again
         δ       #   Map over each prefix, using the word as argument:
          Å¿     #    Check whether the prefix ends with the word as substring
            ƶ    #   Multiply each check by its 1-based index
             0K  #   Remove all 0s
      }.«        #  After the map: reduce this list of lists by:
         â       #   Taking the cartesian product of two lists
          ε      #  Map over each combination of values:
           ˜     #   Flatten it to a single list
            D{Q  #   Check if the four indices are in increasing order:
            D    #    Duplicate the list
             {   #    Sort the copy
              Q  #    Check if both lists are still the same
          }à     #  After the map: check if any was truthy
                 # (after which the found index is output implicitly as result)

See this 05AB1E tip of mine (section How to use the dictionary?) to understand why “„í‚•€µ‚œ“ is "three two one go".