@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.

odr_k4tana, to random

Do yourself a favour and don't use the {likert} package in . It apparently isn't maintained anymore, uses close to EOL functions (even whe it still was maintained) and its documentation + usability is crappy as heck.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@odr_k4tana developers website has a lot of setup for a v2 .

Might be worth a shot to try that.

Developer might need some support to finish and ship the new version?

MattCrumpLab, to random
@MattCrumpLab@fosstodon.org avatar

#rtistry is a thing, but is there an #rstatsmusic or similar hashtag?

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@MattCrumpLab probably just you, me and my tr808

https://github.com/coolbutuseless/tr808r

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

pkg tip: Use "LazyDataCompression" option to pack more data into your package!

Setting "LazyDataCompression: xz" will override the default gzip compression of data - allowing for greater data sizes in your pakcage before hitting the 5MB(?) limit.

https://cran.r-project.org/doc/manuals/R-exts.html#Data-in-packages

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Introducing {fastpng} when you need to write PNG files, but you want to do it quicky.

{fastpng} allows for the tradeoff between compression and speed.

Writing PNGs can be 75x faster when compression is turned off.

Supports: arrays, rasters and native rasters.

https://github.com/coolbutuseless/fastpng

Benchmark of fastpng package when writing a colour image showing it can be 75x faster when not using compression.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

I'm laughing myself silly at this old project of mine:

Realtime MIDI decoding + playback of multi-channel audio in R. Listen to the whole 30s clip :)

Just R + menagerie of unreleased pkgs. No python :P

Components:

  • Bespoke synthesis of notes (it's terrible. so i worked on a soundfont library, so there is the possibility of better instruments)
  • MIDI parsing
  • Real-time multichannel audio output. I think this MIDI is 12 channels.

Cheers to @MattCrumpLab for re-awakening this!

R playing back multi-channel MIDI file in realtime.

MattCrumpLab, to random
@MattCrumpLab@fosstodon.org avatar

I might need to manipulate and synthesize midi in R, so I spent the afternoon trying to make various packages work. They are all wrappers for python stuff. It wasn't a cake walk, but I finally made an mp3 of the top gun theme song = declaring victory

#rstats #rtstatsmusic #midi

https://homophony.quest/blog/32_1_30_24_R_synth/

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@MattCrumpLab This is so great!

I've got some half-arsed, half-finished packages for real-time midi playback in - you've inspired me to bump them up the priority list :)

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

It annoys me when R packages are hosted on rforge.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

The sum total of my knowledge about running checks for CRAN submission.

https://github.com/coolbutuseless/CRAN-checks

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{testhat} unsung hero function: test_path()

"automatically generates a path relative to tests/testthat, regardless of where that directory might reside relative to the current working directory."

Summary: It'll find your file whether running interactively or running "R CMD check"

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN: Another CRAN rejection for {yyjsonr}.

CRAN is now reporting a clang-ASAN issue that I cannot reproduce with my clang-ASAN setup (using {rhub2})

Now what am I supposed to do?

Note: I have some line numbers related to the error, so I can do some digging.

But I can't do any testing to see if it's fixed. I have to use CRAN submission as my test runner.

Not something I want. And pretty sure they don't want it either.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@gaborcsardi @_TimTaylor this was direct email in response to my resubmission trying to fix the public asan check errors on v0.1.16.

I'm not near a computer right now to see what this might be. Will try again this evening.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN:

this latest clang-ASAN issue is very likely due to some signed operations I'm doing on a size_t value in C.

I still need to try and replicate issue in my {rhub2} setup so that CRAN volunteers aren't just operating as my CI test checkers.

Thanks to eagle eyed @_TimTaylor who had a poke around already.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN.

Kicking off another round of clang-ASAN tests (+ some others) on {yyjsonr}.

Just checking whether the reported issue from CRAN somehow magically appears this time.

Lots of great machines to check your package under using the {rhub2} pkg.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@gaborcsardi @_TimTaylor Confirmed! Just ran on macos and reproduced the error.

Fixed some pointer artihmetic and now is passing! Woot!

Thanks @gaborcsardi !

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@gaborcsardi I'm not certain that these options are the default in the CRANs clang-ASAN build.

i.e. the 'check' results for v0.1.16 didn't pick up this error (https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-ASAN/yyjsonr/00check.log)

The check results were reported to me via email (without a full log of the check output), so this may have been a manual/bespoke extra-special run outside the standard machines.

Not sure. But then again I'm not sure anything is certain :)

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@gaborcsardi You are correct.

While the bug fixed today isn't related to the other clang-ASAN bug (related to strlen).

However, it is related to the fixes I did for the "M1Mac" issues reported when "-Wconversion" is set. https://www.stats.ox.ac.uk/pub/bdr/M1mac/yyjsonr.log

In short, yes I probably introduced this pointer overflow bug in the last couple of days.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@gaborcsardi The M1Mac issues used flags I hadn't seen before in any of my other CRAN checks:

-Wconversion -Wno-sign-conversion

They may be part of mac-builder, but I didn't think to check on mac-builder as I'm developing on an actual mac.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN.

Currently running clang-ASAN as a github action using {rhub2}.

https://github.com/r-hub/rhub2

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN: Huzzah!

{rhub2} running clang-ASAN as a github action replicates the issue report I got from CRAN.

So I'll now be able to tell if my fixes actually fix the right thing!

Just 10 minutes work to set up {rhub2} for the first time. Filed a minor issue report on GH as well: https://github.com/r-hub/rhub2/issues/10

Thanks to @gaborcsardi for this amazing workflow!!

image/png

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Adventures in CRAN (upcoming weekend "fun")

  • Can I figure out how to run Docker on my ARM Mac.
  • Does clang-ASAM run under docker on an ARM Mac?
  • Can Ifigure out how to build {yyjsonr} under clang-ASAN under Docker on ARM Mac
  • Can I debug a memory issue related to strlen() when running tests in {yyjsonr} under clang-ASAN under Docker on ARM Mac.

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

But maybe try {rhub2} first ! :)

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Adventures with CRAN.

Adding tests and vignettes just seems to increase the exposed surface area for CRAN checks.

If I want a better chance of getting my pkg on CRAN, I should just never add tests?

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

@milesmcbain @eliocamp yeah, it's a really weird misalignment of incentives.

Yyjsonr has passed all standard tests and is on cran.

But now the clang-ASAN check finds an issue with 'strlen' somewhere when running my test suite.

It's mega-fiddly to set up the address sanitizer to run the test locally. In fact, I'm not sure it can be run on Mac at all.

So how the hell do I easily debug this? A single run of ASAN on rhub took 90 minutes!

Easiest/shittest solution: just delete all the tests.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

{yyjsonr} is now on CRAN!

A package for fast reading and writing of JSON - up to 10x faster than {jsonlite}

Upcoming features:

  • fast NDJSON support
  • fast GeoJSON support

Find attached my new celebratory created for this event :)

CRAN: https://cran.r-project.org/package=yyjsonr
docs: https://coolbutuseless.github.io/package/yyjsonr/index.html
github: https://github.com/coolbutuseless/yyjsonr
yyjson lib: https://github.com/ibireme/yyjson

coolbutuseless,
@coolbutuseless@fosstodon.org avatar

Comparing {yyjsonr} to other JSON packages using the standard 'simpleBenchmark' from {RcppSimdJson}

Shows that {yyjsonr} is on top.

Gist: https://gist.github.com/coolbutuseless/2ec6263e37815e8ba04fa805f1acc621

image/png

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