Shards is a high-performance, multi-platform, type-safe programming language designed for visual development.
Shards is a dataflow visual programming language that makes app development accessible to all. It uses a straightforward system of connecting visual blocks, called shards, to build full-fledged apps and games without coding. Wires powered by a lightweight cooperative concurrency model, glue sequences of shards together, preventing the complicated spider webs usually associated with visual development. Automatic type checking provides reliability, while optimized shard implementations ensure high performance. The intuitive visual workflow allows beginners to quickly build powerful, multi-platform apps.
In Shards, the code's syntax and its computational graph of interconnected shards and wires semantically represent the same visual model. This synergy allows for seamless round-trip engineering, with visual development applications capable of visually loading the computational graph from the code and subsequently generating its code representation.
Shards powers an upcoming AI-powered game creation system where communities can play and collaborate in real time. While Shards is often not explicitly seen there, it is the language behind the AI-assisted visual interactions that will allow users to create games and experiences in a low to no-code environment.
In Shards, every primitive is a shard, flowing from shard to shard, to build a computational graph that represents a visual model.
["Hello " @name] | String.Join | Log >= message
"!" | AppendTo(message)
message | Log("new message")
Run with: ./shards new hello.shs name:Astarion
Will print:
[info] [2023-09-23 22:21:34.528] [T-28912] [logging.cpp::68] [root] Hello Astarion
[info] [2023-09-23 22:21:34.532] [T-28912] [logging.cpp::62] [root] new message: Hello Astarion!
To start developing with Shards, you'll need to set up your environment and then build Shards.
Shards scripts end with the .shs
extension and can be directly run from the console using:
./build/debug/shards new <filename>.shs
Shards language features are documented here, while the API can be found here.
[!NOTE] The code samples in this readme are programmed using the new Shards syntax. The documentation for the new syntax will be released very soon. Stay tuned!
Shards achieves zero-compromise on four goals: Reach, Correctness, Performance, and Simplicity.
Using visual development engines like Rare, anyone can build complex applications like games, without prior coding skills.
Shards is available in all major platforms: OS X, Windows, Mac, browser, Android, and iOS.
Visual development powered by shards is suitable for solving a wide range of problems, from performance demanding games, to utility shell scripts, with batteries included: 550+ shards for all kinds of purposes.
Shards automatically infer types and validate the compatibility of these types based on the data flowing in and out from shards. This helps catching type errors and ensures that the data passed between shards is of the correct type.
Zero waste round-trip code generation during visual development due to direct mapping between generated Shards code and loaded computational graph, both representing a visual model.
The straightforward architecture flow of shards allows for fast composition of the computational graph, enabling quick loading of programs.
Inferring and validating types at compile time allows programs to run faster, as we no longer need to worry about types during runtime.
Each primitive (shard) in the computational graph was programmed to the highest standards of performance, using C++ and Rust.
Built on top of co-routines. It’s extremely easy to unleash parallelism while maintaining a low syscall count.
Shards is just shards flowing into shards, thus:
Shards source code is licensed under the BSD 3-Clause license.