Skip to content

divide 0.5.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 21:18

divide 0.5.0 works with Divengine Runner's Flows. You can run, pause and resume them, and edit their Blocks and Steps from the keyboard. The project window now follows changes made outside divide, and five monochrome phosphor themes join the colour themes.

Runner Flows

  • Run, pause and resume.
    • Running: Ctrl+F9 on a YAML Flow opens Run Flow. You give it an initial context (a JSON file, or JSON typed there), a function root and the file the context is saved to. The fields are remembered per Flow.
    • How it runs: Runner's own command line runs the Flow (vendor/divengine/runner/bin/run.php, Runner 0.2.0 or newer, from the project's Composer installation).
    • What you see: the run ends done, paused, with an error, stopped or not run. The Output window shows Runner's log and the resulting context; Messages lists Runner's diagnostics and PHP's errors.
    • Resuming: a paused run is saved, and Resume continues it in a new PHP process without repeating a Step. divide never starts a paused run over without asking. Esc stops a run and leaves the saved context as it was.
    • Where the context goes: by default under .div/runner/, one file per Flow, kept out of Git.
  • The Flow window. Ctrl+T on a Flow shows its Blocks and Steps as a tree, next to the selected item's attributes, where its call and jump lead, and which function file it uses.
    • Editing: Enter edits a Step (condition, activity, module, call, jump, context, pause), Ins adds one and Del deletes one.
    • Going places: Ctrl+Enter goes to a target or opens a function file, and Ctrl+T goes back to the YAML line.
    • Running: Ctrl+F9 runs the edited Flow.
  • Only what you change is written. The YAML file stays the Flow. Each edit changes only its own characters or lines, and is checked by reading it back; one Ctrl+Z undoes it. Comments, key order and formatting stay as written. An edit that would remove a comment is refused and points you to the code.
  • Checked by Runner's own compiler, without running anything. Problems show in the tree, under the code and in Messages (Alt+F9):
    • unknown keys and wrong types;
    • call and jump targets that are not in the Flow;
    • activity and condition files missing where Runner would look for them.

See Running Flows and Flow Structure in the help.

The project window follows outside changes

Files and folders that git, Composer, a generator or a shell creates, deletes, renames or moves show by themselves, usually within half a second. A move between two open folders shows on both sides.

  • Nothing is polled. divide uses the system's own notifications (inotify, FSEvents, ReadDirectoryChangesW) on the project's folder and the folders you have open, one by one, up to 64.
  • Bursts are gathered. A checkout or a composer install is read once per folder.
  • Your place stays. The bar, open folders, scroll position and filter do not move.
  • Open editors are never reloaded.
  • Ctrl+R still refreshes, for network filesystems that send no notifications.

See Project Window.

Phosphor themes

Options > Colors and --palette have five new themes: Phosphor White, Phosphor Green, Phosphor Green Black, Phosphor Amber and Phosphor Amber Black. Each uses one hue in levels of light; the Black variants have a pure black screen.

They don't rely on hue, so divide tells states apart in other ways:

  • reverse video for selections and bars;
  • brightness: errors over warnings, the execution line over breakpoints;
  • underlined warnings and hotkeys, struck-through deletions, italic comments;
  • marks in the editor's margin: ► the line about to run, ■ a breakpoint, + - ~ Git's changes.

With 16 colours, a phosphor theme uses only black and its own hue's ANSI colours. The existing themes look exactly as before. See The Desktop.

Also

  • Options > Colors shows the themes in two columns, and its buttons keep their shadow.
  • The Spanish interface and the help in English and Spanish cover all of the above.

Known limits

  • Runner: running and editing Flows need PHP 8.1 and Runner 0.2.0 or newer in the project. divide runs a Flow to its end or pause, with no stepping, simulation or breakpoints. Blocks are added and renamed in the code.
  • Watched folders: at most 64 at a time. On Linux the inotify limits apply, and network filesystems may send no notifications; Ctrl+R refreshes in both cases.
  • Monochrome themes: the default button is told from the others only by its colour.

Install

Ready to run, with nothing else to install:

  • macOS and Linux: brew install divengine/tap/divide
  • Windows: scoop install https://github.com/divengine/divide/releases/latest/download/divide.json, or the .msi below
  • Linux: the .deb, .rpm, .apk and Arch packages, the AppImage or the binary alone, below
  • macOS: the archive for Apple silicon or Intel, below

Rendering and checking includes need PHP 8 and Div (composer require divengine/div); Runner Flows need Runner (composer require divengine/runner); the Git menu needs git. divide is free software under the GPL, version 3 or later. The binaries are not signed yet: see Installation.