Readit News logoReadit News
georgestagg commented on WebR – R in the Browser   docs.r-wasm.org/webr/late... · Posted by u/sieste
nomilk · 2 days ago
What does this mean in practice? Does this mean you could start with a blank .html file, and use html, css, and javascript (like normal), but then somehow run R too? e.g. to generate a ggplot using the browser (as opposed to server, as a shiny app may)?

Has anyone got a minimal reproducible examples (e.g. tiny html file that runs, say 2 * 2 in R)? The example linked to in the article has the key line <script type="module" src="repl.mjs"></script>, but that mjs file goes over my head.

Curious/eager/excited to know/see what kinds of real-world applications this has.

georgestagg · 2 days ago
georgestagg commented on I have no constructor, and I must initialize   consteval.ca/2024/07/03/i... · Posted by u/cyber1
gattilorenz · a year ago
What an beautiful blog theme, obviously inspired by the DEC-era computers but also clean and minimal. Refreshing!
georgestagg · a year ago
I like how the rules to the right of the headings react to the page width and how many lines are used.
georgestagg commented on Fortran on WebAssembly   gws.phd/posts/fortran_was... · Posted by u/georgestagg
ein0p · a year ago
I’ve been reading these articles for years, but I’ve yet to experience any practical use of webassembly outside of contrived demos. Where do people use all this stuff? Does anyone use it?
georgestagg · a year ago
WebAssembly is generally most useful when you want to write high performance web applications using languages like C, C++ or Rust.

WebAssembly sits in the background quietly powering the web-based versions of products like Adobe Photoshop, AutoCAD, Figma, Canva, and likely others. By using Wasm components combined with other browser technologies such as HTML canvas and webGL, app performance and responsiveness can be improved.

WebAssembly also powers the Pyodide and webR projects, enabling Python and R code to run in a browser without a supporting computational server. Where I’ve seen this used most effectively so far is in teaching materials, particularly for teaching data science, where interactive R and Python examples can be embedded directly into teaching materials without the educator having to worry about the time or expense to deploy a powerful backend service to evaluate learner’s code.

georgestagg commented on Fortran on WebAssembly   gws.phd/posts/fortran_was... · Posted by u/georgestagg
certik · a year ago
The author of LFortran here.

The demo at https://dev.lfortran.org uses our direct WASM backend that does not use LLVM. It is currently more limited, and indeed, we currently do not support the cubic power x**3 there, only square power x**2. Our most advanced backend is LLVM, and that of course supports x**3 and a very wide subset of Fortran (such as 60% of all SciPy packages fully compile and all SciPy tests pass). However, LLVM is huge and relatively slow, so we do not use LLVM in the online demo, which runs the compiler itself in the browser.

For offline LLVM based WASM compilation I think LFortran is ready be tried. We'll be happy to help!

georgestagg · a year ago
I’ll definitely be trying out more of LFortran in the future.

For this post I really wanted to go deeper into the approach we’ve taken with flang, but I can see that LFortran is also a very strong choice here for running Fortran on Wasm.

georgestagg commented on Fortran on WebAssembly   gws.phd/posts/fortran_was... · Posted by u/georgestagg
math_dandy · a year ago
I love the "simplest nontrivial example" approach to exposition. I think I learned a lot from the article because it was grounded in the concrete problem "call a BLAS function from Javascript". Great post!
georgestagg · a year ago
Thanks! There’s a series of books I really like, The Theoretical Minimum[1], that also takes that kind of approach but for teaching physics.

[1] https://en.m.wikipedia.org/wiki/The_Theoretical_Minimum

u/georgestagg

KarmaCake day116April 5, 2024
About
http://gws.phd
View Original