66 karma · joined March 8, 2021
See Jozsa & Linden 2003: https://arxiv.org/abs/quant-ph/0201143
So to actually get a quantum speedup, these quantum computers will need to be connected with quantum channels, which are possible IRC with fiber optic links (eg. by using the quantum state of the photons). But that is not the case.
You would have to either self-host your own VPN server somewhere (maybe on a public cloud provider) or if you are truly paranoid, use something like Tor.
Basically its a service that automatically crawls your docs and creates a search index and widget that you can include on your website.
A general website will likely need a lot more data in the form of images and other media so all in all this is not too bad.
The reason why bundle size for JS is so important is that the browser needs to first download the JS, parse the JS, then JIT compile it before it can start running. For WASM on the other hand, the browser can in fact parse it while downloading in parallel and then run it almost immediately since WASM is much lower level. So for WASM the main bottleneck is downloading whereas JS, it is parsing and compiling.
I feel like combining the drawing layer from one of these existing native UI frameworks with Sycamore could be interesting in reducing some of the boilerplate with GTK, Iced, GPUI, etc...
But Sycamore does have ambitions to have native GUI support as well. I'm currently looking at GTK, Iced, and GPUI and see if it would be possible to add Sycamore support. This would make it possible to create GTK, Iced, or GPUI apps using building blocks from Sycamore.
I'm also looking for new contributors and maintainers!
One remaining major difference is that Dioxus uses a VDOM (Virtual DOM) as an intermediary layer. This has a few advantages such as more flexible rendering backends (they also support native rendering for desktop apps), at the cost of an extra layer of indirection.
Creating native GUI apps should also be possible in Sycamore, and something I'm interested in although there is currently no official support. However, I think one of the big differences with Dioxus would be that Dioxus supports "one codebase, many platforms" whereas I think that is a non-goal with Sycamore. Web apps should have one codebase, native apps should have another. Of course, it would still be possible to share business logic but the actual UI code will be separate.
In sycamore, the component function only ever runs a single time. Instead, Sycamore uses a reactive graph to automatically keep track of dependencies. This graph ensures that state is always kept up to date. Many other libraries also have similar systems but only a few of them ensure that it is _impossible_ to read inconsistent state. Finally, any updates propagate eagerly so it is very clear at any time when any expensive computation might be happening.
For more details, check out: https://sycamore.dev/book/introduction/adding-state
There are also a bunch of examples at https://github.com/sycamore-rs/sycamore/tree/main/examples
You can see the deployed versions at https://examples.sycamore.dev/<example name>/ for instance: https://examples.sycamore.dev/todomvc/
Full source code for the simulations and animations is available here: https://github.com/lukechu10/interplanetary-transport-networ...
Simulations were written in Rust and animations were created in Python using the great Manim library!
It allows fine-grained reactivity to the DOM with no virtual DOM layer whatsoever! The reactivity system is based on signals and subscribes/dependents. For ergonomics, dependencies on signals are automatically detected. Here is an example:
let (state, set_state) = create_signal(0);
create_effect(move || {
println!("The state changed. New value: {}", state());
}); // prints "The state changed. New value: 0" (note that
the effect is always executed at least 1 regardless of state changes)set_state(1); // prints "The state changed. New value: 1"
set_state(2); // prints "The state changed. New value: 2"
set_state(3); // prints "The state changed. New value: 3"
Creating DOM nodes is accomplished with the template! proc-macro. When a signal is used inside the template! macro, create_effect is implicitly called and the is DOM updated whenever the value changes.
If you look at some of the examples in the README, you will find that the API is quite similar to that of React hooks. Unlike React hooks, however, the actual function is only executed once and it is the effects that are executed multiple times. This means that the template! macro can generate real DOM nodes and it is the code inside create_effect that is executed multiple times to update the DOM.
Disclaimer:
The library is currently very WIP and very feature incomplete. For instance, it is not possible to get references to DOM nodes without manually creating them outside of the template! macro.
If you are willing to help out, please head over to the GitHub repository. Feedback, issues and PRs are greatly appreciated!