# Announcing the Wolfram Function Repository on Community

Posted 12 days ago
418 Views
|
19 Replies
|
39 Total Likes
|
19 Replies
Sort By:
Posted 12 days ago
 Thanks Daniel for the nice post. I have already contributed some functions and a bunch are submitted. It is actually also a lot of fun to see new functions appearing every couple days, learn about new stuff and so on! Just out of curiosity: does Wolfram track the usage of each function? Can contributors get those? I could imagine that functions that are most-used will be considered to be implemented in to the Wolfram Language?
Posted 12 days ago
 Tracking usage is under discussion. I believe we do count downloads but I'm fuzzy on details. It is not yet determined how we will make this available to contributors but I think we are in consensus that that would be a good thing to do.
Posted 12 days ago
 I wish I'd read this about 20 minutes ago when, right before hitting the Submit button on two candidate functions, I said "Oh what the heck" when I could not figure out how to format arguments. The consolation is learning that I am not alone.
Posted 12 days ago
 I think this thread could use some BirdSay: ResourceFunction["user:rhennigan/BirdSayCommunityPost"][ "https://community.wolfram.com/groups/-/m/t/1703373" ]
Posted 12 days ago
 Are there more animals in the pipeline?
Posted 12 days ago
 Ahem. What it needs, my young friend, is an artistic rendition.Start by grabbing the full text. wfrThreadText = Import["https://community.wolfram.com/groups/-/m/t/1703621", "Plaintext"] I'll spare everyone the long string but it is readily seen that the text of interest is between the second and third appearances of my name. posns = StringPosition[wfrThreadText, "Daniel Lichtblau"] (* Out[370]= {{3351, 3366}, {3453, 3468}, {10171, 10186}, {11139, 11154}, {11171, 11186}, {11522, 11537}} *) I have to step in a number of characters to avoid some stuff on the page. Similar issue at the end altthough less stepping needed. myText = StringTake[wfrThreadText, {posns[[2, 2]] + 160, posns[[3, 1]] - 20}]; And now we make a picture. ResourceFunction["TextToKaleidoscope"][myText] The hard part was spelling "kaleidoscope".
Posted 12 days ago
 Nice! The next move is to create twitter box in notebook.
Posted 12 days ago
 I think it would be nice also to have a "What's new section" for new functions for the users visiting frequently the repository. New functions could stay there for a couple of weeks along with their alphabetic or topic sorting.
Posted 12 days ago
Posted 12 days ago
 Yes exactly. I hadn't noticed that. After how long a function is removed from recent ?
Posted 12 days ago
 A quick note: by "How it works" section, we can access the resource function offline after the first time you retrieve the content from Wolfram Cloud. Information displays the UUID, local cache and persistent path of a particular local object. For example, we have three ways to use BirdSayOf course, BirdSayCommunityPost won't work offline because it requires internet connection to retrieve community articles. If we no longer want the ResourceFunction object to be present on our machine, DeleteObject[ResourceObject[""]] or ResourceFunction["BirdSay"] // ResourceRemove comes in handy to remove the content.
Posted 6 days ago
 Could you, or somebody, please tell us — with a simple, direct explanation that perhaps a Mathematica user of some 20 years standing — exactly how to use a function already in the Wolfram Function Repository?For example, suppose I want to use the function SymmetricDifference in my local Mathematica notebook. How do I retrieve it right now for that notebook? How do I make it available in subsequent sessions without having to go back to the on-line Wolfram Function Repository each time? Here's one source of my mystification. Input ResourceFunction["SymmetricDifference"] does return as output some kind of gadget, with a gray background, bearing text like [*] SymmetricDifference (it's a placeholder symbol, actually, where I just showed an asterisk).Yet strangely, Information[%] gives two ResourceObject errors messages that "The specified ResourceObject could not be found", then followed by a formatted version of: ResourceFunction[ ResourceObject[ Association[ "Name" -> "SymmetricDifference", "ShortName" -> "SymmetricDifference", "UUID" -> "4f3f7f00-c70a-455e-8bd4-1eaa2b455ae5", "ResourceType" -> "Function", "Version" -> None, "Description" -> "The complement of the union and intersection of \ lists with duplicates deleted", "SymbolName" -> "FunctionRepository$\ 4f3f7f00c70a455e8bd41eaa2b455ae5SymmetricDifference"], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\ resourcesystem/api/1.0"]] Next, if I try, say, ResourceFunction["SymmetricDifference"][{1, 2, 3}, {3, 4, 5, 6}] then again I get a "ResourceObject::notf: The specified ResourceObject could not be found." error message.So I don't even know the answer to my question 1., let alone the answer to 2.Somebody needs to write up a simple, clear, direct explanation of how to use the WFR -- and make it prominently available as part of the Mathematica documentation center or, at least, on the WFR site. Without that, all the docs I've seen so far about how to write and submit definitions to the WFR are of little avail except to the insiders who already understand what's going on. Answer Posted 6 days ago  What version of Mathematica do you have? You need 12.Does CloudConnect[] work on your machine?Then the input should just be: ResourceFunction["SymmetricDifference"][{1, 2, 3}, {3, 4, 5, 6}] and should return: {1, 2, 4, 5, 6} Answer Posted 6 days ago  Yes, Mathematica 12.0.0. (macOS)I just ran CloudConnect[], which apparently worked OK as it returned as output the value of my$WolframID. (Shouldn't that happen automatically, when I start Mathematica? When I do, on the Welcome Screen I do see the signing-in process happening automatically.)But still the same error as before when I try to use ResourceFunction["SymmetricDifference"][{1, 2, 3}, {3, 4, 5, 6}] namely, the error message "ResourceObject::notf: The specified ResourceObject could not be found." and the output: \$Failed[{1, 2, 3}, {3, 4, 5, 6}] Wait... I quit that Mathematica session and opened a new one. Now without evaluating CloudConnect[], the input ResourceFunction["SymmetricDifference"][{1, 2, 3}, {3, 4, 5, 6}] works OK. And so does using the iconized output from ResourceFunction["SymmetricDifference"] in that same expression.This mysterious failure then success more or less answers my first question. Now what about an answer to my 2nd question?And related to that, what exactly are the distinctions between, and relationships among, the following directories? ~/Library/Wolfram/Objects/DeployedResources/Function ~/Library/Wolfram/Objects/Persistence/ResourceNames ~/Library/Wolfram/Objects/Resources I note that in the first of those three directories I have a subdirectory SymmetricDifference containing two items, namely, object.wl and put.wl, the second of which includes among its associations: "ResourceLocations " -> {LocalObject["file:///Users/murray/Library/Wolfram/O\ bjects/Resources/4f3/4f3f7f00-c70a-455e-8bd4-1eaa2b455ae5 "]} Or do I not need to understand the relationships among those directories in order to intelligently (with understanding) use a ResourceFunction?
Posted 6 days ago
 I have no idea about storage of those functions… Is that important to know?
Posted 6 days ago
 Murray,Thanks for the questions. I don't know what could have caused your initial failure. Perhaps a failed paclet update of the resource function framework code? Regardless, the dead simple use case that you tried is correct and should have worked immediately. There is no configuration or set up needed. With version 12, anywhere that you can CloudConnect, you can just use ResourceFunction["name"] or the gray, pill-shaped blob like you would a normal symbol in Mathematica.Once you use a published resource function it will be automatically cached on your computer and you should not need to retrieve it from our servers ever again (unless you choose to get an update).As for the different file paths. You definitely don't need to know anything about them. They are an implementation detail. If you want to know about them, I'm happy to tell you why we have those three paths. Objects/Resources is where the actual resources objects (ResourceFunction is built using ResourceObject) are stored locally. It contains the full metadata and any content that has been cached along with possible ancillary files. This path is intended to only be used by the built in ResourceObject code. Directly modifying files on this path is a good way to break things in unpredictable ways. However DeleteObject[ResourceObject[...]] should always provide a clean slate. Persistence/ResourceNames is part of the PersistentValue framework. It is used by ResourceRegister and ResourceObject to provide fast recognition of resource names. This improves the performance of ResourceFunction["name"] from session to session. Again, modifying files directly on this path will probably only give you headaches. DeployedResources/Function is a default path for local deployments of resources made by LocalCache with no second argument (or with the Deploy button in the definition notebook). This is a path you might interact with by using ResourceFunction[LocalObject["path"]]. Directly modifying the files here is unlikely to cause you any real issues.
Posted 6 days ago
 Greatly clarifies & elucidates; thanks!It's still surprising that, so far as I can see, the WFR does not tell how to use what's there (except somewhat buried in the linked long blog post by Stephen).