-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JULIA_ENV #2430
Comments
Mailing list is good for people who might not constantly F5 their GitHub notifications page. |
I like it. I wonder if it should be a hierarchical data structure or just flat with slashes in the keys like you have here. Also, calling it |
Not opposed but this has the potential to start looking ugly. |
How come, @mlubin? Is there something you can think of that would be cleaner? |
I guess I'm worried more about the documentation issue and trying to figure out which magical string changes the property you want. |
I had the same thought that autocompletion / declaration / checking would be nice, but felt this was at least better (more informative) then setting random environment variables, and I wanted something that could be set independently of whether it was actually needed at any given time. But, let's expand the convention to suggest a module should set values for all keys it cares about (to make discovery easier), and provide a Agreed, CONFIG (and CONFIG_cb) sounds like a better name. I'll edit the original post to replace JULIA_ENV with CONFIG. I initially considered |
Ah, the julia registry :) |
I wanted something independent of whether a module had been loaded, so you could set values prior to loading the module. And I figured that a dictionary in Base is easier and less cluttered than making accessors for every possible config value. I guess it is essentially a julia registry. Well, in that case, I can only assume we should probably implement this using JSON, following the trend of past OS registries using what seemed to be the storage system of the day. |
FWIW, I agree with Jeff's idea of CONFIG dictionaries (or JSON structures) being module local. I think you risk too much having a global dictionary with potential conflicting rules/configurations (imagine a future with dozens of modules and a global dict getting uncontrollably out of hand). Staying module-local keeps things cleaner and more organized and reduces the risk of having Base conflicts. I don't think it's too much of hassle to load the Pycall module, set a Pycall.CONFIG value, then reload. I also think we have to avoid using the I think in general, use of CONFIG should be discouraged in favor of programmatic defaults and good API design; my limited experience with PHP has made me strongly dislike the all-powerful |
The best approach is to avoid configuration altogether. Having to call e.g. I don't think setting an option and reloading a module will work, since the value would have to be stored somewhere globally in order to persist. |
With the |
gesdd's RWORK size was recently changed to match the netlib header. However, the minimum size calculated results in a segfault. Both Octave and Numpy use a different minimum size, and testing verified that anything smaller than this leads to a segfault. Numpy: https://github.com/numpy/numpy/blob/master/numpy/linalg/umath_linalg.c.src#L2922 Octave: http://hg.savannah.gnu.org/hgweb/octave/file/2f1729cae08f/liboctave/numeric/CmplxSVD.cc#l184
This will be part of Pkg3: https://github.com/JuliaLang/Juleps/blob/master/Pkg3.md#runtime-configuration But can only be given at the project environment level, not globally, and not in packages. |
instead of allowing
using
to take arguments, I thought it might make sense to provide a global dictionaryCONFIG
of typeDict{String, Any}
, roughly equivalent toENV
that could take arbitrary configuration parameters.e.g.
(note the convention that items in base will be only names, whereas Modules should prefix their variables with their uppercase module name, or a meaningful lowercase string if it is a shared option)
and then we can also allow a callback notification function to be registered which can do additional work and/or disallow changes:
edit: replaced
JULIA_ENV
variable withCONFIG
The text was updated successfully, but these errors were encountered: