ants_everywhere 4 hours ago

I really like R. I find it a nice language to work in. I'm glad to see projects like this that make it more accessible.

nomilk 5 hours 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.

ForceBru 3 hours ago

Is there "Julia in the browser" that runs locally?

  • sundarurfriend 2 hours ago

    I don't think so, not yet. There's been Julia-on-wasm efforts that have been inching along for a while, but it's not nearly at a mature point afaik. I remember reading that some new developments (maybe shifting more of the compiler work to Julia with JuliaLowering.jl, maybe something else) have made wasm a lot more feasible, but it's gonna need some people with a need for it to actually work on it.

    (From context I'm assuming you're not looking for something like Jupyter/Pluto/BonitoBook.)

  • vehicles2b 2 hours ago

    Yeah check out https://plutojl.org/

    • ForceBru 6 minutes ago

      Pluto needs a server process and simply shows a nice UI, while WebR literally runs R in the browser on your machine with WebAssembly, so it's not the same

stabbles 7 hours ago

Does it include a decent BLAS? If I remember correctly R ships with reference BLAS, but for decent performance you need something external. Wonder what they picked for wasm based R.

  • uniqueuid 7 hours ago

    I wonder what kind of edge cases you deal with when blas is your bottleneck in R. Stan code aside, I’ve seen few problems that are neither instant (i.e. sub hours) nor impossible (I.e years of compute).

    • fn-mote 2 hours ago

      Isn’t the linear algebra conventional wisdom that matrix ops are ALWAYS the bottleneck?

      I’m sure this is true in scientific computing.

      In R maybe a bunch of resampling would be expected to dominate?

Qem 5 hours ago

Can you install it as a progressive web app, to work offline as well?

  • ekianjo 3 hours ago

    Someone did a demo on mobile a while ago, offline, so yes it is possible but I have never seen an actual code example on how to do that.

tlarkworthy 4 hours ago

Cool but 12MB WASM blob. I wish there was a way of making these WASM builds significantly smaller.

  • calmbell 2 hours ago

    The funny thing is that the performance of a 12MB WASM blob is probably superior to most Shiny apps with more than light traffic.

  • ModernMech 3 hours ago

    Usually they are shipped in a compressed form. If 12MB is compressed it could be that it represents the entire R runtime to support the general R REPL. It could be possible to reduce the payload by compiling only what's necessary to run a particular R program into the wasm binary. That should cut down size considerably.

tovej 6 hours ago

Does this also support Rmd?

That would be pretty cool if you could publish an rstudio notebook and have a flow to edit a copy of the notebook straight in the web.