m Papaltine moved page ProtoGraph to User:Papaltine/ProtoGraph: move under user |
m update links and code |
||
Line 2: | Line 2: | ||
== Overview == | == Overview == | ||
* ''' | * '''Paradigm''': [[wikipedia:Dataflow_programming|Dataflow]] | ||
* '''Family''': ML: Caml: OCaml: F# | * '''Family''': ML: Caml: OCaml: F# | ||
* ''' | * '''Designers''': [[User:Papaltine|Papaltine]], [[User:Kittysquirrel|Kittysquirrel]] | ||
* '''Developer''': [[User:Papaltine|Papaltine]] | * '''Developer''': [[User:Papaltine|Papaltine]] | ||
* '''Stable Release''': N/A (Currently in Alpha) | * '''Stable Release''': N/A (Currently in Alpha) | ||
Line 39: | Line 39: | ||
== Example: Cross Product Module == | == Example: Cross Product Module == | ||
<syntaxhighlight lang="fsharp"> | <syntaxhighlight lang="fsharp" line="1"> | ||
module CrossProduct | module CrossProduct | ||
input A: float3 | |||
input B: float3 | |||
output this: float3 | |||
where { | where { | ||
// Inputs | |||
let Ax, Ay, Az = Unpack_Float3(A); | |||
let Bx, By, Bz = Unpack_Float3(B); | |||
// Computations | |||
let Cx = (Ay * Bz) - (Az * By); | |||
let Cy = (Az * Bx) - (Ax * Bz); | |||
let Cz = (Ax * By) - (Ay * Bx); | |||
// Final result | |||
Pack_Float3(Cx, Cy, Cz); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 12:22, 9 June 2025
ProtoGraph is a declarative programming language designed to work with ProtoFlux in the Resonite ecosystem. It allows creators to write logic in a clean, readable text format that compiles directly into ProtoFlux nodes—making it easier to build, test, and maintain complex systems.
Overview
- Paradigm: Dataflow
- Family: ML: Caml: OCaml: F#
- Designers: Papaltine, Kittysquirrel
- Developer: Papaltine
- Stable Release: N/A (Currently in Alpha)
- License: AGPLv3
- Target Platform: Resonite (via ProtoFlux)
- File Extension:
.pg
- Compiler Tool:
flux-sdk
- Repository: Flux SDK
- Compiled Format:
.brson
(Resonite Record) - Influenced by: F#, Elm, Python, Haskell, Odin
Who Should Use ProtoGraph?
- Creators who want to move beyond visual scripting
- Developers building modular, reusable systems
- Teams collaborating on large-scale Resonite projects
Benefits
- Readable: Clean syntax that mirrors ProtoFlux visually
- Modular: Encourages reusable code through modules and packages
- Safe: Compiler checks help catch errors early
- Accessible: Friendly to those familiar with ProtoFlux as a first programming language
Building and Using in Resonite
- Write your
.pg
file - Compile it:
flux-sdk build MyModule.pg
- Import the
.brson
file into Resonite - Inspect the generated ProtoFlux under the corresponding slot
Example: Cross Product Module
module CrossProduct
input A: float3
input B: float3
output this: float3
where {
// Inputs
let Ax, Ay, Az = Unpack_Float3(A);
let Bx, By, Bz = Unpack_Float3(B);
// Computations
let Cx = (Ay * Bz) - (Az * By);
let Cy = (Az * Bx) - (Ax * Bz);
let Cz = (Ax * By) - (Ay * Bx);
// Final result
Pack_Float3(Cx, Cy, Cz);
}