text:
convert decimal to duodecimal
The task is to convert a string representing a number in decimal (base 10) representation to duodecimal (base 12). The input is thus a string, the output should be printed.
The input number can be positive and negative, can be integer or rational. The decimal and duodecimal representations will have a finite number of digits after the (duo)decimal point.
The digits for duodecimal should be 0-9, a, b.
The output should not contain trailing zeroes after the duodecimal point and no leading zeroes before the duodecimal point. The duodecimal point should only be printed if the number is non-integer.
examples
input 400 -> output 294
input 14 -> output 12
input 1498 -> output a4a
input -11 -> output -b
input 11.875 -> output b.a6
counter examples
not okay are outputs like "-001a", "00b.300", "1.050".
EDIT: additional assumptions

the number can be represented exactly as float
there are overall less than 7 digits (excluding a minus and a duodecimal point) needed to represent the result.

Can you specify a finite number of digits after the (duo)decimal point? How many digits?

I downvoted the challenge because I think it's too much "does your language have a base conversion built-in that uses this format?"

I thought that code golf wasn't a competition between languages, but rather between programs within languages.  From that perspective, I don't think it's that significant whether a language has a built-in for this.  It just makes that language unintersting for this challenge.

It would have been slightly more interesting if, instead of a and b, the output had to use the duodecimal digits ↊ and ↋. This would have at least helped with the boring built-in answers

Japt, 2 bytes
I feel I must be missing something ...
sC

Try it

Doesn’t round for input 11.825(not entirely sure if it should, but based solely on the example it should be trunctuated to 3 decimal places)

@Quintec, the spec doesn't make any mention of rounding.

sorry, i had mistyped that example. rounding wasn't supposed to be necessary and that after some (at most 5) digits after the duodecimal point you reach the exact result.

C (137 134 bytes)
(thanks for the help Kevin Cruijssen)
l=144;main(b,w){float v;scanf("%f",&v);w=v*l*12;for(w<0&&printf("-",w=-w);b<w;b*=12);for(;(b/=12)>l|w;w%=b)printf(".%x"+(b!=l),w/b);}

Explanation:
Pretty much just an implementation of the base-conversion. This is the algorithm in a readable form:
int main() {
    float v;
    int b, w;
    scanf("%f",&v);
    w=v*1728; // Multiply with 1728, so we can use int-arithmetic
    // Deal with the sign
    if (w<0) {
        printf("-");
        w=-w;
    }
    // Find largest power of 12 we care about
    while (b<w) {
        b*=12;
    }
    // At b == 1728 the fractional part starts.
    while(b > 1728 || w != 0) {
        b /= 12;
        if (b == 1728) {
            printf(".");
        }
        printf("%x",w/b);
        w = w % b;
    }
}

This is then golfed down with fairly standard C-tricks:

Symbols without a type are assumed int.
Use arguments to main to save variable declarations.
First argument to main is initialized to 1 (argc).
Use binary operators instead of control-flow structures.
The branch in the main loop can be removed by instead calculating an index into a single format-string.
Shuffle around some statements and side-effects to save a character here-and-there.
Store 144 into a variable, to not type out that constant so often (the shuffling in the previous step makes 144 a better candidate than 1728).

My personal favorite is probably the w<0&&printf("-",w=-w) part, even though it only saves a character or two compared to the next obvious way - by putting the w=-w as an (unused) argument to printf, we save some parenthesis that would otherwise be needed to group two side-effects into a single expression.

Not sure why it was downvoted, because it seems fine by me, so I upvoted. Two small things to golf (-3 bytes): The brackets {} can be removed for the last loop, and you can put the w<0&&printf("-",w=-w) inside the for-loop to save a byte on the semi-colon: l=144;main(b,w){float v;scanf("%f",&v);w=v*l*12;for(w<0&&printf("-",w=-w);b<w;b*=12);for(;(b/=12)>l|w;w%=b)printf(".%x"+(b!=l),w/b);}

Btw, if you haven't seen it yet: Tips for golfing in C and Tips for golfing in  might both be interesting to read through. Enjoy your stay! :)

Thanks, yeah,  I don't know why I didn't see at least the braces :)

Perl 6, 20 bytes
(+*).base(12).lc.say

Try it online!
The built-in base method on numbers just does the right thing, including for negative numbers and floats.  However, it outputs letters as uppercase, so the lc method call fixes that.

PHP, 96 bytes
It´s lengthy with the decimals, but quite simple with the limited number of digits.
<?="0-"[0<=>$argn],trim(substr($r=base_convert($argn*12**6,10,12),0,-6).".".substr($r,-6),".0");

Save to file, run as pipe with -F
requires PHP 7.0:
older PHP has no spaceship or power operators → parse error
PHP 7.1 understands negative string indexes → negative output for positive input
To fix:
Replace "0-"[0<=>$argn] with "-"[$argn>=0] and insert ?:0 before ;. (→97 bytes)
For PHP 5.5, additionaly replace 12**6 with 2985984. (→99 bytes)
For PHP 5.3 or 5.4, additionally replace the part before the first comma with $argn<0?"-":"". (→100 bytes)
For older PHP, use <?=($r=trim(...))?$argn>0?$r:"-$r":0; (→103 bytes)
breakdown
<?=                             # PHP: echo
"0-"[0<=>$argn],                # 1. print minus (dumped by base_convert) or zero (dumped by trim)
trim(
    substr(
        $r=base_convert(
            $argn*12**6         # 2. multiply input with 6**12
        ,10,12)                 # 3. convert to duodecimal
    ,0,-6)                      # 4. first digits are integer part
    .".".substr($r,-6)          # 5. last 6 digits are fraction
,".0")                          # 6. trim: crop by zeroes and point
;

ZSH with extendedglob, 81 bytes
read l;r=$(([##12]l*12**6));s=${(L)r[1,-7]}.${(L)r[-6,-1]%%0##};echo - ${s%.}

save to file and run in pipe echo "400" | zsh convert.sh
read l         # read from stdin

# $(())        arithmetic mode
# l*12**6      multiply the number by 12^6 (base change can't handle stuff after the decimal point)
# [#12]        print it in base 12
# [##12]       same, without the leading base modifier printed
r=$(([##12]l*12**6));

# (L)          convert letters to lower case
# [1,-7]       pick all but the last 6 characters
# :-0          if these are empty, print 0 instead
# [-6,-1]      and the last 6 characters, respectively
# %            remove the largest trailing match ...
# %%           same, but largest match
# 0##          pattern is an arbitrary amount of zeroes
# .            print a . between the two blocks
s=${(L)r[1,-7]:-0}.${(L)r[-6,-1]%%0##}

# %.           remove trailing .
# -            avoid interpreting a possible minus sign as option
echo - ${s%.}

JS, 17 bytes
a=>a.toString(12)

When run in the console, Javascript implicitly outputs the result.

05AB1E, 29 bytes
Ä6xsm*12BR6ô'.ýR0Ü'.ÜlI0‹i'-ì

Very ugly and long, but it works.. Both the decimals and negative aren't supported during base conversion in 05AB1E, so I have to do things manually..
Try it online or verify all test cases.
Explanation:
Ä                # Take the absolute value of the (implicit) input
                 #  i.e. -11.875 → 11.875
 6x              # Push 6 and 6 doubled (so 12)
   sm            # Swap them, and take the power of each other: 6**12 → 2985984
     *           # Multiply it by the absolute value of the input
                 #  i.e. 2985984 * 11.875 → 35458560.0
      12B        # Convert it to Base-12:
                 #  i.e. 35458560.0 → "BA60000"
R                # Reverse it
                 #  i.e. "BA60000" → "00006AB"
 6ô              # Split it into chunks of size 6
                 #  i.e. "00006AB" → ["00006A","B"]
   '.ý          '# Join the list by "."
                 #  i.e. ["00006A","B"] → "00006A.B"
      R          # Reverse it back
                 #  i.e. "00006A.B" → "B.A60000"
       0Ü        # Remove any trailing zeros
                 #  i.e. "B.A6"
         '.Ü    '# Then remove any trailing dots
                 #  i.e. "B.A6" remains "B.A6"
                 #  i.e. "294." → "294"
            l    # And convert it to lowercase
                 #  i.e. "B.A6" → "b.a6"
I0‹i             # If the input is smaller than 0:
                 #  i.e. -11.875 → 1 (truthy)
    '-ì         '# Prepend a "-"
                 #  i.e. "b.a6" → "-b.a6"
                 # (And output the top of the stack implicitly as result)

Pretty ironic that you need to do this all manually, considering 05AB1E was originally created for the purpose of base conversion...

@Cowabunghole When I created this solution I had the exact same thought as you indeed. :) I'll ask Adnan what he thinks about it.


text:
Hack g-code.js parser
Here you can see g-code parser, written in JavaScript to use in microcontroller (like espruino). But you can run it in browser, because it don't use any specific features.

function gcode(str){
  //Removes comment, parses command name and args
  const [,f,args] = (str.match(/^([GM]\d+) ([^;]+)/) || [,"",""]);
  //A1.2 B43 C -> {A: 1.2, B: 42, C: 0}
  eval(f+"({"+args.replace(/(\w)([\d\.]*)/g,"$1: $2+0,")+"})");
}
const G1 = console.log;
gcode(prompt("crackme"));

When you pass G1 X3 Y4.53 Z42 to gcode(), it runs G1({X: 3, Y: 4.53, Z: 42}). As you can see, it uses eval, protected by regexp. But despite of this, you can attack this function and cause remote code execution. Your goal is to run alert("pwned"). This is code golf, so shortest working input wins

Is alert`pwned`  fine?

I suggest editing the post to say [[your goal is to display a dialog box with the text "pwned", as if alert("pwned") was run]].

@l4m2 if it opens box with "pwned"

112 bytes
G1 $:(ƒ=(Τ,$=+[])=>Τ[$]?Τ[$]+ƒ(Τ,++$+'5'[+[]]*(Τ[$]==':')):'')[ƒ('constructor')](ƒ('alert("pwned")'))()

function gcode(str){
  //Removes comment, parses command name and args
  const [,f,args] = (str.match(/^([GM]\d+) ([^;]+)/) || [,"",""]);
  //A1.2 B43 C -> {A: 1.2, B: 42, C: 0}
  eval(f+"({"+args.replace(/(\w)([\d\.]*)/g,"$1: $2+0,")+"})");
}
const G1 = console.log;

payload = `G1 $:(ƒ=(Τ,$=+[])=>Τ[$]?Τ[$]+ƒ(Τ,++$+'5'[+[]]*(Τ[$]==':')):'')[ƒ('constructor')](ƒ('alert("pwned")'))()`;
gcode(payload);

Each ƒ (U+0192), Τ (U+03A4) cost 2 bytes, they are not as same as ASCII f, T.

The gcode function will keep any /\W/ characters as is. So, we just need to use these characters to write some logic here. The idea is basically based on how JSF**k works. We construct the codes like this:
(()=>{})["constructor"]('alert("pwned")')

We need string literal "constructor" and alert("pwned"). But gcode convert "constructor" to "c: +0,o: +0,n: +0,....r: +0". So we need to convert the string back. We use this function to do the convert:
ƒ=(Τ,$=+[])=>Τ[$]?Τ[$]+ƒ(Τ,++$+'5'[+[]]*(Τ[$]==':')):''

Τ is the text inputed, $ is index. We first initialize $ to 0 using +[]. Then we output the character at the index position, and check if next character is ":", if so we skip the following 5 characters.

Thanks to l4m2, saves few bytes.

Use $=>$ instead?

+'5'[+[]]?

@l4m2 +'5' will convert to string which is incorrect.

I was thinking -~-~-~-~-~$ instead of $-~'4'[+[]] but it turns out to be the same length.

@Neil changed to ++$+'5'[+[]]*(ß[$]==':') anyway

Amazing! I used jsfuck to convert alert("pwned) to about 6K symbols from ()[]+! subset

how it works? It looks like magic

source: Stack Exchange

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

authors: Евгений Новиков

sort: votes


text:
Is the Circuit Possible?
Write a program or function that takes input: all resistors available and a resistance value and outputs a truthy value of whether or not it is possible to get the resistance by using those resistors.
Rules:
Any format for input will do.
There will be at least 1 available resistor and your program should output for at least 10 available resistors.
Resistance of all available resistors and the required resistance will be positive integers.
For available resistors if a fractional value is also possible, the required resistance may be the approximated value.(See example)
Output should be any 2 unique values for Possible and Not possible.
The resistors may be connected in any manner.
Series Resistance:
For n resistances in series: Result=R1+R2+R3+....Rn
Parallel Resistance:
For n resistances in parallel: Result=1/(1/R1+1/R2+1/R3+....+1/Rn)
The circuit may not require all the resistors to get the required resistance (output True if that is the case).
Winner:
This is code-golf so shortest-code wins.
Examples:
R     List
110   220,220 -> True
440   220,220 -> True
550   400,300 -> False
3000  1000,3000 -> True
750   1000,3000 -> True
333   1000,1000,1000 -> True (1000||1000||1000=333.333)
667   1000,1000,1000 -> True ((1000+1000)||1000=666.6666)
8000  1000,1000,7000 -> True
190   100,200,333,344,221 -> True
193   105,200,333,344,221 -> True
400   200,100 -> False

Explanation for the last two examples: https://physics.stackexchange.com/questions/22252/resistor-circuit-that-isnt-parallel-or-series

What bout 3 3 1, 3 3 2?

1.5 is rounded to 2, required resistance will not be given 0(added it to the question), 3 3 will be true

Nice challenge, but I deal enough with EE as it is...

I guess Machematica win?

Would you mind adjusting your test cases to more clearly separate the list of resistors from the target resistance for each example?

Also, suggested test case: [10,200], 400 -> False assuming you don't want to let answers use the same resistor multiple times.

This problem is harder than the description makes it sound because general resistor circuits can't be broken down recursively into series and parallel parts, in more complicated ways than the last two test cases. 10 resistors should be easily enough to make such examples. I suspect that none of the currently posted answers work in general, and a correct answer needs to have matrix inversion in some form.

If you intend to allow arbitrary circuits, you probably need a description of Kirchhoff's laws.

Rounding <0.5 down I assume, so three 1 Ohm resistors in parallel results in a superconductor?

@Penguino Technically yes, but the required resistance will never be 0 in the problem.

Python 3, 253 bytes
import functools
def p(l): return functools.reduce(lambda z,x:z+[y+[x]for y in z],l,[[]])
print(l[-1:][0]in[round(a)for a in[sum(a)for a in p([sum(a)for a in p(l)]+[1/sum(c)for c in[[1/b for b in a if b!=0]for a in p(l).copy()]if sum(c)!=0])]])

I take the powerset of all resistor values and then calculate the sums for series and 1/sum(1/values) for paralel and then I take a powerset of these two sets. When you take the sum of all the subsets and put them into a set then this set eiter contains the value or not. -> return True/False
@stephen thanks :)

Welcome to PPCG! If you need any imports, they need to be included in your code. Additionally, you need to take inputs yourself, rather than assuming the input is in a variable. Also, b != 0 -> b!=0.

As Stephen saod, you can't take input through a pre-defined variable, otherwise this is a snippet, which is not allowed. You should change it to either a function, or a full program

It doesn't work for the third test case (also, golfed a bit and with proper input. if you're worried I broke something, your original code doesn't work either)

dammit. Ill have a look :(

Japt, 52 bytes
à má

ÈÊ<2?X:X¯1 ïXÅgW @[X+Y1/(1/XÄ/Y]Ãc
mmW c mr øV

Try it!
This was a tough one, and I had to do a couple of strange things to make it work. I can't mathematically prove that this works for everything, but it works for all the test cases as well as my extra proposed test case. Specifically, I know that the function I define called W gives different results depending on the order of the resistors in its input so I run it on each possible ordering of each possible combination of resistors. I also know that it will produce a list of resistances that are all possible to create using the input resistors. I don't know with 100% certainty that those two things together end up with every possible resistance.
Explanation:
à       Get each combination e.g. [1,2,3] -> [[1,2,3],[1,2],[1,3],[2,3],[1],[2],[3]]
  m     For each combination...
   á    Get each order e.g. [1,2,3] -> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

    Skip a line to avoid overwriting the target resistance

È                                     Define a function W taking an array input X:
 Ê<2?X                                  If X is only 1 resistor, return it as-is
            XÅgW                        Get the resistances from applying W to the tail of X
       X¯1 ï                            Pair the first resistor with each possible tail resistance
                 @[            ]Ã       For each pair get these two values:
                   X+Y                    Those resistances in series
                      1/(1/XÄ/Y           Those resistances in parallel
                                 c      Collapse all those resistances into a single flat list

mmW            For each combination and order, get the resistances using W
    c          Collapse to a single list of resistances
      mr       Round each one
         øV    Return true if the target resistance is in the list, false otherwise

Ruby, 153 bytes
f=->v,r{[r]-v==[]||r[1]&&[*2..v.size].any?{|n|v.permutation.any?{|l|[l[0,n].sum,(1.0/l[0,n].reduce(0){|s,x|s+1.0/x}).round].any?{|b|f[l[n..-1]+[b],r]}}}}

Try it online!
Brute force. I mean it.

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


text:
Find the pattern
I feel tired to do "find the pattern" exercise such as
1 2 3 4 (5)
1 2 4 8 (16)
1 2 3 5 8 (13)

Please write a program that finds the pattern for me.
Here, we define the pattern as a recurrence relation that fits the given input, with the smallest score. If there are multiple answers with the same smallest score, using any one is fine.
Let the \$k\$ first terms be initial terms (for the recurrence relation, etc.), and the \$i\$'th term be \$f(i)\$ (\$i>k,i\in\mathbb N\$).

A non-negative integer \$x\$ adds\$\lfloor\log_2\max(|x|,1)\rfloor+1\$  to the score
The current index \$i\$ adds \$1\$ to the score
+, -, *, / (round down or towards zero, as you decide) and mod (a mod b always equal to a-b*(a/b)) each add \$1\$ to the score
For each initial term \$x\$, add \$\lfloor\log_2\max(|x|,1)\rfloor+2\$  to the score
\$f(i-n)\$ (with \$n\le k\$) adds \$n\$ to the score. E.g. Using the latest value \$f(i-1)\$ add \$1\$ to the score, and there must be at least 1 initial term.
Changing the calculation order doesn't add anything to the score. It's fine if you write 1+i as 1 i +, +(i,1) or any format you like.

Samples:
input   -> [score]    expression
1 2 3 4     -> [1]    f(i) = i
1 2 4 8     -> [5]    f(1) = 1, f(i) = f(i-1)+f(i-1)
1 2 3 5 8   -> [9]    f(1) = 1, f(2) = 2, f(i) = f(i-1)+f(i-2)

Shortest program in each language wins. It's fine if your program only solve the problem theoretically.

Should 1, 2, 4, 8 be f(1) = 1, f(i) = f(i - 1) + f(i - 1)? And how current score 5 got?

f(1) = 1 is 2 points, f(2) = 2 is 3 points, f(i-1) is 1 point, + is 1 point, f(i-2) is 2 points. So f(1) = 1, f(2) = 2, f(i) = f(i-1) + f(i-2) is 9 points. Where am I wrong?

@tsh Fixed issues. Data generated by hand

+1 how is the 1,2,4,8 scored at 5? I see an "initial term x" of 1 adding two, "the current index i" twice adding one each, "two non-negative integer x" both with value 1 each adding one, and a +adding one. This makes seven, but I could easily be misinterpreting something.

@JonathanAllan The 1 in f(i-1) doesn't count as integer itself

Ahh "f(i−n)  (with n≤k) adds n to the score". This is all quite hard to follow :D Might be worth showing the scoring of some examples.

@JonathanAllan Also note that f cannot be used directly in the expression of f, except as f(i-n). (for example f(i÷2) cannot be used)

Does this answer your question? What comes next?

Python, 554 bytes
lambda s:next((s[:i],x)for n in N()for i in R(A(s))if(b:=sum(map(lambda k:A(bin(abs(k)))-1,s[:i])))<n for x in X(n-b,i)if all(E(s,x,j)==s[j]for j in R(i,A(s))))
E=lambda s,x,i:x if int==type(x)else i+1if"i"==x else s[i-x[1]]if"@"==x[0]else.5if(r:=E(s,x[2],i))==0else[(l:=E(s,x[1],i))+r,l-r,l*r,l//r,l%r]["+-*/%".index(x[0])]
A=len
R=range
def X(k,i):
 for x in["i",0]*(k==1)+[["@",k]]*(k<=i)+[[op,l,r]for a in R(1,k-1)for r in X(k-a-1,i)for l in X(a,i)for op in"+-*/%"if k>2]:yield x
 for n in R(2**(k-1),2**k):yield n
def N(k=0):
 while 1>0:k+=1;yield k

Attempt This Online!
running the test-cases takes approximately 30 seconds
The running time is at exponential in the score, so the program may take extremely long to finish if the sequence has a score of more than 10
Output format:

array of initial values
expression for remaining values

i: index, integers -> constants
["@",k] -> f(i-k) (for k any integer)
[op,l,r] -> l op r (l,r expressions; op operation)

Uses % for mod (I can change it if it is a problem)
for example: ([1, 1], ['+', ['@', 1], ['@', 2]]) -> f(1)=f(2)=1, f(i)=f(i-1)+f(i-2)
Explanation
Go through all expressions in order of score
expressions(k,i) (golfed: X) generates all expressions with score k and i initial elements
check and evaluate (golfed: in-lined/E) evaluate the expression to check if it generates the sequence
The main function goes through all expressions ordered by score and returns the first expression that computes the sequence.
ungolfed version:
def evaluate(seq,expr,i):
 if type(expr)==int:
  return expr
 if expr=="i":
  return i+1
 if expr[0]=="@":
  return seq[i-expr[1]]
 if expr[0]=="+":
  return evaluate(seq,expr[1],i)+evaluate(seq,expr[2],i)
 if expr[0]=="-":
  return evaluate(seq,expr[1],i)-evaluate(seq,expr[2],i)
 if expr[0]=="*":
  return evaluate(seq,expr[1],i)*evaluate(seq,expr[2],i)
 if expr[0]=="/":
  return evaluate(seq,expr[1],i)//evaluate(seq,expr[2],i)
 if expr[0]=="%":
  return evaluate(seq,expr[1],i)%evaluate(seq,expr[2],i)

def check(seq,n_initTerms,expr): ## check if expr is an expression for this sequence
 try:
  for i in range(n_initTerms,len(seq)):
   if not evaluate(seq,expr,i)==seq[i]:
    return False
  return True
 except:
  return False

def expressions(k,i):
 if k==1:
  yield "i"
 if k<=i:
  yield ["@",k]
 if k>2:
  for a in range(1,k-1):
   for op in "+-*/%":
    for l in expressions(a,i):
     for r in expressions(k-a-1,i):
      yield [op,l,r]
 for n in range(2**(k-1),2**k):
  yield n
 if k==1:
  yield 0

def find(seq):
 n=1;
 while True:
  for i in range(len(seq)-1):
   base_score=sum(map(lambda k:len(bin(abs(k)))-2,seq[:i]))
   if base_score<n:
    for expr in expressions(n-base_score,i):
     if check(seq,i,expr):
      return (seq[:i],expr)
  n+=1

Python, 613 bytes
lambda s:min((sum(map(L,s[:i]))+S(s,x),k,s[:i],x)for k in range(2**sum(map(L,s)))if all(E(s,x:=B(k//A(s),i:=k%A(s)),j)==s[j]for j in range(k%A(s),A(s))))[2:]
I=int
A=len
L=lambda k:A(bin(abs(k)))-1
S=lambda s,x:L(x)-1if I==type(x)else 1if"i"==x else x[1]if"@"==x[0]else S(s,x[1])+S(s,x[2])+1
E=lambda s,x,i:x if I==type(x)else i+1if"i"==x else s[i-x[1]]if"@"==x[0]else.5if(r:=E(s,x[2],i))==0else[(l:=E(s,x[1],i))+r,l-r,l*r,l//r,l%r]["+-*/%".index(x[0])]
B=lambda k,i:[q:=(k-i)//3,"i"if k==0else["@",k]if k<=i else[q,-q][r]if(r:=(k-1)%3)<2else["+-*/%"[q%5],B(I((r:=bin(q//5))[2::2],2),i),B(I("0"+r[3::2],2),i)]][1]

Attempt This Online!
ungolfed version

Could you explain what this output would mean? ([1, 2], ['%', 40, ['*', 'i', 'i']])

@Simd f(1)=1,f(2)=2,f(i)=(i*i)%40

I am probably being stupid but that is supposed to make 1,2,4,8,15 but doesn’t seem to.  3*3%40=9 doesn’t it?

@Simd I made a typo, I meant 40%(i*i)

Python3, 1488 bytes:
A rather long approach, but designed to be fast, especially on more common recursive sequences. Explanation of notation coming soon.
from math import*
E=enumerate
def V(s,e):
 e,W=e
 if[0,0]==e[:2]:return all(i==e[-1]for i in s)
 if[0]==e[:1]:return all(a==e[1]*i+e[2]for i,a in E(s,1))
 return all(sum(N*s[i-(W-I)-1]for N,(I,_)in e[0])+i*e[1]+e[2]==a for i,a in E(s,1)if i>max(W-j for _,(j,_)in e[0]))
def C(s,c=[]):
 if[]==s and c:yield c;return
 if s:yield from[*C(s[1:],c+[s[0]]),*C(s[1:],c)]
I=lambda V,i:{(0,V),(V//i,V%i)}
def W(x,y):
 t=[[x,1,0],[y,0,1]]
 while t[-1][0]:q=t[-2][0]//t[-1][0];r=t[-2][0]%t[-1][0];t+=[[r,t[-2][1]-q*t[-1][1],t[-2][2]-q*t[-1][2]]]
 return t[-2]
def D(a,b,x,y,g):
 q=[(0,1,x,y),(0,-1,x,y)]
 while q:
  m,d,X,Y=q.pop(0);m+=d
  if all([X,Y]):yield(X,Y)
  J,K=x+m*(b/g),y-m*(a/g)
  if abs(X)+abs(Y)>abs(J)+abs(K)or 0==all([X,Y]):q+=[(m,d,J,K)]
def f(s):
 for O in range(1,len(s)):
  for J in sorted(C([*E(s)][:O][::-1]),key=len):
   if len(J)==1:
    yield([0,s[O]//(O+1),s[O]%(O+1)],O)
    for u in I(s[O]%J[0][1],O+1):
     j=s[O]//J[0][1]
     yield([[(1,J[0])for _ in range(j)],*u],O);yield([[(j,J[0])],*u],O)
   else:
    q=[(J[0][1],[(1,J[0])],J[1:],s[O])]
    while q:
     x,R,S,v=q.pop(0)
     if[]==S:
      for u in I(v,O+1):yield([R,*u],O)
      continue
     y=S[0][1]
     for i in range(v-1):
      if 0==(v-i)%gcd(x,y):
       g,a,b=W(X:=max(x,y),Y:=min(x,y))
       G=(v-i)//g;A,B=[b,a][x>y]*G,[a,b][x>y]*G;
       A,B=min(D(X,Y,A,B,g),key=lambda x:sum(map(abs,x)))
       q+=[(v-i,[(A*z,l)for z,l in R]+[(B,S[0])],S[1:],i)]
def F(s):
 for i in f(s):
  if V(s,i):return i

Try it online!


text:
Split it. But not all!
Inspired by this StackOverflow question.
Input:
We'll take three inputs:

A delimiter-character D to split on
A character I between two of which we ignore the delimiter character (I know, that sounds vague, but I'll explain it below)
A string S

Output:
A list/array containing the substrings after the split.
Example:
Input:
D = ','
I = '"'
S = '11020199,"Abc ",aduz,,444,bieb,dc,2 ,2222.00,whatever 5dc,222.22,22.00,"98,00","12,000,000",21-09-2018, 06:00,",-,"'

Output:
['11020199', 'Abc ', 'aduz', '', '444', 'bieb', 'dc', '2 ', '2222.00', 'whatever 5dc', '222.22', '22.00', '98,00', '12,000,000', '21-09-2018', ' 06:00', ',-,']

Why? Splitting on comma would normally also split 98,00, 12,000,000 and ,-, in two/three pieces. But because they are within the I input character, we ignore ignore the split here.
Challenge rules:

You can assume there will always be an even amount of I characters in the input-string.
You can assume the character I will always have a D next to it (except when it's the first or last character of the input) which can still be properly split. So you won't have something like D = ','; I = '"'; S = 'a,b"c,d"e,f', nor anything like this D=','; I='"'; S='a",b,"c'.
The input-string S could contain none of either D or I. If it contains no D, we output a list with the entire input-string as only item.
The output list won't contain the character I anymore, even when it contained no D (as you can see at the "Abc " becoming 'Abc ' in the example above).
It is possible that the substring within I contains only D. For example: D = ','; I = '"'; S = 'a,",",b,"c","d,e,,",f' would result in ['a', ',', 'b', 'c', 'd,e,,', 'f'].
You can assume that D will never be at the start or end of S, so you won't have to deal with trailing / leading empty items.
When an input has two adjacent D, we'll have an empty item. I.e. D = ','; I = '"'; S = 'a,"b,c",d,,e,"",f' would result in ['a', 'b,c', 'd', '', 'e', '', 'f'].
You can assume the inputs and outputs will only contain printable ASCII in the range [32, 126] (so excluding tabs and newlines).
You are also allowed to output all items new-line delimited instead of returning/outputting a list/array (especially for those languages that don't have lists/arrays; i.e. Retina).
You are allowed to output the list in reversed order if it saves bytes. You are not allowed to output it in sorted or 'shuffled' order, though. So D = ','; I = 'n'; S = 'a,2,b,3,c' can be output as [a,2,b,3,c] or [c,3,b,2,a], but not as [2,3,a,b,c,] or [a,3,b,c,2] for example.

General rules:

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code (i.e. TIO).
Also, adding an explanation for your answer is highly recommended.

Test cases:
Input:
D = ','; I = '"'; S = 'a,"b,c",d,,e,"",f'
Output:
['a', 'b,c', 'd', '', 'e', '', 'f']

Input:
D = ','; I = '"'; S = '11020199,"Abc ",aduz,,444,bieb,dc,2 ,2222.00,whatever 5dc,222.22,22.00,"98,00","12,000,000",21-09-2018, 06:00,",-,"'
Output:
['11020199', 'Abc ', 'aduz', '', '444', 'bieb', 'dc', '2 ', '2222.00', 'whatever 5dc', '222.22', '22.00', '98,00', '12,000,000', '21-09-2018', ' 06:00', ',-,']

Input:
D = ' '; I = ','; S = 'this is a test , to see if you understand it, or not , hmmm, I think I have too many commas , or not , perhaps..'
Output:
['this', 'is', 'a', 'test', ' to see if you understand it', 'or', 'not', ' hmmm', 'I', 'think', 'I', 'have', 'too', 'many', 'commas', ' or not ', 'perhaps..']

Input:
D = 'x'; I = 'y'; S = 'contains no lowercase X nor Y'
Output:
['contains no lowercase X nor Y']

Input:
D = '1'; I = '3'; S = '3589841973169139975105820974944592078316406286208948254211370679314'
Output: ['58984197', '69', '9975105820974944592078', '64062862089482542', '', '70679', '4']

Input:
D = ' '; I = 'S'; S = 'regular split on spaces'
Output:
['regular', 'split', 'on', 'spaces']

Most (or all?) of the current answers do not have empty items at the beginning and end of test case 6. Is this a special case, or an error in the testcases? ("", "'ll remove all ", "")

@TFeld It's a special case. Almost all answers also fail for D = ','; I = '"'; S = ',"a,b",c,,d,""' I just noticed. I'll modify the challenge a bit so empty items won't be possible at the start or end. Based on experience in both Java and 05AB1E in the past, I know how frustrating empty items after split can be to fix manually when the language doesn't do it correctly by default. A test cases like this should still be supported: D = ','; I = '"'; S = 'a,"b,c",d,,e → ['a', 'b,c', 'd', '', 'e'] with an empty item in between.

Is it required that the final output maintain the order of the input? e.g. '1,"2,3"' -> ['2,3','1']

@KamilDrakari Hmm, I'll add a rule to allow it both forward and backward, but not shuffled. So [a,b,c] and [c,b,a] are allowed outputs, but [a,c,b] or [b,a,c] not for example.

What should be the result of D=','; I='"'; S='a",b,"c' or is it even a valid input?

@Zgarb No, that's not a valid input. I'll see if I can change that sentence a bit ("You can assume the character I will always have a D next to it (except when it's the first or last character of the input)."), since that explanation currently does allow that kind of test cases..

Japt, 16 bytes
qV mÏu ?X:XrWRÃq

Try it!
Basically the same strategy as DLosc's newer Pip answer, sets aside the "quoted" sections then replaces the delimiter with a newline in the rest of the string, resulting in a newline delimited output
Full explanation:
qV                  Split on I
   m          Ã     For each segment:
    Ïu ?              If the segment has an odd index (quoted)...
        X             Keep it as-is
         :          Otherwise:
          XrWR        Replace each D in the segment with a newline
               q    Join it all to a single string

Note that even if the first item is quoted, it will still end up at index 1 not index 0. If q finds a delimiter as the first character, it makes the first item in the split (index 0) an empty string, so the contents of the quote correctly become the second item (index 1). Here is a demo of correctly dealing with a leading quote.

I just saved some bytes by replacing D with newline outside the quotes and splitting on newline, thereby removing the need to replace newline with D at the end. Could that shorten your code too?

@DLosc Indeed, thanks for the suggestion! Putting in a new version now

R, 34 bytes
Regular unmodified scan with the appropriate arguments for text, sep and quote should do it.
function(D,I,S)scan(,t=S,"",,,D,I)

Try it online!

As usual, R leading the way on string splitting challenges.

Talk about the right language for the job. :) Verified a few test cases, and they all seem to work fine, so +1 from me. PS: Taking input by storing it in a variable isn't allowed according to the meta.

@KevinCruijssen Can I submit scan for 4 bytes and then call it with the arguments in the appropriate places?

@J.Doe Umm.. I dunno. Not too familiar with the possible acceptable input formats for R tbh. As far as I know using a full program with program arguments  or STDIN, as well as a (lambda) function with the appropriate parameters or also using STDIN are acceptable by default. In the meta post I linked earlier all valid input-formats (with a positive score) are mentioned. How this works for R I don't know.

@J.Doe your submission right now is a full program, and it currently does not take input from stdin. The shortest solution would be to wrap it into a function.

Changed. If it's acceptable I will simply have the scan function as a 4 byte submission called with the arguments in the appropriate positions. @Giuseppe

@J.Doe I don't know what the convention is for this; you'd need to pass scan named arguments or else pass NULL arguments as well. Either way a meta question is probably appropriate.

C (gcc), 64 bytes
c;f(d,i,s)char*s;{for(;*s;s++)*s==i?c=!c:putchar(d-*s|c?*s:10);}

Try it online!
JavaScript (Node.js), 57 bytes
(d,i,s)=>s.replace(c=/./g,e=>i==e?(c^=1,''):d!=e|c?e:`
`)

Try it online!

Your C answer works great, but your JS answer seems to still split on D within I as well as contains I in the output, which can also be seen in the first test cases in your TIO link. (PS: It might also be better to post them as separated answers, with a link stating it's a port of your C answer.)

@KevinCruijssen Fixed. Usually I post similar answers together, and only say it's a port if it's from others' work

Pip, 18 bytes
FxcxQb?!:oOo?xRanx

Takes inputs as command-line arguments. Try it online!
Completely different approach: process the string one character at a time and output the desired results newline-delimited.
How?
                    a,b,c are cmdline args (respectively representing D,I,S); o is 1;
                    n is newline (implicit)
                    We use o for a flag indicating whether or not to change D into newline
Fxc                 For each character x in c:
   xQb?              If x equals b (the ignore character),
       !:o            Logically negate o in-place
          O          Else, output the following (with no trailing newline):
           o?         If o is truthy,
             xRan      x, with a (the delimiter) replaced with newline
                 x    Else, x unchanged

Python 2, 67 bytes
import csv
lambda D,I,S:next(csv.reader(S,delimiter=D,quotechar=I))

Try it online!
Python 2, 71 bytes
D,I,S=input()
k=1
for p in S.split(I):print p.replace(D*k,'\n'*k),;k^=1

Try it online!

MATL, 24 bytes
y=Yso~yi=*~*cO10Zt2G[]Zt

Inputs are S, I, D.
Try it online! Or verify all test cases.
How it works
Consider inputs D = ','; I = '"'; S = 'a,"b,c",d,,e,"",f'.
y     % Implicit inputs: S, I. Duplicate from below
      % STACK: 'a,"b,c",d,,e,"",f', '"', 'a,"b,c",d,,e,"",f'
=     % Is equal? Element-wise
      % STACK: 'a,"b,c",d,,e,"",f', [0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0]
Ys    % Cumulative sum
      % STACK: 'a,"b,c",d,,e,"",f', [0 0 1 1 1 1 2 2 2 2 2 2 2 3 4 4 4]
o~    % Parity, negate
      % STACK: 'a,"b,c",d,,e,"",f', [1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1]
y     % Duplicate from below
      % STACK: 'a,"b,c",d,,e,"",f', [1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1], 'a,"b,c",d,,e,"",f'
i=    % Input: D. Is equal? Element-wise
      % STACK: 'a,"b,c",d,,e,"",f', [1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1], [0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0]
*~    % Multiply, negate (equivalent to NAND). Element-wise
      % STACK: 'a,"b,c",d,,e,"",f', [1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 0 1]
*     % Multiply, element-wise. Characters are converted to ASCII code
      % STACK: [97 0 34 98 44 99 34 0 100 0 0 101 0 34 34 0 102]
c     % Convert to char (character 0 is shown here as '·')
      % STACK: 'a·"b,c"·d··e·""·f'
O10   % Push 0 and then 10
      % STACK: 'a·"b,c"·d··e·""·f', 0, 10
Zt    % Replace character 0 by character 10 (newline; shown here as '¶')
      % STACK: 'a¶"b,c"¶d¶¶e¶""¶f'
2G[]  % Push second input (I) and then [] (empty array)
      % STACK: 'a¶"b,c"¶d¶¶e¶""¶f', '"', []
Zt    % Replace character given by input I by empty; that is, remove it. Implicit display
      % STACK: 'a¶b,c¶d¶¶e¶¶f'

Retina, 45 bytes
L$`(?=.*¶(.)¶(.))(\2(.*?)\2|(.*?))(\1|¶)
$4$5

Try it online! Explanation:
(?=.*¶(.)¶(.))(\2(.*?)\2|(.*?))(\1|¶)

Look ahead to find the values of D and I on the following two lines. Then, if we find an I then eat it and match the characters to the next I and D, otherwise just match characters to the next D or the end of the line.
L$`
$4$5

List captures 4 and 5 from each match; 4 is the capture between two Is while 5 is the capture between two Ds.

Powershell, 71 bytes
param($d,$i,$s)$s-split{(1-($script:a+=$i-ceq$_)%2)*($d-ceq$_)}|% *m $i

Less golfed test script:
$f = {

param($d,$i,$s)
$s-split{
    $script:a+=$i-ceq$_
    (1-$a%2)-and($d-ceq$_)
}|% Trim $i

}

@(
    ,(',','"',
    '',
    '')

    ,(',','"',
    'a,"b,c",d,,e,"",f',
    'a', 'b,c', 'd', '', 'e', '', 'f')

    ,(',','"',
    '11020199,"Abc ",aduz,,444,bieb,dc,2 ,2222.00,whatever 5dc,222.22,22.00,"98,00","12,000,000",21-09-2018, 06:00,",-,"',
    '11020199', 'Abc ', 'aduz', '', '444', 'bieb', 'dc', '2 ', '2222.00', 'whatever 5dc', '222.22', '22.00', '98,00', '12,000,000', '21-09-2018', ' 06:00', ',-,')

    ,(' ',',',
    'this is a test , to see if you understand it, or not , hmmm, I think I have too many commas , or not , perhaps..',
    'this', 'is', 'a', 'test', ' to see if you understand it', 'or', 'not', ' hmmm', 'I', 'think', 'I', 'have', 'too', 'many', 'commas', ' or not ', 'perhaps..')

    ,('x','y',
    'contains no lowercase X nor Y',
    'contains no lowercase X nor Y')

    ,('1','3',
    '3589841973169139975105820974944592078316406286208948254211370679314',
    '58984197', '69', '9975105820974944592078', '64062862089482542', '', '70679', '4')

    ,(' ','S',
    'regular split on spaces',
    'regular', 'split', 'on', 'spaces')

) | % {
    $d,$i,$s,$expected = $_
    $result = &$f $d $i $s
    "$("$result"-eq"$expected"): $result"
}

Output:
True:
True: a b,c d  e  f
True: 11020199 Abc  aduz  444 bieb dc 2  2222.00 whatever 5dc 222.22 22.00 98,00 12,000,000 21-09-2018  06:00 ,-,
True: this is a test  to see if you understand it or not  hmmm I think I have too many commas  or not  perhaps..
True: contains no lowercase X nor Y
True: 58984197 69 9975105820974944592078 64062862089482542  70679 4
True: regular split on spaces

Explanation:

The script block in the -split{...} specifies rules for applying the delimiter. See about_split.
$script:a=... sets the variable a in outer scope.
-ceq means case-sensitive equation.
|% trim $i calls a method trim with argument $i.

Pip -n, 29 24 bytes
cR Xa[na]@(bN{$`})^n||:b

Takes inputs as command-line arguments. Try it online!
Strategy: outside I pairs, replace D with newline (since we're guaranteed that newlines won't appear in the string). Then split on newline and strip I.

SNOBOL4 (CSNOBOL4), 109 bytes
	D =INPUT
	I =INPUT
	S =INPUT
S	S (I ARB . OUTPUT I | ARB . OUTPUT) (D | RPOS(0)) REM . S	DIFFER(S)	:S(S)
END

Try it online!
Suppose that D =',' and I ='"'. Then the pattern (I ARB . OUTPUT I | ARB . OUTPUT) (D | RPOS(0)) matches strings that look like ".*" or .* followed either by , or by the end of the string, and OUTPUTs the arbitrary (.*) characters, setting the unmatched REMainder to S and iterating so long as S is not empty.

Jelly,  20  18 bytes
;`j⁵œṣ⁴œṣḊṖYʋ€Ðo³Y

A full program taking the three arguments D, I, S which prints each item on a line.
Try it online! (Footer joins with newlines)
How?
Surround with an extra D on each side, split at Is, split the odd-indexed items at Ds then remove their heads and tails and join them with newlines, finally join the result with newlines.

I think list output (as opposed to returning a list) needs to be delimited somehow, so you can tell 1) that it's a list at all, and 2) where one item ends and another begins. (I don't have a specific meta post to back that up, but there is a certain relatedness to the discussion on non-observable behavior. Right now, it's not observable that your program outputs a list rather than, say, a string.)

So I guess I can replace the tighten with a join by newlines (which will return a list of lists of characters mixed with characters yet as a full program will print the items on new lines).

...so 17 with `;`j⁵œṣ⁴œṣḊṖɗ€Ðo³Y`

@JonathanAllan Your 20-byte solution works as intended, but your 17-byter in the comment seems to give some incorrect results.

@KevinCruijssen - yep, mobile golf no good, I missed the join by newlines for the odd-indexed items, 18 posted.

PHP, 50 bytes
function q($D,$I,$S){return str_getcsv($S,$D,$I);}

Try it online! Uses a built-in function.
If rearranging the inputs is allowed ((S,D,I) so it matches the str_getcsv signature), I have a 44 byte version.

I believe that rearranging input is allowed, as long as you specify the order. To make it clearer, you can use the variables $S, $D and $I with a cost of 0 bytes, for this 50 byte long version.

Also, the 50 bytes version, with the $S, $D, $I variables could serve as a guide for the order of the arguments.


text:
Seeking Substantial Subcollections
(thanks to @JonathanFrech for the title)
Challenge
Write a program or function that, given a collection of positive integers \$S\$ and a positive integer \$n\$, finds as many non-overlapping subcollections \$T_1, T_2, ..., T_k\$ of \$S\$ as possible, such that the sum of every \$T_m\$ is equal to \$n\$.
Example
Given \$S=\lbrace1,1,2,2,3,3,3,5,6,8\rbrace\$ and \$n=6\$, you could take the following subcollections to get \$k=3\$:

\$T_1=\lbrace1,1,2,2\rbrace\$
\$T_2=\lbrace3,3\rbrace\$
\$T_3=\lbrace6\rbrace\$

And the remaining elements \$\lbrace3,5,8\rbrace\$ are not used. However, there is a way to get \$k=4\$ separate subcollections:

\$T_1=\lbrace1,2,3\rbrace\$
\$T_2=\lbrace1,5\rbrace\$
\$T_3=\lbrace3,3\rbrace\$
\$T_4=\lbrace6\rbrace\$

This leaves \$\lbrace2,8\rbrace\$ unused. There is no way to do this with 5 subcollections1, so \$k=4\$ for this example.
Input
Input will be a collection of positive integers \$S\$, and a positive integer \$n\$. \$S\$ may be taken in any reasonable format: a comma- or newline-separated string, an actual array/list, etc. You may assume that \$S\$ is sorted (if your input format has a defined order).
Output
The output may be either:

the maximal number of subcollections \$k\$; or
any collection which has \$k\$ items (e.g., the list of subcollections \$T\$ itself), in any reasonable format.

Note that there is not guaranteed to be any subcollections with sum \$n\$ (i.e. some inputs will output 0, [], etc.)
Test cases
n, S -> k
1, [1] -> 1
1, [2] -> 0
2, [1] -> 0
1, [1, 1] -> 2
2, [1, 1, 1] -> 1
3, [1, 1, 2, 2] -> 2
9, [1, 1, 3, 3, 5, 5, 7] -> 2
9, [1, 1, 3, 3, 5, 7, 7] -> 1
8, [1, 1, 2, 3, 4, 6, 6, 6] -> 2
6, [1, 1, 2, 2, 3, 3, 3, 5, 6, 8] -> 4
13, [2, 2, 2, 2, 3, 3, 4, 5, 5, 6, 8, 9, 9, 11, 12] -> 5
22, [1, 1, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 7, 7, 7, 8, 9, 9, 10, 13, 14, 14, 17, 18, 18, 21] -> 10

Scoring
This is code-golf, so the shortest program in bytes in each language wins. Good luck!

1. Mini-proof: the \$8\$ is obviously useless, but when you remove it, the total sum of \$S\$ becomes \$26\$; therefore, it can only contain up to \$4\$ non-overlapping subcollections whose sums are \$6\$.

Jelly,  17 11  10 bytes
-1 Thanks to Dennis (use count to remove the need to tie atoms together with any quick)
Œ!ŒṖ€§Ẏċ€Ṁ

A dyadic link accepting a list and an integer which yields the maximal count, \$k\$.
Try it online! Or see the test-suite -- it's too slow for the larger test cases :(
How?
Œ!ŒṖ€§Ẏċ€Ṁ - Link: list L, integer I
Œ!         - all permutations
  ŒṖ€      - for €ach: all partitions (all ways to slice up each permutation)
     §     - sum each (vectorises at depth 1, so this gets the sums of the parts of
           -           each of the partitions for each permutation)
      Ẏ    - tighten  (to get a list of the sums of the parts of each possible partition)
       ċ€  - for €ach count occurrences of I
         Ṁ - maximum

It makes the program even slower, but Œ!ŒṖ€§Ẏċ€Ṁ saves a byte.

Oh, that was an oversight, thanks!

Jelly, 17 bytes
Œ!ŒṖ€ẎŒP€Ẏ§;EɗƇẈṀ

Try it online!
Outputs \$k\$ if there is a \$T\$, \$0\$ otherwise. Very slow.

05AB1E, 9 8 bytes
œ€.œOQOZ

Port of @JonathanAllan's Jelly answer.
Try it online. NOTE: Extremely slow, so times out for most test cases beyond the size of 6..
Explanation:
œ           # All permutations of the (implicit) input-list
 €.œ        # Take all partitions of each permutation
    O       # Sum each
     Q      # Check for each if it's equal to the (implicit) integer-input
      O     # Then sum each
       Z    # And take the maximum (implicitly flattens the list of lists)
            # (and output implicitly)

JavaScript (Node.js), 115 bytes
k=>f=([i,...s])=>i?Math.max(...[i,...s].map((_,j)=>(e[j]=~~e[j]+i,_=f(s),e[j]-=i,_))):e.filter(_=>_==k).length;e=[]

Try it online!


text:
Is this number secretly Fibonacci?
Background
Most of you know what a Fibonacci number is. Some of you may know that all positive integers can be represented as a sum of one or more distinct Fibonacci numbers, according to Zeckendorf's Theorem. If the number of terms in the optimal Zeckendorf Representation of an integer n is itself a Fibonacci number, we will call n "secretly" Fibonacci.
For example:
139 = 89 + 34 + 13 + 3
This is a total of 4 integers. Since 4 is not a Fibonacci number, 139 is not secretly Fibonacci

140 = 89 + 34 + 13 + 3 + 1
This is a total of 5 integers. Since 5 is a Fibonacci number, 140 is secretly Fibonacci

Notes

The optimal Zeckendorf Representation can be found using a greedy algorithm. Simply take the largest Fibonacci number <= n and subtract it from n until you reach 0
All Fibonacci numbers can be represented as a sum of 1 Fibonacci number (itself). Since 1 is a Fibonacci number, all Fibonacci numbers are also secretly Fibonacci.

Challenge
Your challenge is to write a program or function that takes an integer and returns whether that integer is secretly Fibonacci.
Input
You may take input in any reasonable format. You may assume the input will be a single positive integer.
Output
Output one of two distinct results for whether the input is secretly Fibonacci. Examples include True/False, 1/0, etc.
Scoring
This is code-golf, so shortest answer in bytes wins! Standard loopholes are forbidden.
Test Cases
Truthy (secretly Fibonacci)
1
2
4
50
140
300099

Falsey (NOT secretly Fibonacci)
33
53
54
139
118808

Does this mean they're fi-curious?

In case it is of use to anybody: The optimal sum is the unique solution which does not utilize two consecutive Fibonacci numbers.

@kasperd You're correct, which makes sense if you think about it. If the solution had two consecutive Fibonacci numbers, they could be added together to form the next one. If your solution contained 5 and 8, it would be less optimal than having a single 13.

@Cowabunghole That's the intuition. A full proof is a bit more complicated than that. If the solution already contained 5, 8, and 13 you'd add 8+13 not 5+8. And the other direction needs to be proven as well.

JavaScript (Node.js), 54 bytes
x=>g(g(x))<2;g=(x,i=1,j=1)=>j>x?x&&g(x-i)+1:g(x,j,i+j)

Try it online!

Python 2, 77 bytes
def f(n):z=[bin(x).count('1')for x in range(n*n+1)if x&2*x<1];print z[z[n]]<2

Try it online!
This makes use of the theorem that the two descriptions of OEIS A003714 are equivalent:

Fibbinary numbers: if \$n = F(i_1) + F(i_2) + \dots + F(i_k) \$ is the Zeckendorf representation of \$n\$ (i.e., write \$n\$ in Fibonacci number system) then \$a(n) = 2^{i_1} + 2^{i_2} + \dots + 2^{i_k}\$.  Also numbers whose binary representation contains no two adjacent \$1\$'s.

We generate enough* such numbers, and then use z as a mapping from non-negative integers to “how many terms are in the Zeckendorf representation of \$n\$?” by counting 1s in binary.
Then it remains to check if z[n] is a Fibonacci number, i.e. z[z[n]] == 1.
*At least, \$n^2+1\$ feels like enough, and experimentally it seems to be enough. I'll prove this some time later.

You can cut two bytes by removing the backticks around bin(x). You can also remove one by changing range(n*n+1) to range(n<<n). (Assuming 0 is invalid)

I dunno what I was thinking with the backticks around bin(x), haha. And, hm, 1<<n is already way, way more than enough, but I'd like to keep the runtime non-astronomical

Fair point, I guess being able to run the code might be an important attribute. :)

Jelly, 15 bytes
‘ÆḞ€fRṪạµƬL’Ɗ⁺Ị

A monadic link accepting a non-negative integer which yields 1 if "Secretly Fibonacci" and 0 otherwise.
Try it online!  (too inefficient for the larger test cases)
How?
‘ÆḞ€fRṪạµƬL’Ɗ⁺Ị - Link: integer, I
        µƬ      - perform the monadic link to the left as a function of the current I,
                - collecting up all the inputs until the results are no longer unique:
‘               -   increment I -> I+1
 ÆḞ€            -   nth Fibonacci number for €ach n in [1,I+1]
     R          -   range from 1 to I
    f           -   filter discard (discard Fibonacci numbers not in the range, i.e. > I)
      Ṫ         -   tail (get the largest)
       ạ        -   absolute difference with I
                - This gives us a list from I decreasing by Fibonacci numbers to 0
                - e.g. for 88 we get [88,33,12,4,1,0]
                -      because (88-33)+(33-12)+(12-4)+(4-1)+(1-0)=55+21+8+3+1=88
          L     - length (the number of Fibonacci numbers required plus one)
           ’    - decrement (the number of Fibonacci numbers required)
            Ɗ   - treat the last three links (which is everything to the left) as a monad:
             ⁺  - ...and repeat it
                - i.e. get the number of Fibonacci numbers required for the number of
                -      Fibonacci numbers required to represent I.
                -      This is 1 if I is Secretly Fibonacci, and greater if not)
              Ị - insignificant? (is the absolute value of that <= 1?)

R, 83 bytes
function(n){T=1:0
while(n>T)T=c(T[1]+T[2],T)
while(n){n=n-T[T<=n][1]
F=F+1}
F%in%T}

Try it online!

C# (.NET Core), 124 115 98 bytes
a=>{int n=0,b,c;for(;a>0;a-=b,n++)for(b=c=1;c<=a;b=c-b)c+=b;for(b=c=1;c<n;c+=b)b=c-b;return c==n;}

Try it online!
-3 bytes: changed while loop to for (thanks to Olivier Grégoire)
-6 bytes: switched returns to use variable, initialized b and c outside of loops (thanks to Kevin Cruijssen)
-17 bytes: changed condition in second loop to move if out of loop and combine with return, reused b and c variables in last loop (thanks to raznagul)
Ungolfed:
a => {
    int n = 0, b, c;                        // initialize variables

    for(; a > 0; a -= b, n++)               // increase n until a is 0
        for(b = c = 1; c <= a; b = c - b)   // set b and c to 1 for each a; set second largest Fibonacci number until largest Fibonacci number reaches a
            c += b;                         // set largest Fibonacci number of current sequence

    for(b = c = 1; c < n; c += b)           // while e is less than or equal to n, continue incrementing largest (e) Fibonacci number in the sequence
        b = c - b;                          // increment second-largest (d) Fibonacci number

    return c == n;                          // if c equals n, a is a secret Fibonacci number
}

for(;c<=a;b=c-b)c+=b; will save you 3 bytes.

115 bytes. I removed all {}-brackets of your loops and put everything in for-loops. In addition, I added a variable r which we set to 1 in your if(e==n) and return at the end, so you only have one return.

Good call to both. I had tried to change the while loop to a for and somehow missed the easy way to do it. Having a separate variable for return is definitely better as well.

By changing the condition in the second loop to e<n you can move the if to after the loop and consequentlly combine it with the return for 101 bytes.

You can save another 3 bytes by reusing b and cin the last loop and removing d and e.

Perl 6, 58 bytes
{(1,&[+]...*>$_)∋($_,{$^n-(1,&[+]...^*>$n).tail}...0)-1}

Try it online!
1, &[+] ... * > $_ is just the Fibonacci sequence, stopped at a convenient non-infinite place (the input number).
$_, { $^n - (1, &[+] ...^ * > $n).tail } ... 0 is a sequence of numbers, starting with the input number, and each successive element obtained by subtracting the largest Fibonacci number less than or equal to the previous element from the previous element.  The sequence terminates when 0 is reached.  For example, if $_ is 140, then this sequence is 140, 51, 17, 4, 1, 0.
Subtracting one from this sequence treats it as a number, its length, and the difference is the number of Fibonacci numbers which, added together, give the input number.  Then this number is checked for membership in the first Fibonacci sequence.

I haven't seen that trick with the &[+] before! Nice save on not having to define two initial terms

51 bytes by assigning the Fibonacci sequence to a function and a couple of other changes

Port of l4m2's JavaScript answer, 50 bytes

@nwellnhof Ha, I had pretty much the same thing, except for a small difference

Perl 6, 48 bytes
{4>($_,{$_,{$_-(1,&[+]...*>$_)[*-2]}...^0}...1)}

Try it online!
Transforms the input to a list of Zeckendorf Representation repeatedly until it reaches a single number and then checks if the length of the sequence was less than 4.
The Zenckendorf function in the middle is mostly from Sean's answer with a couple of improvements.
Explanation:
{4>($_,{$_,{$_-(1,&[+]...*>$_)[*-2]}...^0}...1)}
{                                              } # Anonymous code block
                                          ...     # Define a sequence:
    $_  # That starts at the input
      ,{                                 }  # Each element is defined by:
                                   ... # Another sequence that:
        $_,   # Starts at the previous element
            $_-   # The previous element minus
                1,&[+]...*     # The Fibonacci sequence
                          >$_  # Ending when it is larger than the previous element
               (             )[*-2]  # The second from last element
          {                        }...^0  # Run until 0, discarding the last element
         # This returns the length of the Zeckendorf Representation
                                         ...1  # Run this until it is length 1
 4>(                                         )  # Return true if the length of the sequence is smaller than 4

For example, the sequence for 2 is 2 1 since 2 is already a Fibonacci number. The sequence for 140 is 140 5 1, and since 5 is a Fibonacci number this returns true. The sequence for 33 is 33 4 2 1, and since 4 is not a Fibonacci number the sequence is of length 4.

05AB1E, 14 bytes
ΔDÅFθ-¼}¾ÅF¾<å

Try it online. No test suite for all test cases, because the counter_variable cannot be reset to 0.. I verified all by hand though, and they are correct.
Explanation:
Δ      }          # Loop until the top of the stack no longer changes
 D                #  Duplicate the top of the stack
                  #  (implicitly the input in the first iteration)
  ÅF              #  Get a list of all Fibonacci numbers lower than this number
    θ             #  Get the last item (largest one)
     -            #  Subtract it from the number
      ¼           #  Increase the counter_variable by 1 every iteration
        ¾         # After the loop, push the counter_variable
         ÅF       # Get all Fibonacci numbers below this counter_variable
           ¾<     # Push the counter_variable again, and subtract 1
             å    # Check if this value is in the list of Fibonacci numbers
                  # (and output implicitly)

NOTE: The counter_variable would be 5 for input 139 and 6 for input 140, because in order for the Δ-loop to check the stack remained the same, it does of course an additional iteration.

Haskell, 64 bytes
s=(<2).r.r
f=1:scanl(+)1f
r 0=0
r z=1+r(z-last(takeWhile(<=z)f))

Try it online!

Retina 0.8.2, 61 bytes
.+
$*
M`((?>\2?)(\1|\G.))*..|.
.+
$*
^(((?>\3?)(\2|^.))*.)?.$

Try it online! Link includes test cases. Explanation:
.+
$*

Convert to unary.
M`((?>\2?)(\1|\G.))*..|.

Count the number of Fibonacci numbers needed.
The first alternation deals with Fibonacci numbers that are at least 2. On the first pass, \2 does not exist yet, but fortunately it's optional, so we don't have to match it. \1 doesn't exist either, but fortunately we have the alternative of \G. which matches a single character at the start of the match. Both \2 and \1 therefore take on the value 1.
On subsequent passes, \2 exists, so we try to match it. This time if it fails then \1 also fails (since it is bigger than \2), but if it succeeds, the (?>) prevents backtracking, so if \2 matches but \1 does not we don't try just \1. (\G1 always fails since we've advanced past the start of the patch.) Finally \2 takes on the previous value of \1 while \1 takes on the sum of the two values.
We therefore match as many Fibonacci numbers as we can, adding as we go. Since the partial sums of the sequence 1, 2, 3, 5... are 0, 1, 3, 6, 11... i.e. 2 less than the Fibonacci numbers we finish by matching 2 at the end.
This obviously fails to match 1 itself so an alternation handles that case.
.+
$*

Convert to unary.
^(((?>\3?)(\2|^.))*.)?.$

Test whether this is a Fibonacci number. This uses the same idea as the first test but it uses ^ instead of \G and we also need to match exactly, so it uses an optional capture instead of an alternation as that's golfier (but it increases the capture numbers by 1).
Retina, 35 bytes
.+
*
2}C`((?>\2?)(\1|\G.))*..|.
^1$

Try it online! Link includes test cases. Explanation:
.+
*

Convert to unary.
C`((?>\2?)(\1|\G.))*..|.

Count the number of Fibonacci numbers needed. (Looping both the conversion and count saves a whole byte over getting the count in unary in the first place.)
2}

Perform the previous steps twice in total. This takes the count of Fibonacci numbers needed to sum to the count of Fibonacci numbers.
^1$

If the number was secretly Fibonacci then the result is 1.

Python 2, 146 137 bytes
lambda a:len(g(len(g(a))))<2
f=lambda n:n<3or f(n-2)+f(n-1)
def g(a,n=1):j=f(n-1);return[j]if a-j<1else[j]+g(a-j)if a-f(n)<0else g(a,n+1)

Try it online!
f() is a recursive function that returns the value of the nth Fibonacci number. Taken from this answer.
g() is a recursive function that returns the Zeckendorf Representation of the given number as a list of integers.
Since all Fibonacci numbers will have a return length of one item from g(), h() checks if the length of the g() of g(n) == 1.
EDIT: Saved 9 bytes thanks to nedla2004. I keep forgetting that lambdas aren't always the best solution...

138 bytes. I mostly just made g a function so that I could define f(n-1) to a variable. Couple other changes from == to < where they are the same.

Husk, 16 bytes
£İf←LU¡λ≠⁰→↑≤⁰İf

Try it online!


text:
Decimal Digit Truncating
Input:
A decimal
Output:
The input truncated
How to truncate them?
The integer part of the input will remain the same. The decimal part of the input will be truncated based on the lowest digit in consecutive order. The two step-by-step examples below should clarify what I mean by that:
Example 1: Input: 17.46940822
Step 1: Leave the integer part unchanged: 17
Step 2: Look at the first decimal digit, and truncate it to that many decimal digits: 4 → .4694
Step 3: Look at the next decimal digit. If it's lower, adjust the truncation accordingly. If not, continue to the next decimal digit: 6 → remains .4694
Step 3 again: 9 → remains .4694
Step 3 again: 4 → remains .4694
So the output will be: 17.4694.
Example 2: Input: 10.4521084
Step 1: Leave the integer part unchanged: 10
Step 2: Look at the first decimal digit, and truncate it to that many decimal digits: 4 → .4521
Step 3: Look at the next decimal digit. If it's lower, adjust the truncation accordingly. If not, continue to the next decimal digit: 5 → remains .4521
Step 3 again: 2 → truncation adjusted to: .45
So the output will be: 10.45
Challenge rules:

You are allowed to take the input as decimal, string, list/array/stream of characters, etc. (Same applies to the output, although I doubt there are a lot of languages that have the proper truncation while remain working with decimal values.)
You are also allowed to use a comma , instead of a dot . (perhaps useful for regex-based solution/languages).
If the decimal part is not long enough for the truncation, you are optionally allowed to add trailing zeros. I.e. 123.4 can be both 123.4 or 123.4000
If you have to truncate to 0 decimal digits we omit the decimal digits. The dot/comma may remain optionally if you use strings. I.e. 847.3072 → 847 (or 847.)
You can assume the input will always contain at least one decimal digit, so 123 won't be an input, but 123.0 can be an input.

General rules:

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer with default I/O rules, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code (i.e. TIO).
Also, adding an explanation for your answer is highly recommended.

Test cases:
Input:          Output:

17.46940822     17.4694
10.4521084      10.45
123.4           123.4000 (or 123.4)
-847.3072       -847 (or -847.)
123.0           123 (or 123.)
98.76543210     98.7654
0.3165          0.3
-0.1365         -0.1
82937.82937     82937.82
-0.1010101      -0.1
-1.0101010      -1 (or -1.)
28.684297       28.68
13.35           13.350 (or 13.35)
0.99999999999   0.999999999
28.321          28.32
0.56462         0.5646

Need we output string?

@l4m2 No, you are also allowed to output it as a decimal, or list of characters. Although I don't know a lot of languages that can do the proper truncation without converting to string format.

So it's fine to remove ending zero if outputing float?

@l4m2 Sure. I've updated the rules to also allow no additional trailing zeros.

Suggest test case 0.99999999999 -> 0.999999999

Suggested test case 0.56462 (This Jelly code passes all other given test cases :()

@JonathanAllan Done.

05AB1E, 18 bytes
2 bytes extra due to a bug with £ not handling 0 correctly.
'.¡`DvÐgsNè-F¨]'.ý

Try it online!
or as a Test Suite
Explanation
    '.¡                 # split input on "."
       `                # push int and decimals separately to stack
        D               # duplicate decimal digits
         v              # for each
          Ð             # triplicate the current decimal digits
           g            # get the length
            sNè         # get the Nth digit
               -        # subtract from the total length
                F¨]     # drop that many digits from the end
                        # end loop
                   '.ý  # join on "."

Python 2, 103 101 98 94 93 87 bytes
a,b=input().split('.');i,w=0,len(b)
while w>i:w=min(int(b[i]),w);i+=1
print a+'.'+b[:w]

Try it online!

Saved:

-2 bytes, thanks to Kevin Cruijssen
-3 bytes, thanks to Vedant Kandoi
-4 bytes, thanks to Lynn

a+w+1 can be a-~w. Nice answer though, +1 from me.

Oh, and return can be print as well. And here you are golfing Python for years. Tsk tsk tsk. ;p (It's the simplest things we usually forgot to golf I guess.)

Instead of a function, use n=input() and remove the spaces and print as mentioned by @KevinCruijssen to save a few bytes.

I think while w>=i<a+i<len(n): is okay, as the . is never at the start of the string, so a>0.

@KevinCruijssen Thanks :)
Ye have little faith :( .   I didn't really have time to golf it, I just submitted a working solution, and left for a couple of hours.

JavaScript (Node.js), 58 bytes
f=(s,p=1/0,q=1,c=s[q])=>c?f(s.slice(0,p-~c),++c?p:q,q+1):s

Try it online!

Ridiculously & unnecessarily complicated and for the same score as my boring, straightforward solution?! +1

@Shaggy Actually, they are similar enough. s.slice(0,p-~c) -> d.slice(0,-~d[n]), q+1 -> ++n, both recursive. Only difference is how to handle digits before the dot.

Charcoal, 28 bytes
≔⪪Ｓ.θＷ⊟ＥθΦκ‹ΣμＬκ⊞θ…⊟θＩ§ι⁰⪫θ.

Try it online! Link is to verbose version of code. Explanation:
≔⪪Ｓ.θ

Split the input on ..
Ｗ⊟ＥθΦκ‹ΣμＬκ

Filter each part on those digits that are less than the string's length. Then take the last result. (This saves 1 byte over filtering on just the decimals.) Loop until that is empty.
⊞θ…⊟θＩ§ι⁰

Take the first filtered digit and truncate the decimals to that length.
⪫θ.

Join the parts back together and implicitly print.

Seems to give an incorrect result for the negative input-cases (although it is possible I don't know how to input negative values in Charcoal, I tried with a leading - or _, but both failed). Everything else works fine.

@KevinCruijssen Ah, my final golf broke because it tried to cast - to integer. Fortunately I can use Sum instead.

C (gcc), 84, 78 bytes
Takes input as a pointer to a string buffer, outputs by modification. Note that providing a pointer to a buffer that is too small (intPartLen + 1 + 9 > bufSize) can cause SEGFAULT.
If assuming the size of the buffer to be sufficient is not allowed, +7 to the score.
l,M;f(char*F){F=strchr(F,46);for(l=47,M=57;*++F&&++l<M;*F<M?M=*F:0);F[M-l]=0;}

Try it online!
Degolf
l,M;f(char*F){
    F=strchr(F,46); // Find the pointer to the period.
    for(l=47,M=57;  // Initialize variables (48='0', 57='9')
            *++F&&++l<M;  // Check for null terminator, and that we're not
                          // going through too many decimals
            *F<M?M=*F:0); // Keep smaller of M and the char pointed to by F.
        F[M-l]=0; // Explained below.
}

At the end of the loop, F is a pointer to the nth decimal after the decimal point (ptr). M is the smallest digit observed as its ASCII value. l is '0'+n-1 (or 47+n). Thus:
F[M-l] == *(F + M - l)
F[M-l] == *(ptr + n + M - '0' - n + 1)
F[M-l] == *(ptr + M - '0' + 1)

Which gives us a pointer to the first character to truncate; replacing this character with a \0 results in the truncation of the remaining digits for most intents and purposes. This is also where the SEGFAULT happens; for example, if the input is 123.4, the smallest digit is 4, and the pointer will point to the character * in 123.4\0??*.

Ruby -pl, 48 bytes
c=i=j=$_=~/,/;$_=$_[0,c.to_i-~j]while c=$_[i+=1]

Try it online!
Uses a decimal comma instead of a dot.

PHP, 92 bytes
several solutions, same length:
# any PHP:
for($n=$argn,$t=9;~$d=$n[$i+++$p=1+strpos($n,46)];$n=substr($n,0,$p+$t))$t<$d||$t=$d;echo$n;
for($t=9;$i<$t&&~$d=$n[$i+++$p=1+strpos($n=$argn,46)];)$t<$d||$t=$d;echo substr($n,0,$p+$t);
for($t=9;$i<$t&&~$d=$n[++$i+$p=strpos($n=$argn,46)];)$t<$d||$t=$d;echo substr($n,0,$p+$t+1);

# PHP 7:
for($t=9;~$d=($n=&$argn)[$i+++$p=1+strpos($n,46)];$n=substr($n,0,$p+$t))$t<$d||$t=$d;echo$n;
for($n=$argn;~$d=$n[$i+++$p=1+strpos($n,46)];$n=substr($n,0,$p+$t))($t??9)<$d||$t=$d;echo$n;

Run as pipe with -nR or try (most of) them online.

I was like, wow, that's a long PHP answer. But then I saw the byte-count and realized they are four separated programs. ;) Btw, in what order does PHP execute $i+++$p=1+strpos($n,46)?

@KevinCruijssen $i++, then $p=.... ++$p=... would throw a parse error.

JavaScript, 58 bytes
Input and output as a string, using a comma as the decimal separator.
s=>s.replace(/,.+/,g=d=>d[++n]?g(d.slice(0,-~d[n])):d,n=0)

Try it online

JavaScript (Node.js), 78 68 bytes
-10 bytes from @tsh
a=>eval('for([x,y]=a.split`.`,i=0;c=y[i++];y=y.slice(0,c));x+`.`+y')

Try it online!

A quick saving using comma as the decimal separator.

68 bytes

Perl 6 -p, 57 41 bytes
$!=m/\./.to;.=substr(0,$!+$/)while m:c/./

Try it online!
Explanation
$!=m/\./.to;       # Store position of decimal point in $!
.=substr(0,$!+$/)  # Truncate string to length $!+$/
while m:c/./       # while there's a match for the next digit

Python 3, 77 bytes
g,h=input().split(".")
for i in h:h=h[:int(i)]if i in h else h
print(g+"."+h)

Try it online!
Somehow, despite slicing past the end of a string and modifying while iterating on that same string, the interpreter doesn't complain.
This answer has a similar structure to the other Python one, but uses a different method to find where to truncate and works in newer versions of Python.

Clean, 115 bytes
import StdEnv,Text
$s#[i,d:_]=split['.']s
=i++['.':iter 9(\p=hd([take n\\n<-map digitToInt p|n<length p]++[id])p)d]

Try it online!
Defines the function $ :: [Char] -> [Char]. Link includes test suite.


text:
A "Sorting" algorithm
There is a "sorting algorithm" sometimes called Stalin sort in which in order to sort a list you simply remove elements from the list until it is sorted in increasing order.  For example the list
[1, 2, 4, 5, 3, 6, 6]

When "sorted" using Stalin sort becomes
[1, 2, 4, 5, 6, 6]

The three was removed because it was out of order.
Now obviously there are many ways to remove elements to sort a list.  For example any list with less than two elements must be sorted so by just removing enough elements blindly we can always sort a list.  Since this is the case we only care about the longest possible result from a Stalin sort.
Your task will be to take a list of positive integers and output the length of the longest sorted (increasing) list that can be arrived at by removing elements from the original list.  That is find the length of the longest sorted (possibly non-contiguous) sub-list.
Sorted lists can have the same element more than once in a row. You do not need to support the empty list unless your program itself is empty.
Scoring
Your answer will be scored by the length of its own longest possible Stalin sort. Programs will be interpreted as a sequence of bytes rather than characters, and their order will be the natural one that arises by interpreting the bytes as numbers.  Lower scores are better.
This is not code-golf
Here's a neat-o tool to help you score your answers.
Test cases
[1, 2, 4, 5, 3, 6, 6] -> 6
[19, 2] -> 1
[3, 3, 4, 3] -> 3
[10] -> 1
[1, 2, 4, 9] -> 4
[1, 90, 2, 3, 4, 5] -> 5
[1, 90, 91, 2, 3, 4, 5] -> 5

In short: output the length of the longest (non-strictly) increasing sequence.

I like the rule "You do not need to support the empty list unless your program itself is empty."

This challenge reminds me a lot of the dropsort challenge: https://codegolf.stackexchange.com/questions/61808/lossy-sorting-implement-dropsort

I made a checker at https://ptpb.pw/SVSt.html . Still not very functional, but it works. (TODO: * bar chart * partition into least decreasing sequences * support for other code pages)

@user202729 Cool! I've added it to the post.  Feel free to edit newer versions in if necessary.

Python 2, length 14 12 10 9
M=max;X=exit;i=input();L=[0]*M(i)
for	a	in	i:L[a-1]=M(L[:a])+1
X(M(L))

Output is via exit code.
Try it online!
How it works
At all times, the array \$L\$ keeps track of the longest sorted subarrays encountered so far; \$L[a-1]\$ is the length of longest one that ends with \$a\$.
Initially, we haven't processed an array elements, so \$L\$ consists entirely of zeroes.
When processing the array element \$a\$, we first take the maximum of \$[L[0], \dots, L[a-1]]\$, which is length of the longest sorted subarray encountered so far that ends with \$a\$ or a smaller integer. Appending \$a\$ to such an array will keep it sorted, so the longest sorted subarray ending in \$a\$ is one element longer than that maximum. We update \$L[a-1]\$ with the computed value.
The final result is the maximum of \$L\$.

Can you please explain, why it works? I'm having hard times to comprehend it :(

I've added an explanation.

Wolfram Language (Mathematica), score 9
Length@*LongestOrderedSequence

Try it online!

Jelly, length  4  2
ṢƑƇZLƲ}ŒP

Try it online!
Bytes in Jelly's code page
183 146 144 90 76 169 125 19 80

How it works
ṢƑƇZLƲ}ŒP  Main link. Argument: A (array)

       ŒP  Powerset; yield P, the array of all sub-arrays of A.
     Ʋ     Vier; combine the preceding four links into a monadic chain...
      }    and apply the chain to the right argument (P).
  Ƈ            Comb; only keep arrays for which the link to the left returns 1.
ṢƑ             Sort fixed; yield 1 if sorting doesn't alter the array.
   Z           Zip; read the filtered powerset by columns.
    L          Take the length.

Haskell, Score 8 7, 48 bytes
(l:k)%d|d>l=k%d|3>2=max(1+k%l)(k%d)
c%b=0
a=(%0)

Try it online!
The longest sorted sublist is
%%%%%%)

Perl 6, score 9
*.combinations.map({@^a*[<=] @a}).max

Try it online!

Pyth, score 3 2 (7 bytes)
leSI#y

Saved a point thanks to Anders Kaseorg.
Try it here
Explanation
leSI#y
     yQ    Take the power set of the (implicit) input (preserving order).
  SI#      Get the ones that are sorted.
 e         Take the last (longest).
l          Get the length.

leSI#y scores 2.

Stax, 4 maximal length stalin sort
S{:^fF%|M

Run and debug it
It works like this.
S       powerset of input
{:^f    filter by non-descending sequences
F%|M    take the maximum length remaining

Brachylog, length 2 (4 bytes)
⊇≤₁l

Try it online!
An answer which makes up for being so concise by not being that much shorter sorted.
(08 03 80 6C in Brachylog's code page)
        Output
   l    the length of
 ≤₁     a non-decreasing
⊇       sublist of
        the input.
        (maximizing the size of the sublist)

I came up with ►LSnmOṖ for Husk but its score (for its length at least) is too bad to bother posting...

R, Score 15 11, 72 62 bytes
function(L,M=max,A=1:M(L)*0){for(Y in L)A[Y]=M(A[1:Y])+1;M(A)}

Try it online!
Ports Dennis' Python answer to R.

Just changing variable names won't help, because as your last link shows, none of them are used in the (found) substring that gives score 15.

@ØrjanJohansen ah, of course, I'm rather dumb. I suppose another approach is necessary.


text:
x bottles of y on the z
I do not believe this question to be a duplicate of this one, since this one requires more string manipulation, if it is still a duplicate feel free to close this question
Introduction
Your challenge today is to output the lyrics of "99 bottles of beer":
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.

97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of beer on the wall.

96 bottles of beer on the wall, 96 bottles of beer.
Take one down and pass it around, 95 bottles of beer on the wall.

95 bottles of beer on the wall, 95 bottles of beer.
Take one down and pass it around, 94 bottles of beer on the wall.

....

3 bottles of beer on the wall, 3 bottles of beer.
Take one down and pass it around, 2 bottles of beer on the wall.

2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

But the twist is that you wont always start from 99, and you wont always buy some more beer from the store, because they don't have infinitely many bottles of beer you know!
Input
A positive integer x > 1, a string y and a string z
Output and Test Cases
A string containing the lyrics of the song except that instead of starting from 99 bottles of beer, you start from x bottles of y, and the ys are on the z. So given a value of x equal to 3, y equal to "Pepsi", and z equal to "fridge" your output should be:
3 bottles of Pepsi on the fridge, 3 bottles of Pepsi.
Take one down and pass it around, 2 bottles of Pepsi on the fridge.

2 bottles of Pepsi on the fridge, 2 bottles of Pepsi.
Take one down and pass it around, 1 bottle of Pepsi on the fridge.

1 bottle of Pepsi on the fridge, 1 bottle of Pepsi.
Go to the store and buy some more, 3 bottles of Pepsi on the fridge.

Scoring
Lowest byte count wins.

Here's the original for inspiration. Is this too similar?

I'm on the fence as to whether this is different enough than the plain 99BB challenge, but since my vote is a hammer I won't close-vote it as yet.

(You use x in one place and n in another, please fix). Does my program need to handle only n up to 99? Or 9,999? 2,147,483,647?

@BradC You need to handle any values of x, also will fix

@AdmBorkBork I believe since this one involves more string manipulation it should be different enough don't you think?

I think the only changes I'd need to make from my beer on the wall code is to take an input in place of 99 as the initial counter value, and store it to put into the last line. That, and replace some text strings.

This is uninspired, to say the very least. Is it original? No. Is it interesting? No. Does it add anything new or exciting to the other, similar, challenge? No. Is it similar? Yes. Should we close it? Probably. That being said, don't let this dissuade you from writing more challenges, just, probably, spend more time on them and make them interesting.

The major thing that people don't like about similarities too is that you can strip code from the old answer and paste it into the new answer. For instance, 05AB1E compresses words and in the 05AB1E answer I can take all the work that user did compressing "bottles of - on the - take one down pass it around" and directly rip that.

@MagicOctopusUrn "Does it add anything new or exciting to the other, similar, challenge?", exiciting is subjective, but it does add something new.

@FireCubez yes, it's subjective, but would you honestly call this exciting? Plug-and-play strings for an existing question? Meh... I was just pointing out that this is usually the tie breaker between closing/keeping open when people are asking "is it different enough". While it's subjective, trivial edits to questions that are interesting/exciting have passed, while in my personal opinion this isn't very interesting (and the 99 bottles question is super famous / still competed on - last post Oct 24 at 14:18). Not trying to be mean, just pointing out what I wish people told me when I was newer!

I actually posted a rick-roll duplicate my first question and got rep-bombed lol.

@MagicOctopusUrn lol.


text:
0xDEADBEEF is not tasty, but still 0xFEEDBEEF
Inspired by "You had me at hello"
Introduction
For those who don't know, hexadecimal is a base system like decimal. Contrary to decimal however, it uses 16 (hence the name) digits instead of 10.
Here are the first few numbers while counting up in hexadecimal to maybe give you a feel of things, although you should probably google it for more info.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20...
From now on I'll refer to hexadecimal as hex.

Challenge
Take a possibly infinite stream of bytes, and convert it to hex. This should be done as you read since you might get an infinite stream and keep on reading forever.
The twist, is that if a sequence of converted numbers equals the exact hex number DEADBEEF (3735928559 in decimal), you must output FEEDBEEF (4276993775 in decimal) instead.
If no DEADBEEF is found, print the string as it was
Inter-character matches work too, so 2D EA DB EE F0 works and should be converted to 2F EE DB EE F

Example
This might seem a bit vague, so here are 2 step-by-step examples.
Example 1
Input: Hello, World (bytes represented as string)

Step 1: Convert the input to ASCII: 072 101 108 108 111 044 032 087 111 114 108 100
Step 2: Convert the ASCII to hex: 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64
Step 3: Print out everything until DEADBEEF is found. It wasn't found, so just print Hello, World again.

Example 2
Input: Hello,Þ¾ï,,

Step 1: Convert to ASCII: 72 101 108 108 111 44 222 173 190 239 44 44
Step 2: Convert to hex: 48 65 6C 6C 6F 2C DE AD BE EF 2C 2C
Step 3: Is there DEADBEEF? Yep. so take everything up to it. 48 65 6C 6C 6F 2C
Step 4: Append FEEDBEEF to it. 48 65 6C 6C 6F 2C FE ED BE EF
Step 5: Convert back to a string and print it. Output is Hello,þí¾ï

Scoring
Try to make a program that does the above in the fewest bytes of source code as possible.

Remember!
Make sure your program works for finite and infinite streams. The stream can be STDIN, file, function argument (if you can pass streams as arguments), or your language's closest alternative. Output is to STDOUT or function returning (if you can return streams).
More test cases (contain invisible characters)
eeþí¾Þ¾ïe (6565feedbedeadbeef65) -> eeþí¾þí¾ïe
Þ¾ï (deadbeef)-> þí¾ï
Þ=êÛîôV -> Þ?îÛîôV

"Take a ... stream of printable ASCII characters". Þ from your 2nd example isn't a printable ascii character.

@Rogem Printable ascii is a defined range of code points

If an inter-match is found, like input -êÛîð (2D EA DB EE F0), do we convert it to 2F EE DB EE F0 (resulting in string -êÛîð) or 2F EE DB EE F (resulting in string -êÛî  where the last character is the unprintable \x0f)?

Your test cases should be either pasted as TIO links or as hex dumps if they contain unprintable characters.

@mbomb007 There are hexdumps of the inputs, the outputs don't contain unprintable characters

I would format those extra test cases to make that clearer. I think it'd be better to format your test cases as [hex dump] => [hex dump].

Python 3, 121 bytes
I=open(0).read
p=print
x=i=I(1)
while i:p(end=x[:-4]);x=x[-4:];x!='Þ¾ï'or+p(end='þí¾ï');i=I(1);x+=i
p(end=x[:5])

Try it online!

or+p(end=...) causes a TypeError: bad operand type for unary +: 'NoneType'

A fixed version is here: https://tio.run/##RYwxCoNAEEX7PYXYuEvGoMRK2V5PYKEWuo4oLCqOoLlMbhBygxR6sI1ikerDe48/Pud26B/GJHIYsece2FNli/uEZc3Si/lgLydbpm5GRlLJhPuCLW2n0VJhyikL3aAQEUnK3CAsoquICJTklZOvDeYr1vlands44ImusUjK09UHK/8ONSGnmwIl2PEsjIlR6wH21/bevvsH4Ac

@mypetlion The error is on purpose, it crashes the program so that it stops outputting.

Oh yes that does make sense. I might have misread the spec.

Japt, 34 30 bytes
-4 bytes from @Shagy
csG r`Ü%¼ef.+``fe‚¼ef` ò ®nG d

Try it online!

Added more test cases

30 bytes using S.c() instead of S.m() and S.r() instead of S.s().

@Shaggy Damn, I dont know how I didnt see those methods :o

Clean, 143 bytes
uses octal escapes here and on TIO to prevent UTF-8 mangling, but it does work with the actual values and so each escape sequence is counted as one byte
This one works with inter-character sequences.
import StdEnv
$l=:[a,'\352\333\356',b:t]|(toInt a)rem 16==13&&(toInt b)>>4==15=[a+'\002':['\356\333\356\015']]=[hd l: $(tl l)]
$['\336\255\276\357':_]=['\376\355\276\357']
$[h:t]=[h: $t]
$e=e

Try it online!
Clean, 38 bytes
uses octal escapes here and on TIO to prevent UTF-8 mangling, but it does work with the actual values and so each escape sequence is counted as one byte
This one does not work with inter-character sequences.
$['\336\352\276\357':_]=['\376\355\276\357']
$[h:t]=[h: $t]
$e=e

Try it online!
Defines the function $ :: [Char] -> [Char] taking and returning a list of characters.
 Since Clean is lazily-evaluated, this is equivalent to a stream.

Does it work with things like hex(0DEADBEEF9)

@FireCubez no, as that wasn't clearly required at the one I wrote this. I'll update it today so that it does.

@FireCubez with interchacter matches, what is the second digit of the last F? Do we use 0x0F? 0xF0?

@Ourous 0x0F would be used

05AB1E, 30 bytes
ÇhJl’–ìÀÜ’¡Dнsg1›’ŽåÀÜ’×«2ôHçJ

Try it online or verify a few more test cases.
Explanation:
Ç                               # Convert the (implicit) input-string to codepoint decimals
 h                              # Convert them to hexadecimal
  J                             # Join them together
   l                            # Convert to lowercase
    ’–ìÀÜ’                      # Push compressed string "deadbeef"
          ¡                     # Split the hexadecimal string by this "deadbeef"
           D                    # Duplicate
            н                   # Take the first item of the split-list
             s                  # Swap so the full list is at the top of the stack again
              g1›               # Check if its length is larger than 1
                 ’ŽåÀÜ’×«       # If it is: concat "feedbeef" to the head-string
                         2ô     # Split the string into parts of size 2
                           H    # Convert hexadecimal back to decimal
                            ç   # Decimal back to characters
                             J  # Join the characters (and output implicitly)

See this 05AB1E tips of mine (section How to use the dictionary?) to understand why ’–ìÀÜ’ is "deadbeef" and ’ŽåÀÜ’ is "feedbeef".

Why does it stop output when reaching a DEADBEEF?

@l4m2 Because that is the challenge.. :) (I.e. in the second example, the two trailing ,, aren't output. It stops as soon as it found the DEADBEEF and appended the FEEDBEEF instead.)

See. The question is inconsistant

@l4m2 I agree. Although the other answers thus far (Python, Japt, and Clean) interpret it in the same way as me.

C (gcc), 137 bytes
i=16;n;long long u;c;R(k){u=u<<4|c>>k&15,u^=u+'!RA'<<32?0:' @';}main(){for(;n+=!!~(c=getchar(n-=!i&&~putchar(u>>32)));i/=2)R(4),R(0);}

Try it online!

@ceilingcat c is used in R, so can't move