How dyalog/ride works
Project type and purpose
• Ride is a cross-platform desktop IDE built with Node.js and web technologies (HTML, CSS/LESS, JavaScript), packaged as native apps via Electron (implied by main.js, packaging scripts, CI for win/linux/osx).
• It connects to a local or remote Dyalog APL engine for editing, debugging, workspace browsing, etc.
File structure
• Top-level “src/” → the core JavaScript modules for both the Electron main process (main.js) and renderer (ide.js, cmds.js, dbg.js, ipc.js, etc.).
• “style/” → CSS and LESS files for theming/layout (bootstrap, goldenlayout, Monaco integration).
• “CI/” and “packagescripts/” → scripts for building, signing, packaging for Windows, macOS, Linux.
• “tools/” and “utils/” → code-generators (keyboard, menu, help URL checkers), sample extensions → plugin architecture.
• “test/” → unit tests for core modules (cn.js, ed.js, lb.js, se.js).
• Configuration files: package.json, gruntfile.js, nodemon.json, mkdocs.yml → build, watch, doc generation.
README
• Confirms Node.js v18, npm scripts to compile CSS (npm run css), run in dev mode (npm run dev), package native apps (npm run build dist).
• Describes remote access, full documentation link.
Components
a. Electron shell
– Main process (main.js): application lifecycle, menu, window creation, native APIs
– Renderer processes (one per window): UI modules under src/, CSS/LESS from style/
b. IPC layer (src/ipc.js): message bus between main and renderers
c. Dyalog APL engine
– Local (spawned child process via Node APIs)
– Remote (TCP/WebSocket connection, protocol.md describes wire protocol)
d. File system & configuration
– Workspace files, settings, session files
e. Extensions/plugins
– sample-extensions folder shows plugin entry points
f. Build & packaging pipeline
– CI server (Jenkinsfile) → runs tests, lint, build
– Platform scripts under CI/packagescripts → sign, notarize, package for each OS
g. External services
– GitHub Releases (publish.sh), Lintian, rpmlint, Apple notary service
Relationships and interactions
• UI → sends commands via IPC → main process → routes to APL engine or file system → returns results back via IPC → UI.
• CI pipeline → triggered by commits/tags → executes packaging scripts → outputs native installers.
• Developer local flow → npm scripts → Grunt tasks → CSS compilation, reload via nodemon → live reload in Electron.
Architectural patterns and principles
• Separation of concerns: UI logic (renderer) vs native integration (main)
• Plugin architecture: modular code generators, sample extensions
• Build pipeline as code: CI scripts maintain reproducible packaging
• MVC-style in UI modules: cmds.js (controller), listview.js (view), util.js (model helpers)
Diagramming conventions
• Use rectangles for components (Main, Renderer, APL Engine, CI server, Packaging scripts)
– UI → IPC → Main → APL
– CI → scripts → native installers
– Blue for runtime components
– Green for build/deploy components
– Yellow for external services (GitHub, Apple notary)