design
wave
Our great sponsors
design | wave | |
---|---|---|
32 | 21 | |
11,343 | 3,852 | |
0.2% | 1.0% | |
3.4 | 9.2 | |
about 2 months ago | 5 days ago | |
Python | ||
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
design
-
Reaching and surpassing the limits of JavaScript BigData with WebAssembly
With WebAssembly we can compile our C++ codebase into a wasm module for the browser. So when you look at a SciChart.js chart you're actually seeing our C++ graphics engine wrapped for JavaScript.
-
WASM Instructions
I should add, however, that the unmentioned elephant in the room is V8 JIT (TurboFan), which simply doesn't handle irreducible control flow. While there are some valid theoretical arguments around the current arrangement in Wasm, looking at the history of the associated discussions makes it pretty obvious that having V8 support Wasm and generate fast code similar to what it can do for asm.js was an overriding concern in many cases. And Google straight up said that if Wasm has ICF, they will not bother supporting such cases, so it will be done by a much slower fallback:
https://github.com/WebAssembly/design/issues/796#issuecommen...
AFAIK no other Wasm implementation has the same constraint - the rest generally tend to desugar everything to jumps and then proceed from there. So this is, at least to some extent, yet another case of a large company effectively forcing an open standard to be more convenient for them specifically.
-
Supercharge Web AI Model Testing: WebGPU, WebGL, and Headless Chrome
https://github.com/WebAssembly/design/issues/1397
> Currently allocating more than ~300MB of memory is not reliable on Chrome on Android without resorting to Chrome-specific workarounds, nor in Safari on iOS.
That's about allocating CPU memory but the GPU memory situation is similar.
-
Build your own WebAssembly Compiler
As far as I can tell (5 minutes of internet research) this was to allow easier compilation to JavaScript as a fallback in the days when WASM wasn't widely supported.
"Please add goto" issue has been open since 2016:
https://github.com/WebAssembly/design/issues/796
Most interesting comment:
> The upcoming Go 1.11 release will have experimental support for WebAssembly. This will include full support for all of Go's features, including goroutines, channels, etc. However, the performance of the generated WebAssembly is currently not that good.
> This is mainly because of the missing goto instruction. Without the goto instruction we had to resort to using a toplevel loop and jump table in every function. Using the relooper algorithm is not an option for us, because when switching between goroutines we need to be able to resume execution at different points of a function. The relooper can not help with this, only a goto instruction can.
> It is awesome that WebAssembly got to the point where it can support a language like Go. But to be truly the assembly of the web, WebAssembly should be equally powerful as other assembly languages. Go has an advanced compiler which is able to emit very efficient assembly for a number of other platforms. This is why I would like to argue that it is mainly a limitation of WebAssembly and not of the Go compiler that it is not possible to also use this compiler to emit efficient assembly for the web.
^ https://github.com/WebAssembly/design/issues/796#issuecommen...
-
Flawless – Durable execution engine for Rust
When I implemented a WASM compiler, the only source of float-based non-determinism I found was in the exact byte representation of NaN. Floating point math is deterministic. See https://webassembly.org/docs/faq/#why-is-there-no-fast-math-... and https://github.com/WebAssembly/design/blob/main/Nondetermini....
-
Requiem for a Stringref
> To work with GC, you need some way to track if the GC'd object is accessible in WASM itself.
I've never heard of a GC with that kind of API. Usually any native code that holds a GC reference would either mark that reference as a root explicitly (eg. https://github.com/WebAssembly/design/issues/1459) or ensure that it can be traced from a parent object. Either way, this should prevent collection of the object. I agree that explicitly checking whether a GC'd object has been freed would not make any sense.
> The reason why you probably need a custom string type is so you can actually embed string literals without relying on interop with the environment.
WASM already has ways of embedding flat string data. This can be materialized into GC/heap objects at module startup. This must happen in some form anyway, as all GC-able objects must be registered with the GC upon creation, for them to be discoverable as candidates for collection.
Overall I still don't understand the issue. There is so much prior art for these patterns in native extensions for Python, PHP, Ruby, etc.
-
The Tug-of-War over Server-Side WebAssembly
Giving you a buffer that grows is the allocation approach I am talking about. This is not how your OS works. Your OS itself works with an allocator that does a pretty good job making sure that your memory ends up not fragmented. Because WASM is in between, the OS is not in control of the memory, and instead the browser is. The browser implementation of "bring your own allocator" is cute but realistically just a waste of time for everybody who wants to deploy a wasm app because whatever allocator you bring is crippled by the overarching allocator of the browser messing everything up.
It seems like the vendors are recognizing this though, with firefox now having a discard function aparently!
- How do Rust WebAssembly apps free unused memory?
- Hello World In Web Assembly
-
Bun v0.5
Scientific performance critical code isn't written in Python, it is written in C/C++ which is used by Python. Python in ML usually merely describes the calculation not unlike React describes the DOM that should be displayed in the browser.
JavaScript was never really known for admin or file manipulation (Perl replacement), so that was what probably established the dominant ecosystem for Python. I also don't think the runtime overhead is applicable due to native C/C++ part, and download time doesn't have to be bad since modules can be split just like in JavaScript ecosystem today. For an AI app, the model inference weights might be larger than the compiled WASM code itself. However, I'd agree with you that porting legacy apps might not be possible without something close to a rewrite.
There is a reasonable chance that once WASM GC is implemented, then direct DOM access will be provided [1], which I believe could pretty much halt interest in new JavaScript development for web frameworks overnight. WASM is the reincarnation of the Java Applet, but better. And a more typed language like Go or Dart could become the most widely used programming language. Either compile it to WASM as plugin for something like the browser, compile to JavaScript for "legacy browsers", or to native code for a standalone app. There are probably a handful of developers already assuming this and trying to write a version of React running in WASM already.
[1] https://github.com/WebAssembly/design/blob/main/Web.md#gc
wave
-
Streamlit alternatives but for Rust?
https://streamlit.io/ https://wave.h2o.ai/ https://reflex.dev/
-
Launch HN: Pynecone (YC W23) – Web Apps in Pure Python
Looks similar to Nitro https://nitro.h2o.ai/ and Wave https://wave.h2o.ai/ - both open source. Nitro already works with WebAssembly via Pyodide. (Author here)
-
Nice GUI
To write web gui in Python, there are some other open source alternatives.
If just want to port simple shell interactive interface to web gui, can check https://github.com/pywebio/PyWebIO
If want to get a production level dashboard by using Python, https://wave.h2o.ai/ <>
-
Show HN: Hstream – quick Python web apps (Streamlit alternative using Htmx)
I think the demo site may have been hugged to death. It's not rendering anything for me.
I think it's also worth giving a shoutout to wave in this space; they have quite a few components you can use out-of-the-box https://github.com/h2oai/wave
- PyScript
- Realtime Web Apps and Dashboards for Python
- Realtime Web Apps and Dashboards for Python and R
-
[D] What do you use to build UIs for your projects?
H2O Wave : https://wave.h2o.ai
- Creating a web app in Python without knowledge of HTML/CSS/JavaScript
What are some alternatives?
content - The content behind MDN Web Docs
streamlit - Streamlit — A faster way to build and share data apps.
Chevrotain - Parser Building Toolkit for JavaScript
reactpy - It's React, but in Python
WASI - WebAssembly System Interface
gradio - Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
interface-types
nicegui - Create web-based user interfaces with Python. The nice way.
iswasmfast - Performance comparison of WebAssembly, C++ Addon, and native implementations of various algorithms in Node.js.
dephell - :package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.
WebViewFeedback - Feedback and discussions about Microsoft Edge WebView2
pglet - Pglet - build internal web apps quickly in the language you already know!