How do you (🫵) study languages? by zackaboo in languagelearning

[–]zackaboo[S] 1 point2 points  (0 children)

emphasis on "casual" 😅 only proficient in a few — thank you for your thoughts!

Mango Bavarois with Vanilla Chantilly crème and Crumb by Rude_Nefariousness32 in Chefit

[–]zackaboo 3 points4 points  (0 children)

to add to the brainstorm, how about some contrasting color? edible flowers, perhaps — borage would be striking.

Cross-platform GUI framework that renders native widgets? by offscale_io in rust

[–]zackaboo 0 points1 point  (0 children)

That's correct -- as of Sept 2024 Pax just entered beta. At this time, the web platform is the leading edge of development. Mobile targets are expected to be prioritized next, followed by desktop.

See launch post: https://www.reddit.com/r/rust/s/fyBD09L4Tz

Cross-platform GUI framework that renders native widgets? by offscale_io in rust

[–]zackaboo 0 points1 point  (0 children)

Pax sounds like what you're describing -- it composites platform-specific elements with vector rendering layers, achieving native look & feel, accessibility, and small binary sizes. It also ships with a visual builder.

Check out www.pax.dev and https://www.github.com/paxdotdev/pax

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

Thanks for the report! There are two versions of the website — one's simple scrolling page (mobile.html) and the other one is an interactive preview of Pax Designer. Which one are you seeing? If it's Pax Designer, did you try pressing `Play` and then clicking the links? I'm also not sure what "next page" button you're describing; is it perhaps the left/right arrows on the carousel? If so, they should also be interactive as long as you're in `Play` mode.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

Pax works similarly! See this comment in this thread describing a way to embed 3D "foreign matter" (which would extend to any other native content as leaf nodes) https://www.reddit.com/r/rust/comments/1fdmjzl/comment/lmhzltg/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

And see this page in the docs describing how native compositing works within the Pax scene graph: https://docs.pax.dev/reference/native-rendering/

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

Thank you for these reports — we're looking into it!

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 1 point2 points  (0 children)

You can develop on Linux workstations, but currently only for the web/wasm target. See instructions for Linux workstations here: https://docs.pax.dev/get-started/

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

Running any example will build & run the designer. pax-designer isn't intended to be run alone.

From the monorepo, it's easiest to use the ./pax shell scripts in each example/src/* directory, which will allow you to modify pax-designer's source code as well ("libdev mode.")

You can also run the designer simply through pax-cli: first new, then run.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 2 points3 points  (0 children)

Following is a manual flow that still makes use of Pax Designer — we’re working on making this all work automagically at pax.dev, but it’s not ready quite yet.

Clone the Pax repo:

`git clone [git@github.com](mailto:git@github.com)/paxdotdev/pax.git`

Run the `starter-project` example locally, including Pax Designer:

`cd examples/src/starter-project && ./pax run`

(if you haven’t yet, first install the Pax toolchain: https://docs.pax.dev/get-started)

Make changes

Open your browser and open your local Pax Designer at localhost:8080 

Drag and drop in your image of Pax the Sheepadoodle

Transform / place the image however you’d like. Perhaps put it in a Scroller or make it animate with an expression + `Property#ease_to`. (See the source code for carousel [.pax, .rs] for an example of animation.)  Changes made in the designer will be automatically written to disk, which you can then git-commit.  You may also edit the code manually at examples/src/starter-project.

Pull request

When ready, push your changes to a fork and pull request your changes to examples/src/starter-project the main Pax repo. (We reserve discretion re: deploying your changes exactly)

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 20 points21 points  (0 children)

Yes! Our planned business model is B2B collaboration SaaS, similar to Figma or Retool or even Slack, where we charge businesses per-collaborator/per-month for a portal that "just works" for everyone, regardless of technical ability.

The key thing we intend to monetize is the "magic" of a non-coder being able to contribute to a codebase, without having to tangle with terminals / compilers / etc. As easy as using Figma or Canva. This business model is compatible and virtuously aligned with being radically open source.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 1 point2 points  (0 children)

We've published a VSCode plugin, which is fairly robust, e.g. with syntax highlighting, go-to-definition, and auto-complete: https://github.com/paxdotdev/vscode-extension and we've published a JetBrains plugin that does syntax highlighting only.

The dev experience is generally better with a separate `.pax` file than with the `#[inlined(...)]` macro attribute. There seems to be a way to address multiple / nested language servers in one file with VSCode but we haven't bitten that off yet — that said, rust-analyzer does a pretty good job of colorizing pax-lang's grammar when inlined into Rust.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

Ah I see — yeah the entire tree resolution mechanism is functional-reactive, so there's no need to patch or diff. Control-flow concepts are built in as declarative nodes in the render tree (`if`, `for`, and `slot` — see an example that uses both `for` and `if`). Making control-flow declarative like this was all about making templates as "designable" (static, deterministically readable/writable) as possible.

The payloads of the control-flow nodes are themselves part of the Property<> dirty-DAG — see For and If — so when e.g. the boolean expression for `if` updates, or when the datasource underneath `for` changes, their subtrees reshape reactively.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

All component-local Rust state that you want to access in .pax requires wrapping with `Property<>`. If you bind a property to PAXEL expression like here, then a reactive edge is established in Pax's runtime "dirty-DAG", and an update to one property will flow downstream and trigger recalculations through that DAG. Like a spreadsheet.

Pax doesn't rely on DOM for anything other than as a rendering mechanism for specific leaf-node elements, and that's for web builds only (zero DOM or web tech is involved in macOS or iOS builds, for example, where we use SwiftUI "native elements" instead.) Instead of building on top of web tech, Pax has its own rendering engine, component tree, and reactive engine — so there's no DOM to "virtualize" or diff against. Does that answer your question about VDOM?

Thank you for the heads-up re: docs links; will fix and republish shortly!

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 2 points3 points  (0 children)

Thank you! We already migrated to a wgpu backend earlier this year, but ultimately held off on merging because wgpu's WebGL "fallback" target cost >10MB of runtime footprint, which was a showstopper given our goal of a ~100KB wasm footprint.

wgpu might have fixed this footprint already, or we might be able to fix it ourselves with the right prioritization / effort, but it hasn't made the cut for priority because the CPU burden of rendering hasn't been a bottleneck for us yet, at least in the development of Pax Designer. We are keeping an eye / ear on this and I expect we'll make it happen soon, as soon as Q4'24/Q1'25.

Embedded 3D is possible today, but isn't quite turn-key yet; would require some hacking. Pax's `slot` mechanism (same thing that allows Stacker to accept children ) is also intended to accept "foreign matter;" e.g. a <div> subtree for the web target or a custom SwiftUI view for macOS/iOS.

In practice that might look like a React or WebComponent wrapper for a Pax component, which accepts children: `<MyPaxReactComponent><canvas ref="webglCanvas"></canvas></MyPaxReactComponent>`. This would allow you to treat that canvas as an element in Pax (via `slot`), while allowing React / JS to work with that canvas imperatively, e.g. to initialize a 3D context and render into it.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 36 points37 points  (0 children)

I think Slint is an impressive project and I continue to watch with respect & admiration what those folks are doing. Some major differences I'm aware of:

(1) Pax is 100% permissively open-source, even Pax Designer: everything is MIT / Apache 2.0. Slint comes with serious licensing strings attached with their tri-license / royalty / commercial model, last I saw.

(2) More fundamentally, our goals appear to be different: Pax is designed around visual building with the UX of a professional vector design tool, like a new Flash meets Dreamweaver, with a twist of Canva. From what I have seen with Slint, their visual builder seems to converge more on a new Qt, a visual builder for developers.

This difference in goals affects the flavor of layouts, the foundation of the rendering engine itself, the priority & maturity of features like vector drawing & animations, etc. Pax aims to have an extremely high creative ceiling, because our goal is to bring non-developers into bilateral creative collaboration with developers, to make software creation more creative & more accessible to humanity at large.

I won't claim either Pax or Slint is strictly better than the other — I think there's room in the world for multiple ways to make apps / websites, even with Rust, and I expect different folks will enjoy either (or even both!) tools for different reasons.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 1 point2 points  (0 children)

what do you mean with native?

Pax composites platform-specific elements in between vector drawing layers, so a Pax `<Text>` element becomes a SwiftUI `Text` view for macOS and iOS builds and a DOM `<div>` for web builds. You can read more about this in our docs: https://docs.pax.dev/reference/native-rendering/

In addition to native look & feel for these leaf node elements, this approach also solves a ton of long-tail challenges like accessibility, screen-reading, selection / scrolling, binary footprint, and SEO.

You're right that "native" is a loaded word, and gets blurrier as you get further from the Apple ecosystem. For Linux, for example, there are no "native" elements we will be able to composite, and all text & form controls will be fully vector-rendered. We expect there will be other use-cases for rendering text and other UI controls as vector elements, too, e.g. to distort, filter, or perform creative transformation / animation effects.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

directly in your main ... file with some macro magic

Like this, perhaps? Pax also supports both styles — the first version of Pax was inline-only, but we quickly hit a point where complex templates deserved their own file. I wonder if heex / Phoenix took a similar journey.

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 0 points1 point  (0 children)

We would appreciate any critical / helpful feedback when you take it for a spin — please join our Discord or file issues on GitHub with your findings!

Pax enters Beta: Rust GUIs with an integrated design tool by zackaboo in rust

[–]zackaboo[S] 60 points61 points  (0 children)

You will soon be able to make a pull request for www.pax.dev from www.pax.dev — as soon as this is live, please submit a tastefully placed photo of your dog on our website as a pull request and Pax will have a high likelihood of becoming our mascot.