Yes, this changed going from version 0.6 to 0.7 (which became v1.0). After that the syntax Foo{T}(...) is reserved for type constructors. Regular function signatures must use the where clause like this:
function ph_conjugate(psi::Vector{T}, states::HaldaneSphereStatesListLLL) where {T}
See:
(this link previews the 1.11 release notes, but the link should take you to the correct place)
and
Related to what Uwe is suggesting here, you can try running your code on 0.7 - this should give you deprecation warning for all the things that changed between 0.6 and 0.7, which you can then fix up. Given that 0.7 became 1.0, there’s then a good chance that you can run your fixed up code on 1.11 (modulo breaking changes to packages that you’re using).
I have installed juliaup, but encountered another problem
C:\Users\jmzhang>julia add 0.6.0
Installing Julia 1.11.2+0.x64.w64.mingw32
^C
C:\Users\jmzhang>juliaup add 0.6.0
Error: '0.6.0' is not a valid Julia version or channel name.
C:\Users\jmzhang>juliaup add 0.6.0
Error: '0.6.0' is not a valid Julia version or channel name.
C:\Users\jmzhang>julia --version
Error: The Julia launcher failed to figure out which juliaup channel to use.
C:\Users\jmzhang>julia
Error: The Julia launcher failed to figure out which juliaup channel to use.
C:\Users\jmzhang>
Now I cannot even use julia. Possibly because of the mistake in
C:\Users\jmzhang>julia add 0.6.0
Installing Julia 1.11.2+0.x64.w64.mingw32
^C
~> juliaup list
Channel Version
----------------------------------------------------
0 0.7.0+0.x64.w64.mingw32
0.7 0.7.0+0.x64.w64.mingw32
0.7.0 0.7.0+0.x64.w64.mingw32
(...)
As I said above, if you are interested in running 0.6 code and using it in more recent, actually supported Julia releases, 0.7 is probably the most helpful version for you.
Just curious, is there a rationale for juliaup only going as far back as 0.7? Considering how many minor versions are in v1 by now, is it much more of a burden to continue supporting more minor versions for v0, just for legacy code? I hadn’t learned Julia then, but a cursory look at old threads’ struggles to adjust to 0.7 would make me port things to v1 instead if the matching version is no longer an easy option.
Maybe irrelavant to this thread, but I just realise that a similar case indeed exists in python. While there are still some people using python 2.x, has anyone here worked with python 1.x or python 0.x? I believe they are no longer maintained now, though you can still get some of them, like here for 0.9.1.
My point is similar to Benny. Newer programming languages like python or Julia seem to put less emphasis on backward compatibility than old ones like Fortran, and according to Semantic Versioning, the major version number is indeed reserved for this purpose (backward incompatibility). Besides, “Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.”
In short:
It may not be a good idea to stick to legacy codes written in 0.x versions. It may be better to port them to newer versions.
For legacy code in 1.x versions and above, it may still be better to port them if the major version number have differed by larger than 1. For example, with Python 3 the current version, those code written in Python 1 should be ported instead of maintained. Luckily, Julia is still in 1.x and there are no such problems.
Unluckily, there may be much more codes written with Julia pre-1.0 than with python pre-2.0. I think the author of this thread has posed quite a lot of related problems in the forum, and I’m somehow curious about how large his legacy code base is.
~> juliaup add 0.6.0
Error: '0.6.0' is not a valid Julia version or channel name.
~> juliaup add 0.7.0
Installing Julia 0.7.0+0.x64.w64.mingw32
~> ubuntu
Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)
ngudat@PC-PW0AKFMK:~$ juliaup add 0.6.0
Installing Julia 0.6.0+0.x64.linux.gnu
I maintain my recommendation of installing 0.7 though (and even if you go for 0.6, just to 0.6 and not 0.6.0, no reason not to use the latest patch release)
Very odd - I thought maybe my juliaup was out of date, but juliaup self update says no updates available. I also can’t see any way to refresh the list of available versions.
Just to clarify, this is about juliaup. The old releases page seems to have binaries for almost everything (I did not check if the links still work). Interesting that macOS has v0.1, Windows showed up at v0.2, Linux at v0.3, I’d expect the order to be reversed.