@klmr@mastodon.social
@klmr@mastodon.social avatar

klmr

@klmr@mastodon.social

Bioinformatician & software engineer
#genomics #bioinformatics #fair #code #rstats #cpp #python (he/him)

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

klmr, to random
@klmr@mastodon.social avatar

I practice the Boy Scout Rule of programming to manage technical debt: “always leave the area of code you are working on a bit cleaner than you found it”.

But unfortunately this conflicts massively (!) with small, atomic branches/merge requests. How do other teams manage this?

hrbrmstr, to random
@hrbrmstr@mastodon.social avatar

First, I declare @klmr to officially be a tier-1 cybersecurity professional (Konrad was/is already a brilliant human).

Second 🚨 ALL R DATA FILES YOU DO NOT GENERATE / CONTROL SHOULD BE CONSIDERED TOXIC SUBSTANCES 🚨

The "fix" in R 4.4.0 for the "CVE” (it should not have been a CVE) is woefully insufficient.

I highly suggest running

$ gzip -cdS rda FILENAME.rda | strings  

from the terminal on any R data files you do not generate/control before loading them.

klmr,
@klmr@mastodon.social avatar

@hrbrmstr 😊

brodriguesco, to random
@brodriguesco@fosstodon.org avatar

A vulnerability in has been discovered https://nvd.nist.gov/vuln/detail/CVE-2024-27322

klmr,
@klmr@mastodon.social avatar

@brodriguesco (how) is this fixed in R 4.4? I don’t find anything relevant in the news.

klmr,
@klmr@mastodon.social avatar

@joranelias @Lluis_Revilla @brodriguesco Great find, that will be it.

… unfortunately it’s still trivial to perform arbitrary code execution upon deserialisation even in R 4.4 😠

Now I need to find out how to disclose this. I’m not even sure responsible disclosure makes sense here since I’m sure others will either have found this already or will very soon find it.

klmr,
@klmr@mastodon.social avatar

@Lluis_Revilla Thanks, that’s what I was missing. I’ll see if I can find my old Bugzilla account info.

(As mentioned in another comment I disagree that deserialisation code execution bugs are “bogus CVEs” @bagder is rightly complaining about!]. In fact, they are amongst the most-exploited vulnerabilities.)

klmr,
@klmr@mastodon.social avatar

@joranelias @Lluis_Revilla @brodriguesco … it’s not going great. 😟 (details filed on Bugzilla)

klmr,
@klmr@mastodon.social avatar

@joranelias @Lluis_Revilla @brodriguesco (I completely forgot to mention that the report was created together with @idavydov)

klmr,
@klmr@mastodon.social avatar

@hrbrmstr @joranelias @Lluis_Revilla @brodriguesco @idavydov Right, it’s as much “expected behaviour” as in CVE-2024-27322, and as in other serialisation engines (e.g. Python pickle, .net BinaryFormatter, etc.). Which are all systems that are very hard to use correctly, and cause frequent direct vulnerabilities. Whether that makes the serialisation frameworks themselves a vulnerability… 🤷

(I did not register a CVE; for me this is an issue of awareness and documentation.)

klmr,
@klmr@mastodon.social avatar

@hrbrmstr Yeah, it’s private.

klmr, to stackoverflow
@klmr@mastodon.social avatar

Huh. Apparently staff/moderators can and do stealth-edit user comments now. Who the fuck thought this was OK?!

That’s a huge breach of trust. Maybe it’s time to stop using the website entirely.

(“stealth edit” = edit without raising a notification to the user, and without making it visible that the comment was edited by anybody else.)

mjg59, to random
@mjg59@nondeterministic.computer avatar

Yo I've got a PhD in genetics from Cambridge and on the off-chance you need it I give you permission to say that Dawkins is a hack

klmr,
@klmr@mastodon.social avatar

@FSMaxB As a geneticist I disagree about the books not contributing to the field: they changed the thinking around the functional unit of inheritance for a lot of geneticists. I consider them highly influential. The individual ideas were not his own but the way he expressed them and combined them in The Extended Phenotype was original and important — not just for popularisation but for science itself.

It goes without saying that this is regardless of his current behaviour.

gvwilson, to random
@gvwilson@mastodon.social avatar

Should I teach bash, fish, or Nushell to data scientists who want to go beyond the basics of shell scripting? There seems to be a clear spectrum from "ubiquitous but m'gawd" to "this is the future but m'gawd in a different way".

klmr,
@klmr@mastodon.social avatar

@gvwilson I’d also recommend teaching Bash but otherwise I would lean heavily towards zsh: still POSIX sh compatible but a lot saner than Bash. And it is the default shell on macOS, and very widely available beyond that, and comes with extensive documentation.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Survey: what new bit of syntax would you like in base ?

What should the following bits of syntax do?

  • ===
  • ++ And --
  • +=
  • //
  • ?
  • {{ }}
  • [[[ ]]]
  • <<==
  • (?: X)
klmr,
@klmr@mastodon.social avatar

@Mehrad @coolbutuseless ‘box’ allows you to do that (but you will need to convert your entire project to using ‘box’, since the purpose of this package is not to merely provide function documentation capabilities but rather to provide a sane module system): https://github.com/klmr/box

Sheril, to food
@Sheril@mastodon.social avatar

Ever wonder how pickling works? https://youtu.be/gw6YpN2oRog?si=Bv8DW9o6iqcBaW29

Four years ago our PBS team created this fun explainer on all different types of pickles! And it's still one of my favorite episodes.

klmr,
@klmr@mastodon.social avatar

@Sheril That’s a great video but cucumbers don’t shrink much during brining (and pretty much not at all for pickling with vinegar). Instead, smaller varieties or young cucumbers are used. Large cucumbers stay large.

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

This is how httr2 and other packages use the base |> pipe in examples, and still support older R, including a clean R CMD check:
https://github.com/tidyverse/purrr/commit/426acdd50424b8cd6029d237c4d4e81d94ec42a6#diff-611496f412cac947be720d17a0ee6d7463221d14731fbc18244756271e8f5189

Ie. you need a configure (+ configure.win) file that creates an Rd macro on older R, that rewrites the examples with |>.
You'll also need Biarch: true in DESCRIPTION.

Clean R CMD check from R 3.6.x to R-4.4.x: https://github.com/r-lib/httr2/actions/runs/7548766508

klmr,
@klmr@mastodon.social avatar

@gaborcsardi I was sorely tempted to do that with the lambda syntax in ‘box’ (which uses many anonymous functions) but making the build process even more complex scared me off. Maybe I’ll reconsider.

klmr,
@klmr@mastodon.social avatar

@gaborcsardi (My use-case would be more involved since it would have to rewrite the actual package source code, not just the Rd files; but the principle should be similar.)

olafurw, to random
@olafurw@mastodon.social avatar

I WRITE JOKES IN CAPITALS.
THIS ONE WAS WRITTEN IN OSLO.

klmr,
@klmr@mastodon.social avatar
klmr,
@klmr@mastodon.social avatar

@CuriosityCat Chill, I am not criticising the joke. My reply was itself a joke, based on the (vaguely funny) coincidental juxtaposition of the two posts on my timeline. Ólafur got it.

klmr, to random
@klmr@mastodon.social avatar

folks: I am trying to remember why we are using 9000 as the last component in development version numbers, and I am drawing a blank. Why not just use x.y.z.1, x.y.z.2, etc?

Surely it’s the mere presence of that last components which signals an unstable development build, not the magnitude, right? Am I overlooking something?

ct_bergstrom, to random
@ct_bergstrom@fediscience.org avatar

Menopause in chimps: An interesting challenge to the grandmother hypothesis, the idea that menopause, previously documented only in humans and a few cetacean specie, is an adaptation to by which older females help raise their daughters' offspring.

https://www.science.org/doi/10.1126/science.add5473

klmr,
@klmr@mastodon.social avatar

@ct_bergstrom Not just chimps but probably most mammals: https://www.cell.com/cell/fulltext/S0092-8674(23)01080-2

briandconnelly, to random

This weekend's fun (though niche) programming project: {xdgbasedir}, an implementation of X Desktop Group Base Directory Specification.https://github.com/briandconnelly/xdgbasedir

klmr,
@klmr@mastodon.social avatar

@briandconnelly FYI, R has something very similar built in, as tools::R_user_dir()

https://stat.ethz.ch/R-manual/R-devel/library/tools/html/userdir.html

baldur, to random
@baldur@toot.cafe avatar

Occasionally I stop to think about how much of the modern software development infrastructure and community is run at a massive loss: Stack Overflow, npm, Github Copilot (probably Github itself), VS Code.

Also how much of it is owned and run by Microsoft.

So much of it could disappear at a short notice if just one CEO changes his mind about his company’s marketing strategy.

klmr,
@klmr@mastodon.social avatar

@baldur According to what employees there at the time told me, Stack Overflow was profitable within a few years of launch.

klmr, to random
@klmr@mastodon.social avatar

WTF of the day:

klmr,
@klmr@mastodon.social avatar

@hrbrmstr But it only works with NA_character_, not NA, NA_real_, TRUE or any other reserved names. — And the reason is that NA_character_ (unlike all the others) is a character literal.

» NA = 1
Error in NA = 1 : invalid (do_set) left-hand side to assignment

klmr,
@klmr@mastodon.social avatar

@gaborcsardi I think R should not allow string literals in place of names, full stop. This change is even worth breaking a few packages on CRAN, IMHO, because the current behaviour is plain bananas and causes plenty of confusion.

klmr,
@klmr@mastodon.social avatar

@gaborcsardi Yes, backticks came later. And there’s still some ancient core R code which uses "-quoted names, but that could obviously be fixed when deprecating/removing the syntax. But I don’t think there’s appetite for it.

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