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

consider server-side lua syntax checking and analysis #135

Closed
pq opened this issue Jul 19, 2018 · 1 comment
Closed

consider server-side lua syntax checking and analysis #135

pq opened this issue Jul 19, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@pq
Copy link
Collaborator

pq commented Jul 19, 2018

maiden uses a customized ace editor mode to provide an editing experience tailored to lua for norns. out of the box, ace provides basic client-side syntax highlighting and a web-worker-based syntax checker. though we've done a bit of customization already, there's a limit to how much we can change practically. notably, the syntax checker is not easily enhanced or replaced and even trivial changes to the parser are tricky to integrate (see: #9) .

work on the client-side has more fundamental limitations as well. doing semantic analysis in the browser (to provide, for example, awareness of norns functions or offer lua linting) is not practical. nor is rich code transformation (such as formatting or refactoring).

as alluded in #125, i've been playing with some ideas and have them far enough along that i'd like to open up a proper conversation. my WIP, called "scry" is up here:

https://github.com/pq/scry

it demonstrates server-side static analysis and linting and on-demand lua formatting.

the scry server is tiny and mostly lua, leveraging two lua libs: luacheck for static analysis and lcf for formatting (both are small and seem stable); it's wrapped in a small node server. were scry to be integrated into norns in a first class way, i'd imagine scry would run along-side matron and crone in much the same way (e.g., using ws-wrapper or similar, but certainly not node).

needless to say thoughts and considerations welcome! 👍

@pq pq added the enhancement New feature or request label Jul 19, 2018
@pq
Copy link
Collaborator Author

pq commented Mar 8, 2020

as enamored with this idea i am, i think it's best to close for now. if there's interest, we can re-open and i can dust off my scry prototype.

@pq pq closed this as completed Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant