3 ms·
Julia was made by academicians, and there's a reason we distinguish between academia and industry. In academia code is the means to an end, which is usually a
by mxkopy 4y ago
Julia was made by academicians, and there's a reason we distinguish between academia and industry.
In academia code is the means to an end, which is usually a paper. This means that the experience of writing the code, making sure it's portable, readable, etc. don't really matter. These are all industry concerns; specifics of implementation, not algorithm design/mathematical questions.
This isn't reflected in Julia as a language as much as it is in Julia as an ecosystem. Some of the packages I work with are poorly maintained or designed with 0 thought to the issues I described earlier. And since Julia is so new, there are few alternatives.
Imagine if your software was written by your college professor who'd pushed to prod maybe like 3 times in their life. Instead of just fixing the damn bug they're liable to make you fix it instead as an 'exercise for the reader', or posit that the problem input is outside of the scope of their class and refer you to another one.
My example of this is the Colors.jl package. Images, rather than being 3D arrays of floats/ints, instead become 2D arrays of RGB/HSV. But you can't do any arithmetic on RGB/HSV values, you need ColorVectorSpace.jl for that. I'm sure it makes sense, but I can't help but feel as if sense is taking precedence over the programmer's experience in many of these packages.
Again, I don't think Julia as a language is unfit for widespread use. But before it can be, it needs to burst out of its ivory bubble.
- markkitti 4y ago> My example of this is the Colors.jl package. Images, rather than being 3D arrays of floats/ints, instead become 2D arrays of RGB/HSV. But you can't do any arithmetic on RGB/HSV values, you need ColorVectorSpace.jl for that. I'm sure it makes sense, but I can't help but feel as if sense is taking precedence over the programmer's experience in many of these packages. If you just used Images.jl, it would load both Colors.jl and ColorVectorSpace.jl. Let's say you obtained one of the matrices of RGB values, but you wanted a 3D array of numbers. `channelview` will provide you with a no-copy representation of the image as exactly that. ``` julia> using Images, TestImages julia> img = testimage("barbara_color.png"); julia> typeof(img) Matrix{RGB{N0f8}} (alias for Array{RGB{Normed{UInt8, 8}}, 2}) julia> channelview(img) |> ndims 3 ``` While it took getting used to, have an image processing framework that explicitly has a concept of color instead of generically mapping everything into an array is actually quite useful. Having a 2D array representing a 2D image is conceptually quite nice. Also you can do arithmetic on RGB or HSV types directly. ``` julia> (RGB(1,0,0) + RGB(0,1,0))/2 RGB{Float32}(0.5f0,0.5f0,0.0f0) ```