Skip to content

Replace the increasingly complex messaging system with a Scheme interpreter #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mdsimmo opened this issue Dec 29, 2022 · 0 comments
Assignees
Labels
Status: Thinking Waiting for some good ideas Type: Enhancement Add some functionality

Comments

@mdsimmo
Copy link
Owner

mdsimmo commented Dec 29, 2022

What problem does the feature solve
The localisation system is becoming increasingly more and more complex.
While it is possible to do many cool things with it - we are ultimately just reinventing the wheel (and doing a worse job)
The current syntax for "lambda" functions is ugly and confusing. Ugly example:

command.group.help: |-
      {#|heading|Help: {command|name}}
      {command|children|sort|{!it|name}|filter|{!sender|haspermission|{it|permission}}|map|{!#|map|{it|name}|{#switch|{=|{#len|{it|description}}>40}|1|{#sub|{it|description}|0|40}...|{it|description}}}|join|
      }

Describe the solution you'd like
Allow message to run scheme code.

Be able to replace the above with something like:

command.group.help: |-
      {#scheme|(heading (get command 'name))}
      {#scheme|(??? I need to learn scheme...))}

Describe alternatives you've considered
Add more and more custom functions, until a horrid language is written.

I have noticed that the macro expansion system I've created does look scheme-ish, but with braces instead of parenthesise. Possibly, the all braces could be interpreted as scheme?

Things to think about

  • Syntax for calling scheme?
  • Maybe keep simple functions like the colour functions?
  • How to pass objects
  • Syntax for declaring functions?
@mdsimmo mdsimmo added Type: Enhancement Add some functionality Status: Waiting Waiting response from maintainer labels Dec 29, 2022
@mdsimmo mdsimmo self-assigned this Dec 29, 2022
@mdsimmo mdsimmo added Status: Thinking Waiting for some good ideas and removed Status: Waiting Waiting response from maintainer labels Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Thinking Waiting for some good ideas Type: Enhancement Add some functionality
Projects
None yet
Development

No branches or pull requests

1 participant