Skip to content
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

Plan for WildcardLISP #1

Open
microlith57 opened this issue Apr 8, 2019 · 2 comments
Open

Plan for WildcardLISP #1

microlith57 opened this issue Apr 8, 2019 · 2 comments
Assignees

Comments

@microlith57
Copy link
Contributor

microlith57 commented Apr 8, 2019

  • Should we interpolate in server or client?
  • /@(?'lisp'\((?>(?1)|[a-z0-9@]| )*\))/i
LISP_REGEX = /@(?'lisp'\((?>(?1)|[a-z0-9@]| )*\))/i
# ...
parameter.gsub! LISP_REGEX do |match|
  # do WildcardLISP magic here; return interpolated result
end
@microlith57 microlith57 self-assigned this Apr 8, 2019
@microlith57
Copy link
Contributor Author

More thoughts:

  • Interpolate only on client
  • !(lisp) -> evaluate immediately
    • Then ! character implies urgency/immediacy so is good for 'evaluate-now' behaviour
    • Maybe in triggers have something like so:
trigger use @(exec 'create a !(+ "large" " " "teapot")')
use the machine
-> @(exec 'create a !(+ "large" " " "teapot")')
-> create a !(+ "large" " " "teapot")
-> create a large teapot
  • Triggers act normally
    • Now multiple / vessel
    • Programs replaced with @exec wildcard which runs actions
    • Example of a program-like trigger above
  • @(lisp) -> evaluate every read (eg in trigger / name / note etc.)
    • The @ character should stay with this behaviour as this is how it has always worked

@neauoire Any thoughts?

@microlith57
Copy link
Contributor Author

microlith57 commented Apr 13, 2019

Updated regex:

/(?'type'[@!])(?'lisp'\((?>(?2)|[a-z0-9@]| )*\))/i

However need to come up with list of allowed characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant