« first day (2482 days earlier)      last day (1992 days later) » 

 
6 hours later…
8:34 AM
@C.E. Can you add FEMAddOns to PackageData? You're in a better position to write a good description.
 
8:50 AM
@Szabolcs Yes, certainly
 
posted on November 04, 2018

BioFormatsLink extends `Import` to be able to import many image formats typically used in biology, particularly in microscopy. It interfaces with the [BioFormats library](https://www.openmicroscopy.org/bio-formats/).

posted on November 04, 2018

RhinoLink is a package for interfacing with [the Rhinoceros 3D modelling and CAD software](https://www.rhino3d.com/), as well as its [Grasshopper](https://www.grasshopper3d.com/) visual scripting extension. With RhinoLink you can: - script Rhino with Wolfram Language code - create Grasshopper components that encapsulate Wolfram Language code - control Rhino content with Wolfram Lang

 
Hm, the MarkDown is not processed for the RSS
 
9:04 AM
@Szabolcs Fixed it.
 
 
2 hours later…
11:02 AM
I want to rename an option that many many functions in my package use. If the option name were a symbol, it'd be an easy assignment. But it's a string.
What's a good way to retain compatibility with the old syntax, while making the smallest number of changes to functions?
 
 
2 hours later…
1:03 PM
@Szabolcs How about the following:
Attributes[HandleLegacyOption] = {HoldAll};
HandleLegacyOption[o : OptionValue[sym_, opts_, name_]] := o //. Fallback[old_] :> OptionValue[sym, opts, old]

Options[f] = {"bar" :> Fallback["foo"], "foo" -> 1};

f[OptionsPattern[]] := {HandleLegacyOption@OptionValue["bar"]}

f[]
f["bar" -> 2]
f["foo" -> 2]
f["foo" -> 2, "bar" -> 3]

(* {1} *)
(* {2} *)
(* {2} *)
(* {3} *)
 
1:16 PM
@LukasLang Looks workable. OptionValue is a bit tricky and cannot be easily wrapped because it always tries to retrieve options from its wrapping function.
@LukasLang Also, I did not know that it automatically expands to this 3-argument form on its own.
@LukasLang Do you want to post this as an answer to a full question (if I ask it)?
 
@Szabolcs sure, I'd be happy to
 
0
Q: Renaming options of custom functions while preserving backwards compatibility

SzabolcsI have a package with many functions. There is an option name that several functions share. I feel that the current name of this option was not the best choice. I would like to rename it, but at the same time I would like to preserve backwards compatibility. If this option name were a symbol, ...

 
1:50 PM
Do we have a post explaining why f = {}; f[x_] = x makes no sense?: mathematica.stackexchange.com/questions/185155/…
 
2:54 PM
@LukasLang Still too advanced for that guy, I'm afraid. Anyway, let me show him this.
 
3:17 PM
@Kuba I think you might have comments on the above. I did ask you about this once in the past, but sadly it was in chat and I cannot find it.
 
3:37 PM
I never realized before how this is parsed: Range[3][[;; ;;]]. I assumed it would be equivalent to Range[3][[1 ;; -1 ;; 1]].
2
 
4:12 PM
@Szabolcs I suppose this is probably not a useful paradigm for you to use:
fun[args___, opts : OptionsPattern[]] :=
  With[{newopts = checkOpts[fun, {opts}]},
   iFun[args, newopts] /; FreeQ[newopts, $Failed]];
 
4:42 PM
0
Q: What should I do if somebody answers my question in the comment?

TSantMy problems are solved thanks to an answer in the comments. I also would like to provide official recognition by accepting this answer, but I can't.

 
 
3 hours later…
7:15 PM
Is there anyone around with an older Linux distro or an uncommon distro, and Mathematica installed? I'd need something tested with IGraph/M. You might have access to such a distro through your institutional cluster.
(Jason: I know you have a VM with RH 6.x, but that's too old.)
 
@Szabolcs your options question? Unfortunately I can't recall if I had anything to say back then but I've posted an answer now.
 
Thank you, I'm looking ...
 

« first day (2482 days earlier)      last day (1992 days later) »