@gaborcsardi@fosstodon.org
@gaborcsardi@fosstodon.org avatar

gaborcsardi

@gaborcsardi@fosstodon.org

Software Engineer at Posit PBC

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

neilstats, to random

Some problems that are causing me much 😒 today:

Using {qs}, why does qsave() produce different files (for some objects) on Linux vs. Windows?

Using {targets}, why do dynamic branches get given different names on Linux vs. Windows?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@neilstats The qs thing is not necessarily an issue, e.g. base::save() includes the name of the native encoding and the exact R version in the result, maybe qs does as well. Or it uses a different zstd library version, so the compression will be slightly different.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@neilstats Yeah, I just came back here to suggest that numerical issues are much more common....

swarchal, to random

Trying to add some error handling in . Turns out you have to catch errors by their message...which changes based on the user's locale 🙃

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@swarchal I don't think that this is true in general.

It is certainly true that some errors don't have specific error classes. But many do, and you can always add your own classes. No?

_jcken, to random

list columns have changed my life

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@_jcken To the better or the worse? :D

sckottie, to random
@sckottie@fosstodon.org avatar

Is there an roxygen2 syntax for running examplesIf pkgdown is building a docs site?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@sckottie yea, the IN_PKGDOWN env var is set to true, so you can test for that

noamross, to random
@noamross@ecoevo.social avatar

My holiday project is creating a CLI interface for project setup on my team. I'm down a deep async rabbit hole. So many cool emerging tools! Any thoughts on them?:

  • {async}, @crowding, maybe the most abstract? Uses futures.
  • Also {async}, @gaborcsardi. Very beta, uses processx/callr, no futures/promises
  • {coro}, @lionel. More mature, based on promises, used in Torch ecosystem

Or I may roll my own event loop, with async {mirai} (by C Gao) calls, so that I understand how it works.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@noamross FWIW, gaborcsardi/async is pretty stable, and has been powering pak for a while now.

djnavarro, to random
@djnavarro@hachyderm.io avatar

The traditional Christmas paella 🥘 in progress

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@djnavarro Gambas al ajillo here!

josi, to random
@josi@fosstodon.org avatar

guru's how might i select from child nodeset using {rvest}??

https://github.com/tidyverse/rvest/issues/382

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@josi Seems like a bug to me.

lf_araujo, to random
@lf_araujo@mastodon.social avatar

Is there a dashboard where I can follow download statistics (with visualizations) for certain CRAN packages?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@lf_araujo You can get the data with the cranlogs package, and then plot it as you like.

milesmcbain, to random
@milesmcbain@fosstodon.org avatar

Since switching to a rolling linux distro at home package {pak} has taken centre stage. This experiment would be much less fun without it. 🙏 @gaborcsardi

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@milesmcbain Out of curiosity, what's the distro, and why the switch?

MikeMahoney218, to random
@MikeMahoney218@fosstodon.org avatar

alright, I'm sure I'm missing something obvious here, but:

how can I get a callr session to not "see" libraries that are installed on a computer? See below; even setting libpath to /dev/null doesn't "hide" my system sf from r()

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@MikeMahoney218 @tanho It is not possible "turn off" the system library. So if you install your own non-core packages there, you can't turn those off, either. One reason why it is better to always create a user library and install packages there.

gaborcsardi, (edited ) to random
@gaborcsardi@fosstodon.org avatar

How do you set your CRAN mirror and other repositories? If other, please reply to this post.

#RStats

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@defuneste Very mysterious :D

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

PSA: if you get GitHub Actions failures because of the Matrix binary incompatibility issue, this is a possible workaround: https://github.com/gmonette/cv/compare/main...gaborcsardi:cv:main
You may also put a thumbs up on this issue: https://github.com/r-lib/actions/issues/780 to help me access the impact of this. Thanks!

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@mccarthymg In general it is not going to sort itself out any time soon. If lme4 and co. start depending on new Matrix, that'd be a fix.

Or if there'll be an R 4.3.3 release that bundles the updated Matrix package.

If it turns out that many people are affected then we may also fix it centrally in r-lib/actions, although I don't quite know how....

noamross, to random
@noamross@ecoevo.social avatar

Trying to understand how one determines if a port is available for binding, in base if possible

httpuv:::is_port_available launches a server and tests for failure

parallelly:::canPortBeUsed() does the same with base::serverSocket() (also port4me)

But I get different results: serverSocket(PORT) only fails in some cases when I have an external process (a MinIO server) listening to PORT. Does serverSocket() bind to the port?

@henrikbengtsson @grrrck @jcheng @winston_chang @cboettig

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@noamross @henrikbengtsson @grrrck @jcheng @winston_chang @cboettig

To check if a port is available, you try to bind to it.

To get a random available port, you should obtain one from the OS. serverSocket() can do that if you use port = 0, but IDK if there is a way to query the port, there really should be one.

❯ s1 <- serverSocket(0)
❯ ps::ps_connections()
fd family type laddr lport raddr rport state
1 3 AF_INET SOCK_STREAM 0.0.0.0 55536 0.0.0.0 NA CONN_LISTEN

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@noamross oh, i didn’t really suggest that as a way to query the port. In some cases there can be concurrency (eg multithreading in rstudio) so it is not fully reliable. Since base R does but tell you the port, I would pick a random one and try to bind to it, and keep trying different ones on error.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@noamross That sounds tricky, but if you choose a random non-privileged port, to bind to then the chance that you need to restart it is pretty low, I think. Well, on most machines.

Ideally the external tool would ask for a port from the OS, and then report it to you...

jangorecki, to random
@jangorecki@fosstodon.org avatar

what happened to https://github.com/cran ? getting 404

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@jangorecki GH's automatic abuse detection flagged it, so it was temporarily restricted to the org members.

josi, to random
@josi@fosstodon.org avatar

Is there a more "idiomatic" way of capturing the name of an argument in an cli::cli_abort() message than this?

#rstats

gaborcsardi,
@gaborcsardi@fosstodon.org avatar
lwpembleton, to random
@lwpembleton@genomic.social avatar

🤔 Total memory blank! What's the name of that R package for generating console plots on graphics-less setups like remote servers?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@lwpembleton There are ~ 3 here on the first page: https://r-pkg.org/search.html?q=ascii+plot

mdsumner, to random
@mdsumner@rstats.me avatar

CRAN is down, don't know that I've ever seen that before

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@mdsumner DNS issue, use the cran.rstudio.com mirror

kirill, to random

PSA: r-project.org seems to have issues, leading to failures in installation of packages and R, CI/CD runs, winbuilder, and more.

https://downfor.io/r-project.org

Also in https://github.com/r-lib/actions/issues/772.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@kirill CI should be almost fully back. You can use https://cran.rsudio.com as your mirror locally.

josi, to random
@josi@fosstodon.org avatar

Before I go building it...is anyone aware of an package that can build a pkgdown site's infrastructure as markdown? I don't want the html. I want the markdown.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@josi Base R has code for that.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@josi @cderv capture.output() is a bad idea, if converts encodings, potentially. E.g.you might lose UTF-8 characters. Better to use the out argument.

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