emoji-award-capyhacker
Unable to load image

Calling on @Aevann to Approve MarseyFX!

I am humbly calling upon @MURDERVANN to merge my MarseyFX pull request (it's finished now).

!codecels

FAQ

1. Is it backwards compatible? What about the emotes already posted, will those be broken?

It's mostly backwards compatible. Emotes that have already been posted have already been rendered and as such will not be effected by the new rendering engine. In terms of new posts, emotes are essentially the same, except that you'll need a dot . before modifiers: :marseylove: becomes :marsey.love:

2. What about the preview stuff?

The preview is not up-to-date, so it won't be able to render the new MarseyFX stuff. Options currently are to transpile the MarseyFX parser from Python to JS using something like JavaScripthon; run the python code in the browser through something like PyScript; send the data back to the server in order to be rendered; implement a subset of the renderer in JS; or leave it out entirely.

32
Jump in the discussion.

No email address required.

So I looked at your code and I doubt Aevann will merge it, because it looks massively overengineered for what it's trying to do (and it probably shouldn't try to do some of the things it does, just to keep it simple).

Like, you wanted to write a parser, I get it, are you going to hang around fixing bugs and vulnerabilities in it? Extra code is a liability and a cost, not something good and desired.

Besides it's awfully nerdy--why programming syntax?

I'd start with replacing that entire 236 line file with str.split(' '), so we could do :marseyxd large love pat:, making an actual improvement in UX for non nerds.

Then you can complicate things just a little by 1. replacing that with a 5 line tokenizer based on str.find that understands quoted strings, and 2. allowing modifiers with implicitly consumed arguments, so :marseyxd says "hello world" large: would work.

And stop there.

btw, also get rid of token types and all that nonsense, just remove quotes from quoted strings, so :marseyxd says "hello": is equivalent to :marseyxd says hello:. 95% of your parsing functionality can be done with 5% of the code.

Pinging @HeyMoonster.

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.