maddys-biggest-fan

Maddy the Android: Out of Character

  • Any

Just a page for stuff I wanted to share, which would be super out-of-character for Maddy to share as a character.

I am an autistic game developer and music producer, who is living the genderfluid experience. I really love airplanes, hard sci-fi, orbital mechanics, and purple is my happiest color!

(Avatar by idiotvision)



easrng
@easrng
with (((scopeHelper) =>
  new Proxy(
    {},
    {
      has(target, key) {
        return typeof key === "string";
      },
      get(target, key) {
        if (typeof key !== "string") return undefined;
        if (
          key.match(/^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/u)
        ) {
          try {
            return scopeHelper(key);
          } catch {}
        }
        return key;
      },
    },
  ))((s) => eval(s))) {
  console.log(
    (
      unquoted_strings_in_my_javascript +
      "?" +
      _its_more_likely_than_you_think
    ).replaceAll("_", " "),
  );
}
syntax highlighting by codehost

You must log in to comment.

in reply to @easrng's post:

mixing old deprecated features (with(){}) and modern features (Proxy) for Wondrous Results (sets the scope to an object that has all keys defined and if the parent scope doesn't include a key it just returns it as a string)

incredible psychic damage from the very first keyword of the code block, and it only escalates from there. God bless

if one of my junior engineers submitted this in a PR, I would scream and laugh with the same breath