« first day (2994 days earlier)      last day (1480 days later) » 

6:15 AM
@MichaelHale Thanks!
 
 
6 hours later…
12:29 PM
@Szabolcs Thanks for the link to Todd Gaylay's explanation on paclets!
It is a wealth of information. However, I am confused about paths, resources and extensions. E.g. how do you refer to a subdirectory of your package (within a package file and not in PacletInfo.wl) without actually using $InputFileName?
 
12:58 PM
@IstvánZachar I cannot answer that immediately without looking it up ... If it is not mention in the "PacletInfo documentation project" QA, I would look at several paclets in the installation directory and see what they do. This is what I would do to figure it out.
I search for all files with the name PacletInfo.m and look in each, then see if any provides resources like this, finally read the source.
 
 
1 hour later…
2:09 PM
posted on March 30, 2020 by Brian Van Vertloo

The Wolfram Language is the culmination of decades of effort, supporting all our products. One reason the Wolfram Language is so easy to use is the Wolfram Language & System Documentation Center—unique in that it contains reference information along with tens of thousands of examples that can be edited and run in place (or quickly [...]

 
2:49 PM
@IstvánZachar You can use something like this to get the path for a paclet base directory, Lookup[PacletManager`PacletInformation["Chemistry"], "Location"]
I like that syntax, but I think the newer way to do it is Information[First@PacletFind["Chemistry"]]["Location"]
That gives the base directory then you can use FileNameJoin as usual to locate a file.
 
@JasonB. Considering that the system should already now the location of my paclet (given all the relevant info in the PacletInfo.m) I do not want to perform extra calculations to get the location again. Due to the extension system, it should be straightforward to use local paths within the package, without calling back to PacletFind or related.
 
sure, but then you need to use $InputFileName, right?
 
Not necessarily: if the PacletInfo is set up correctly, one cen refer to local directories and files from within the package files like "MyPackage/Images/test.png". At least that's what the documentation states. However, I failed to refer to either a file or a directory without using FindFile or $InputFileName (respectively).
 
That should work fine if MyPackage is on the context path
I would put the folder "Images" in "MyPackage/Resources", then always refer to the images using imageDir = PacletResource["MyPackage", "Images"]; FileNameJoin[{imageDir, "test.png"}]
 
3:08 PM
@JasonB. But how do you refer to a directory dir, so that in my package, I can call FileNames["*.dat",dir] without either spelling out the absolute path of dir or using FindPaclet or $InputFileName?
FindFile does not work on directories, just files. And a FindFile["MyPackage"] refers to the init.m within the Kernel subdirectory, so I'd have to dissect the found path to refer to the root.
btw: PacletResource is an obsolete symbol; use paclet[\"AssetLocation\", \"assetname\"] instead.
 
PacletResource is so much more convenient though - I'll use it till it goes away :-)
 
@IstvánZachar So what are you cooking up?
 
 
3 hours later…
6:16 PM
Ben Popper on March 30, 2020
Our most requested feature is finally coming to life. You can try out Dark Mode in beta across Stack Overflow and help us make it great.
> For now, we have no plans to bring dark mode to the many sites across the Stack Exchange network.
😭
 
 
2 hours later…
7:47 PM
@JasonB. It's PacletObject["Chemistry"]["Location"]. I was confused too. I don't know if PacletFind is guaranteed to return the active version first. I wouldn't rely on it.
One last call to please test IGraph/M 0.3.116 (look through the docs, play with it, etc.). If there are no issues, this (+ a few minor fixes) will become 0.4 at the end of the week.
@ChipHurst I know you were annoyed by the message printed at startup. Now that can be suppressed with a simple ;
 
8:11 PM
@ChrisK I have a complex package with multiple files in multiple directories. There is a subdirectory with variable content: it is initially empty, but if the user puts something here, I want the package to load those files. So I cannot refer to a specific filename but I have to read the directory contents on kernel stratup.
 
8:46 PM
@IstvánZachar Just some vague thoughts: If users are expected to put files in that directory, maybe that directory should not be part of the package. Would it be better to place the files either in an arbitrary location that can be registered, or in $UserBaseDirectory/ApplicationData?
 
9:11 PM
@IstvánZachar I was wondering more about the topic! ;)
 
Asked and answered on this site, but my google-skills are lacking at the moment. How do I get the entity name from something like WolframAlpha["1,2-difluoroethylene"] to pass to ChemicalData[<entity>,"MoleculePlot"]? Alternatively, getting the Pod-free output from WolframAlpha would be nice.
 
9:39 PM
@Szabolcs Yes, I have the same long term goal of course, but for the development phase, it would be useful for me to be able to put one or more files there. Since I do not know what I will put there during development, I cannot reference them by explicit names, hence I'd prefer a lookup on startup. I can live with $InputFileName or similar, but it just seems unnecessary given that relative locations should be easy to handle.
 
@bobthechemist If the entity were in chemical data this would work Interpreter["Chemical"]["1,2-difluoroethylene"]
 
@JasonB. Ok, I got fooled by some of the pod names mentioning "...:ChemicalData" and thought the molecule was there.
 
no, everything for that molecule is created on the fly
 
@ChrisK Unfortunately, I cannot disclose that as per company policies. Unfortunately, this won't be public :/
 
Got it, thanks. FWIW, I'm looking for a couple obscure-ish molecules for 3D printing a set of compounds for exploring point groups. Those that are in chemical data are making my life very easy...
 
 
1 hour later…
11:15 PM
@IstvánZachar No worries, I was just remembering your amazing Gillespie simulator and got curious
 

« first day (2994 days earlier)      last day (1480 days later) »