The decision to use ASCII strings is one that [image: Homepage] made for me. The task that led to this question is organize and store (as a compressed jld) IANA standard timezone names and city names as given therein and to automatically reintroduce them as just as they were as internal constants for a packaged module when others use that facility. I can hardcode them into a subfile, and probably will. I have to do much the same thing with many preprocessed numerical vectors, and those must live in compressed jld files because, most of the time almost all of it will not be used (and it is inappropriate to precensor the coverage).
On Saturday, July 11, 2015 at 11:26:26 PM UTC-4, Jeffrey Sarnoff wrote: > > ok, I appreciate the clarity > > On Saturday, July 11, 2015 at 8:02:01 PM UTC-4, Jameson wrote: >> >> A macro can't do this since it is strictly a pure source transform (it >> cannot access values or variables). `eval` is essentially an escape hatch >> to allow you to do anything, including this, but only in the global scope >> (and it's generally not recommended). >> >> it was a design decision in julia not to allow this in local scope. there >> are much better ways of solving the problem that don't cause issues for >> type inference. I recommend the following solution (in v0.4 syntax): >> >> Dict{AbstractString, Any}( [ name => jld_load(joinpath(path, name*".jld)) >> for name in list ] ) >> >> (not tested, so please forgive any typos) >> >> >> On Sat, Jul 11, 2015 at 5:26 PM Scott Jones <scott.pa...@gmail.com> >> wrote: >> >>> Why are you limiting it to an ASCIIString? variable names in Julia >>> frequently have Unicode characters. >>> >>> >>> On Saturday, July 11, 2015 at 4:06:43 PM UTC-4, Jeffrey Sarnoff wrote: >>>> >>>> I have been trying to loop over variable names available as an >>>> ASCIIString vector, using each to generate the corresponding jld datafile >>>> path+name and load_ing() the datafile into its original variable name .. >>>> should this be done with string->symbol manipulation and/or is a macro >>>> required to effect an applicative assignment operator? I need some >>>> guidance >>>> on how to do it. >>>> >>>