VJ UNION

Cover image for Praxis Live 5.5.0
vdmo
vdmo

Posted on • Updated on

Praxis Live 5.5.0

rethinking general purpose and creative coding

PraxisLIVE https://www.praxislive.org/ is a hybrid visual IDE for live programming - a nodes and code system providing the benefits of both visual and textual coding, while aiming to counter some of the deficiencies of both.** PraxisLIVE** began as a tool for creative coders, but has broadened to embrace more general purpose programming, while retaining access to features for creatives.

PraxisCORE is at the heart of PraxisLIVE, a modular real-time recodeable actor system. It can be used via PraxisLIVE, for exporting standalone projects, as a command line tool, or as individual libraries. Supporting distributed processes and hot code reloading at all times, it brings aspects of Smalltalk, Erlang and Extempore to the Java platform.

Download from www.praxislive.org

Image description

All of PraxisLIVE is free and open-source. PraxisCORE is free to use in open-source and commercial projects. Development is supported by Codelerity Ltd., who can also provide commercial support and custom development.

Image description

Primary features

...imagine combining the best of Java or Processing with the best of visual node-based systems like Node-RED; imagine components defined as code fragments, so you're never constrained by what comes built-in; imagine forking components or creating new ones all while your project is running...

Real-time processing. Forest-of-actors architecture for low-latency, data processing, media & embedded. Optional graphics module with support for Processing, GStreamer and OpenGL. Optional audio with Pipes and JACK.

Intuitive graphical patching. Node-based actor graph editing for fast visual project building. Drag & drop components, draw in connections. Edit everything live - instant feedback without interrupting flow.

Extend at runtime. Fork components on-the-fly, or create new ones from scratch, with real-time code reload. Integrated live Java editor and compiler. Export and share, or import from a growing library.

Distributed by Design. Built from the ground up for working with multiple pipelines using a distributed architecture. Option to run projects transparently across processes or machines.

GitHub logo praxis-live / praxis-live

PraxisLIVE IDE - (cluster: praxis_live)

PraxisLIVE

PraxisLIVE v5 screenshot

PraxisLIVE - a hybrid visual live programming IDE, rethinking general purpose and creative coding.

PraxisLIVE is built around PraxisCORE, a modular JVM runtime for cyberphysical programming, supporting real-time coding of real-time systems. With a distributed forest-of-actors architecture, runtime code changes and comprehensive introspection, PraxisCORE brings aspects of Erlang, Smalltalk and Extempore into the Java world ... a powerful platform for media processing, data visualisation, sensors, robotics, IoT, and lots more!

PraxisLIVE and PraxisCORE are open-source projects developed by Neil C Smith, and now supported by Codelerity Ltd..

Website & Downloads

See www.praxislive.org for more information and downloads.

There is also an online manual at https://docs.praxislive.org

Support, bugs and feature requests

For general support or to discuss usage and development of PraxisLIVE, please check out the Community page for links to our mailing list, online chat, etc.

Please report bugs or make specific feature requests on the issue

PraxisLIVE v5.5.0

PraxisLIVE v5.5.0 adds some key features in our evolution towards v6. These include sharing base code across components, function controls bound to methods, and an async API for calls and tasks.

The IDE is updated to be based on Apache NetBeans 16, with support for JDK 19. OpenJDK 17 LTS from Adoptium is still included in all OS specific bundles. Use the zip download to run with other JDKs or architectures.

Windows, macOS and Linux packages are now all built using NBPackage. The Windows and macOS installers are signed by Codelerity. We are no longer providing AppImages for Linux, but providing both DEB and RPM packages.

Key changes
Shared base components
It's now possible to share base component code across multiple components in a graph. Right-click on a component and select Create shared base. You can then duplicate the component (CTRL-D) and update all instances at the same time. Individual component code can still be added to extend or override the base component features.

The fast edit action (SHIFT-doubleclick or SHIFT-RETURN) will open the base component code for editing as long as the component has not extended the base code.

praxis ui
As a side effect of changes for base components, properties, controls and ports no longer have to have a unique index. They are sorted by index then alphabetically. This allows for code such as @In(1) PImage in1, in2; or @P(1) @Type.Number(min=0, max=1) double x,y,z; to work.

An important limitation on the current shared base component support in the IDE is that copy & paste of components across different graphs will not copy the shared base code - you must copy that in place manually first.

Function controls and value mapping
It's now possible to create function controls by annotating a method in a component with @FN.

eg

`@P(1) @Type.String(def = "Hello") String greeting;

@FN String greet(String name) {
return greeting + " " + name;
}`

This is most useful when used with the Async API (below) to call a component in another graph to process data for you.

As part of this support, mapping between Java types and PraxisCORE Value types has been improved. The various casting methods such as d(..) and s(..) have been deprecated and replaced with upper case (D(..) and S(..)) equivalents with improved behaviour. There is also V(..) for converting from Java types to Value.

Async calls and tasks
There is now a basic Async API for making control calls where you want the return value, as well as support for arbitrary background tasks. Methods return an Async object that currently must be polled for the result. Store the async object in a field marked with @Persist to ensure it survives code changes. Further improvements are underway here.

Calling a function control
Call a function control using ask(..)

`@Persist Async response;

@T(1) void trigger() {
    response = ask(ControlAddress.of("/data/greeter.greet"), "<NAME>");
}

@Override
public void update() {
    if (response != null && response.done()) {
        if (response.failed()) {
            log(ERROR, "<FAIL> " + response.error());
        } else {
           log(INFO, response.result().args().get(0).toString());
        }
        response = null;
    }
}`
Enter fullscreen mode Exit fullscreen mode

An async task
For basic tasks which don't rely on properties or data of another component, you can also async(..) that will run the provided code in background thread. Be careful to pass in all required data in the first argument and not access any component data in the background thread!

`@P(1) String name;
@Persist Async response;

@T(1) void trigger() {
    response = async(name, n -> "Hello " + n);
}

@Override
public void update() {
    if (response != null && response.done()) {
        if (response.failed()) {
            log(ERROR, "<FAIL> " + response.error());
        } else {
           log(INFO, response.result());
        }
        response = null;
    }
}`
Enter fullscreen mode Exit fullscreen mode

In the meantime, also check out the testsuite projects -

https://github.com/praxis-live/praxiscore/tree/master/testsuite/tests/core/async-functions
https://github.com/praxis-live/praxiscore/tree/master/testsuite/tests/core/shared-delegates

Discussion (0)