You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.
This happens because I'm an idiot and didn't learn from my predecessors.
The /learn command implements some sort of macro language, which basically acts like a text preprocessor: It searches text for variable denotations and replaces them with their textual value.
So the following happens:
macro = "$encode($foo)
foo = "blah baz"
// first pass of the replacement catches `$encode`, parses its arguments:
macro = $foo
foo = "blah baz"
output = "blah, baz"
// which means it's translated to:
$encode(blah, baz)
Which only encodes the first argument.
This is fucking bash all over again. Because under bash, the solution is: $encode("$foo"), but of course I didn't implement string interpolation, so there is no solution.
Fuck me.
As said in #254, I detest how /learn grew to become something which needs to have computational power, but lacks any sort of semblance to logic (you don't even have fucking if statements). /learnEval would be much, much better.
I don't understand where the rest of the string is gone? dropped by SO chat? if yes would there be a way to handle this?
The text was updated successfully, but these errors were encountered: