Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

passing regex flags to learn #254

Closed
wants to merge 1 commit into from
Closed

passing regex flags to learn #254

wants to merge 1 commit into from

Conversation

caub
Copy link

@caub caub commented Nov 3, 2015

No description provided.

@Zirak
Copy link
Owner

Zirak commented Nov 4, 2015

So /learn is broken from the get go for anything that's non-trivial. Pretty much all learned commands can be broken down into two categories:

  • Commands which reply with a constant
  • Commands which require logic

I've sinned in trying to create a macro language for the 2nd via some regexps. That was a mistake. With the introduction of eval there should've been a version of /learn which just lets you run js, maybe with some helper functions.
This commit, while good in faith, propagates the mistake further. Now /learns syntax will be even more obscure, with the input regexp's flags coming after the description.

I appreciate the PR, but reading this alongside #252 made me realize that /learn should be burned to the ground (I'll say why 252 happens separately) and be replaced with something like /learnEval.

:(

@caub caub closed this Apr 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants