@yutannihilation@fosstodon.org
@yutannihilation@fosstodon.org avatar

yutannihilation

@yutannihilation@fosstodon.org

Wannabe Rstats-fu in the Far East.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

Anyone knows the context why [[cpp11::init]] has been undocumented? I'm considering to add some notation for the initialization routine in my Rust-R framework, but I'm wondering if there's any difficulty... 🤔

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

Some days ago, the CRAN check with R-devel started to raise "Found non-API calls to R" NOTE. I'm not sure if they are serious on disallowing these not-so-minor APIs, but what should I do? Do you take some action or just wait?

For example, rlang package now has these NOTE:

File ‘rlang/libs/rlang.so’:
Found non-API calls to R: ‘R_ClosureExpr’, ‘R_PromiseExpr’,
‘SETLENGTH’, ‘SET_ENCLOS’, ‘SET_ENVFLAGS’, ‘SET_TRUELENGTH’

https://cran.r-project.org/web/checks/check_results_rlang.html

yutannihilation,
@yutannihilation@fosstodon.org avatar

@gaborcsardi @MikeMahoney218 @coolbutuseless Really good to know, thanks. At the moment, do you feel you can live without those APIs?

yutannihilation,
@yutannihilation@fosstodon.org avatar

@gaborcsardi @MikeMahoney218 @coolbutuseless I see... I don't use SET_TRUELENGTH() by myself, but have been wondering if there's any workaround. I hope there will be some alternative API.

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

Lazyweb: Are there any official document about ALTREP? Is that 6-years-old document in the SVN still the latest official-ish one?

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

The savvy framework, a bridge from Rust to R, now allows you to consume the data to avoid copying. This is inspired by the discussion on extendr's Discord.

https://yutannihilation.github.io/savvy/guide/10_struct.html

#[savvy] impl HeavyDataBundle(Vec) { fn new( data1: HeavyData, data2: HeavyData, ) -> Self { Self { data1, data2 } } }

yutannihilation, to random
@yutannihilation@fosstodon.org avatar
yutannihilation, to random
@yutannihilation@fosstodon.org avatar

The good news is that I succeeded to compile my Rust-powered R package for webR 🎉 The bad news is that the success of compilation doesn't mean it works...

https://github.com/yutannihilation/savvy-webr-test

yutannihilation,
@yutannihilation@fosstodon.org avatar

Here's what I figured out so far to compile a Rust-powered R package for WebR. In case you need some hobby for holidays, you can try :)

https://github.com/yutannihilation/webr-rust-docker-image

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

I think I've passed the halfway point of writing the user manual of savvy. This R-Rust framework is just for experiment, but feedback is welcome!

https://yutannihilation.github.io/savvy/savvy/index.html

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

While CRAN refers to my package as an example, I didn't intend to create it as an example. So, here's some explanation.

Wannabe Rstats-fu - A Quick Note About How To Bundle Rust Crates For An R Package
https://yutani.rbind.io/post/a-quick-note-about-how-to-bundle-rust/

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

I've never imagined my name would be on the CRAN Policy.

https://cran.r-project.org/web/packages/using_rust.html

yutannihilation,
@yutannihilation@fosstodon.org avatar

As those who know Rust are probably already wondering, this needs some feedback. At least they should encourage bundling Cargo.lock to fix the dependency versions.

yutannihilation, to random
@yutannihilation@fosstodon.org avatar

Since it was super tough to understand how R's protection mechanism can work with Rust, I wrote a blog post before I get burned out completely🔥

Wannabe Rstats-fu - R, Rust, Protect, And Unwinding
https://yutani.rbind.io/post/r-rust-protect-and-unwinding/

yutannihilation,
@yutannihilation@fosstodon.org avatar

Sorry, after having some rest, I found I wasn't sane. I wrote a completely wrong conclusion... Fixed now. (In short, panic!() is unavoidable)

yutannihilation,
@yutannihilation@fosstodon.org avatar

I wrote that panic!() is unavoidable to handle R errors on Rust, but I found I was wrong. Here's a late update:

Wannabe Rstats-fu - Don’t panic!, We Can Unwind On Rust
https://yutani.rbind.io/post/dont-panic-we-can-unwind/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • everett
  • DreamBathrooms
  • khanakhh
  • magazineikmin
  • tacticalgear
  • Youngstown
  • ngwrru68w68
  • slotface
  • osvaldo12
  • rosin
  • thenastyranch
  • kavyap
  • InstantRegret
  • JUstTest
  • tester
  • Durango
  • cisconetworking
  • GTA5RPClips
  • cubers
  • modclub
  • mdbf
  • ethstaker
  • Leos
  • provamag3
  • normalnudes
  • anitta
  • lostlight
  • All magazines