Fibonacci-like gap formula code-golf math fibonacci
Background
The recurrence of the Fibonacci sequence is defined as
$$
f(n+2) = f(n+1) + f(n)
$$
From this recurrence alone, the following gap formulae (recurrences relating three terms with certain amount of gaps) can be derived:
$$
f(n+4) = 3f(n...
I've heard the mods are considering using chemical and biological weapons against your fridge since nuclear and radiological don't seem permanent enough
Python's async doesn't work well with lots of complicated IO (combining an http + websocket server with writing to files and executing shell commands = somewhat painful and very slow)
> Rust has a much steeper learning curve compared to go. However, it is also important to note that Go has a much steeper learning curve than other languages such as JavaScript and Python.
@Bubbler I was gonna disagree with that, but I think the problem is that I think any language I have already learnt has a horizontal learning curve, and any language I have given up on has a vertical one
We all know about the fibonacci sequence. We start with two 1s and keep getting the next element with the sum of previous two elements.
n-bonacci sequence can be defined in similar way, we start with n 1s and take the sum of previous n elements to get the next element.
Challenge
Given a positive ...
@emanresuA basically, Vyxal dictionary string compression but worse
There are 6 kinds of strings: Normal strings, Normal spaceful strings, SCC only spaceless strings, SCC only spaceful strings, special spaceless strings and special spaceful strings
Normal strings allow for SCCs to be used after a ;, meaning that to compress the word Hello inside a normal string, you'd use `H%;`
(Spaceful here means that a space is appended after each SCC)
$ identifies a global variable, as opposed to a local variable, @instance variable, or @@class variable.
Among the language-supplied global variables are $:, which is also identified by $LOAD_PATH
the universe is deterministic, so each candidate has a chance of being chosen that is exactly 0 or 1; we just don't know which in Glorfindel's case. The average chance per candidate is 1-(1-1/7)**3, so that's what we assume Glorfindel's to be
@lyxal Why not just have it pop the maximum amount it will need and then push the extras back in the part where it actually performs functions based on type? Then you only need to check for types and stuff once.