Examples

Divooka Compute ships a library of example documents - games, charts, terrains, sound, 3D models and buildings, data analysis, web pages, phone apps, GPU kernels, terminal programs, benchmarks and more - sorted into categories. You never edit a shipped example: you open a copy of it wherever you like, and change the copy as much as you want. Or let the Application Wizard make one for you.

Finding one

  • On the start screen, Or from an example shows four. Shuffle draws another four; click a card to open a copy of that one.
  • New from examples shows them all. Open it with Browse all on the start screen, Examples on the start screen's rail, or Ctrl+Shift+E.

New from examples: the Application Wizard row and the categories on the left, the examples of one in the middle, and a picture of the selected example's graph with its description on the right

The categories are on the left, with how many examples each holds - hover over one for what it is about - and the examples of the chosen category in the middle, with how many graphs and nodes each has. The keyboard starts in Search examples: type to find one by name. The examples and their categories are named in the language chosen in Appearance and settings. The right half describes the selected example: its title, author and description, and a picture of its graph drawn from the document itself. Drag the picture to pan it and scroll to zoom, or click it for a larger view; when an example has several graphs, the row above the picture switches between them.

Basics is the place to start: values and nodes, arrays and collections, dictionaries (Counting Words), functions passed around as values, a Function drawn right to left, notes and drawings, and programs that read what you type.

Opening a copy

The Save as box at the bottom holds the name the copy will have - the example's own, unless you type another. Press Open a copy. A save dialog asks where the copy should live, starting in the first folder of your workspace - or in a Divooka folder in your Documents when the workspace is empty, in which case the folder you save into joins the workspace. Save, and the copy opens in a tab of its own; the status bar reads Opened a copy of Hello World.

The copy is an ordinary document: run it with F5, in either mode, change it, and save it with Ctrl+S. An example that references no packages - Hello World is one - is offered every node the distribution ships; see References for making it reference only what it uses.

The Application Wizard

Above the categories in New from examples is a row of its own, Application Wizard, with a wand. It makes a document of your own by asking what you want, one question at a time, and building it from the shipped examples.

  1. Click Application Wizard. The first question is What do you want to make?, with sixteen cards under six headings:

    Heading Cards
    Applications A desktop app with a window, A console tool, A phone app, A Python program
    Data A data report, A web dashboard
    Games and stories A game, A visual novel
    Pictures and sound A picture on the graphics card, A piece of music
    3D and engineering A 3D scene, A CAD part, A terrain
    Work and automation A workflow, An automation script, Office documents

    The Application Wizard's first question, What do you want to make?, with its cards under their headings

  2. Choose a card and press Next, or Enter. What follows depends on the choice: what the document is called, which example to start from where there are several, what it should say, and which of its parts you want - none ticked until you tick them. Choices are cards to choose or tick (Space, or a double-click to choose and go on), and text and numbers are typed in a box. What the wizard suggests is chosen already.

  3. The answers so far stand as a trail at the top: click one to go back to that question with its answer chosen. Back, or Alt+Left, goes back one.

  4. The last page is a summary: the document's name and what it starts from, the Answers, the graphs it will hold and the parts Left out, and the Starting values set. Change the name in Save as if you like, and press Create.

    The summary for Ada's Tool, a console tool from Greeter: Answers, Graphs, Left out, Starting values, Save as and Create

  5. A dialog asks where it should live - Where should Ada's Tool live? - or, for an example that carries files, which folder it should go in. The document is made under the status line's turning circle, opens in a tab of its own, and the status line reads Created Ada's Tool.dvk.

What the wizard makes is a shipped example, changed three ways: its name becomes the file's name and its title, your answers are the starting values of its data members, and the parts you left out are taken away with every call to them. So A console tool starting from Greeter, called Ada's Tool, greeting with Hi and keeping only Ask Name, runs and prints Hi, Ada!, and nothing about letters.

Before running some of them

Most examples run as they are. A few reach outside Divooka Compute, and each says so in its description:

Category What it needs
Automation It moves the real mouse pointer and presses keys in other programs until you press Esc. Read its notes first.
ComfyUI ComfyUI already running on your machine.
GenAI (Hosted) A language model available locally.
GenAI (Services) An API key for a paid online service, which it calls.
Android An Android phone connected by cable, to run on it; see Android phones.
Networking Chat Server and Chat Client talk to each other: run the server in one Divooka Compute window and the client in another.
Benchmarks Nothing, but it is heavy: run it Compiled.

A Glaze game plays in the Active Preview, with its keys and its pointer: click the picture to give it the keyboard, and Move to a separate window gives it a window of its own; run on its own - from stew, Divooka Player or a published program - it opens its window. While a game has the keyboard, the editor keeps Ctrl and Alt keys and Shift+F5, so Stop always works. A form in GUI or Components Graph runs in the Active Preview too. The other examples with windows - the GUI applications made with the GUI Framework, the Visual Novel games - open a window of their own when they run; close it to end the run. Examples that serve a web page open it in your browser, and run until you press Stop. Terminal › Terminal Demo takes the whole console: see Running and the console.