@coolbutuseless@fosstodon.org
@coolbutuseless@fosstodon.org avatar

coolbutuseless

@coolbutuseless@fosstodon.org

Nerd.

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

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Introducing {naratext} - render text into nativeRaster objects

I wrote this pkg because I need to render text into nativeRaster and then interface/composite into other nativeRasters with {nara}

This is at the "proof-of-concept" stage, but looks promising!

#RStats

https://github.com/coolbutuseless/naratext/
https://github.com/coolbutuseless/nara/

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{nara} update. A pkg for handling nativeRaster images.

  • New demo sprite.
  • Updated hex logo

All rendering done in R with {grid} and {nara}

https://github.com/coolbutuseless/nara

Animated pixel deer running across the screen
Hexagonal logo with the word "nara". Inside the hexagon is an animated pixel deer

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{nara} pkg for working with native rasters in R

Work-in-progress: experimenting with isometric tiles

Fun!

https://github.com/coolbutuseless/nara

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Which one of you crazy kids built a sprite editor in the Rstudio viewer?

Possible back in times of tw*tter...

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

It was @mattdray who built {pixeltrix} - a sprite editor for R

https://github.com/matt-dray/pixeltrix

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

#RStats 4.4.0 now includes "%||%" in base

I've always called it the "null operator", but I'm happy to learn of a better name.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{rmonocypher} is now feature complete! Simple (yet bulletproof) encryption

Core encryption function is

encrypt(mtcars, filename = "secure.rds", key = "my secret key!")

Security/usability feedback welcomed!

Below the surface there's lots going on!

  • Argon2 key derivation
  • RFC8439 "Authenticated Encryption with Additional Data" using ChaCha20 stream cipher + Poly1305 Message Authentication
  • Required random bytes (nonce) sourced from OS CSPRNG

https://github.com/coolbutuseless/rmonocypher

coolbutuseless, to demoscene
@coolbutuseless@fosstodon.org avatar

users, if your method for creating tables isn't letting you create retro demo effects then what even is the point?

This is {emphatic} output to an SVG animation played back in the browser with 'scale_colour_gradient2()' and some sine waves doing the effect.

video/mp4

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Has anyone ever written a "multi-facetted" package for CRAN?

For example, I have a package that uses the connections API.

I would like the full version available from GitHub and r-universe.

Through clever use of defines and 'if' statements etc, the CRAN version would exclude all forbidden code.

Could this exist in one pkg tarball? Or would the tarballs have to be different?

Are there CRAN-specific ENV vars that can be used to control the inclusion/exclusion of code?

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

#RStats hive: has anyone resubmitted a package to CRAN and been asked to fix their use of SET_TRUELENGTH?

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@LukeTierney4 thanks for the info. It was unclear whether the NOTE was a blocker to package updates.

I do recall a checkbox when submitting to CRAN along the lines of "I have checked the CRAN checks and fixed all the errors and warnings and notes(?)".

I am mis-remembering the exact text and extents of the assertion - but that was the gist.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{emphatic} typst support: added!

Good news: It works!

Bad news: I can't work out how to disable text wrapping and/or set overflow in a block to be hidden.

Large tables make 'typst' want to reflow the text which I expressly do NOT want to do.

I've added a 'font_size' option to help deal with this, but being able to control reflow/overflow would be better!

https://github.com/coolbutuseless/emphatic

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{emphatic} now renders to latex!

Which means that Quart/Rmd rendering to PDF now works!

#WorkInProgress

https://github.com/coolbutuseless/emphatic

#RStats

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Help needed!

I want to email R-devel & get clarification on "Can we create custom connections in packages?"

I find the situation confusing because using the "Connections.h" is mentioned in R-exts manual - and so formally(?) part of the API

But this conflicts with the NOTE generated if you try to use "R_new_custom_connection()" which says it is "non-API"

Am I tilting at windmills? Poking the bear? HELP!

Edits/suggestions welcomed in the gist below.

https://gist.github.com/coolbutuseless/2b261e2f7f54206c1263fbca0e71ac64

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

#RStats API

(Last meme for the week - I promise!)

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Eye-watering stats on packages with unit tests on CRAN

60+% of packages had no tests

From data in 2017 by @juliasilge : https://juliasilge.com/blog/mining-cran-description/

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Do any of the standard/extended checks on CRAN use *BSD?

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

How do I write a test to check if a random number generator is
working?

Context: I need something cross-platofrm that access system CSPRNGs (arc4random, bcyprt (on win), etc).

I can test local on a mac that it behaves sanely, but on windows (running as a github action), I want a few quick tests to check that it as least not all the same number repeated :)

But something a bit cleverer :)

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

mood

yutannihilation, to random

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

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@yutannihilation what's the process for handling these checks?

Do I not need to do anything unless I get an email?

I guess next time I submit a package, I have to say that I've dealt with all these NOTEs

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

I am paying close attention to the R-devel discussion on R API definition.

A package I'm working on (rmonocypher) uses connections to enable encryption in lots of useful places in R for seamless/easy data encryption.

But connection registration in R code is "non API", meaning that you can't write a new connection in a package!

The connection API has been stable for 10 years. Not sure why its use is verboten.

https://github.com/coolbutuseless/rmonocypher

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@LukeTierney4 :/

I would've thought I could just use/check the R_CONNECTIONS_API version and update the package when it gets updated ?

Just like we do with R_GE_version for the graphics system.

It feels limiting to have a stable API for enhancing R marked as "don't use"

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Programming tip: When writing extensions for R using C:

  • Allocate memory before trying to copy data into it.
  • Copying into a NULL pointer is bad.

Like and subscribe for more "great" programming tips!!!

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

I ❤️ {rhub} !

Just checked new package on 9 R setups - including valgrind and address sanitizer.

Such a confidence builder that the package won't barf too much on CRAN :)

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

The wildest R error I've seen this week!

I've managed to trigger a condition that requires "R 22538.0.0 or newer"

o_O

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