Talk:Proposal Nyquist IDE
GUI Ideas
The IDE could offer both text based and block based editing. The two kinds are isomorphic:
One reason to offer blocks at all is to have a supply of blocks that can be dragged into the program - as most block based languages do. This makes learning what commands are available much easier. Especially important for the aud-do blocks.
Blocks also potentially make clearer the bracketing, and prevent mismatched brackets. It seems sensible to optimise the GUI of the IDE for learners.
We certainly want text too as programs will be stored as text.
Blocks for Nyquist Effect Dialogs
Snap-together blocks can also be used to construct ShutlleGui dialogs. Like any traditional GUI builder, you drag GUI elements into the right positions. The configured and nested blocks could easily be used to create the relevant Nyquist code.
Further Brainstorming...
- Installation: The module should be called mod-nyq-workbench and ship with Audacity.
- Syntax Highlighting: The module should have some API designed with Scintilla compatibility in mind. This will give us normal syntax highlighting and also, as Sonic-Pi uses Scintilla, will pave the way for more collaboration on audio software. Note that syntax highlighting is only one option for using colour in code. Library highlighting often can make more sense. For large programs, picking out a library, such as aud-do, in a separate colour can be extremely valuable for seeing the structure of the program. Scratch in fact uses colour in this way, picking out booleans (in green) and libraries e.g. for drawing in a different colour.
- Layering: The block/text based UI will operate off a definition file. Thus whether it uses SAL or LISP is configurable.
- Parentheses matching: This is an essential feature in text. Making this slick will be fun to brainstorm and design. Parentheses matching interacts with indentation as we want to indent when brackets have not been closed, and to show 'correspondence lines'. The block based part of the interface may suggest styling/behaviour for parenthesis matching.
- Monospace font: We also need to ensure that the GUI has some support for unicode - for future proofing the GUI. This means in particular that we may not always have suitable monospace characters. We may need to show numeric codes in this case, or 'html' character names like &white-queen;
- Plug-in boilerplates: Scratch has a Stock-Strip (aka palette) for commands that can be dragged in. We can have one and put boilerplates and snippets on that too.
- Debug Window: Doing this well is hard because XLISP does not have excellent hooks for a full debugger. We may have to do this by hidden mutation of code. So we send code with debugging steps in it to XLISP. Again this is well worth brainstorming and designing.
- Interrupt: We should have pause, step, step-over, resume, very much like the transport buttons. We should have some visual modifier to indicate that these buttons are for code rather than for audio. One idea is to use icons similar to those in MSVC and overlay our play/pause/stop icons in bottom right of icon.
- AUD-DO Support: These should be in the stock strip too, with placeholders for the parameters.
- Snippets: These should be in the stock strip.
- Apropos: There shouldn't be a need for this plug-in. It should be that we can easily get/filter information from the stock strip.
- Plug-in Support: We should increase the flexibility of macros, including macros that use nyquist. I think this is a more productive strategy than making a very local support for plug-ins in the workbench. A key problem though is carrying variables between macro invocations. We need a design for how and when to do that.