Re: [julia-users] Re: checking a version number?
Yes, dealing with version numbers is really sweet in julia. I believe Stefan deserves credit for this. Incidentally, if you parse C library version numbers into a VersionNumber type, you can use all the same machinery. --Tim On Wednesday, December 31, 2014 04:19:44 AM Andreas Lobinger wrote: I see. The a = Base.VERSION and then looking at a.major a.minor is already enough in my case. I wasn't aware you could do even comparisions with the v string.
Re: [julia-users] Re: checking a version number?
Apparently it's important to get it right from the beginning: version numbers should be boring http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/ On Wednesday, December 31, 2014 2:25:54 PM UTC+1, Tim Holy wrote: Yes, dealing with version numbers is really sweet in julia. I believe Stefan deserves credit for this. Incidentally, if you parse C library version numbers into a VersionNumber type, you can use all the same machinery. --Tim On Wednesday, December 31, 2014 04:19:44 AM Andreas Lobinger wrote: I see. The a = Base.VERSION and then looking at a.major a.minor is already enough in my case. I wasn't aware you could do even comparisions with the v string.
[julia-users] Re: checking a version number?
On Wednesday, December 31, 2014 7:03:34 AM UTC-5, Andreas Lobinger wrote: What is the recommended way to get a julia major/minor version number (i need to check v.0.4)? Just parse Base.VERSION? Within Julia: *julia * *VERSION**v0.4.0-dev+2340* *julia * *VERSION.minor**4* Also, currently, in dev these are nice for embedding but have not been back-ported yet. DLLEXPORT extern int jl_ver_major(void); DLLEXPORT extern int jl_ver_minor(void); DLLEXPORT extern int jl_ver_patch(void); DLLEXPORT extern int jl_ver_is_release(void); DLLEXPORT extern const char* jl_ver_string(void);
[julia-users] Re: checking a version number?
On Wednesday, December 31, 2014 7:03:34 AM UTC-5, Andreas Lobinger wrote: What is the recommended way to get a julia major/minor version number (i need to check v.0.4)? Just parse Base.VERSION? You normally don't need to get the major/minor explicitly, because comparison operations are defined for the VersionNumber type. Just do VERSION v0.4- to check for versions before 0.4 or any prerelease thereof (the trailing -). Although for specific prerelease features you should check for a more specific version stamp (see e.g. the examples in Compat.jl)