Administrative Scripting with Julia
github.com
github.com
It was just so pleasant and enjoyable to program in, and there were many things I was able to do with the language that would have been much more difficult in other languages (as one example, I wrote a generated function to compute the irreducible matrix representations of compact groups; Julia generated a unique function with optimized bytecode for each distinct matrix dimension).
Like the post author, I also found Julia easy to use as a general purpose programming language. I’m still hoping adoption will gain momentum at some point. Python certainly took a while to get going.
In my new/current role, I primarily use Python but would prefer not to; however, it's a tough case to make against Python when it's become the default data language (along with SQL).
Backing of a large tech company. I tried to get something going at the one I worked at, but it went nowhere. To my surprise a coworker who was also one of the early top contributors to Julia mentioned to me that the language was unlikely to ever take off internally because the company had already invested so many resources into improving and building upon Python.
Have a gloriously wonderful day =)
So why hasn't it gotten more popular in science and engineering? It seems to have stagnated in popularity since 2020 for no particular reason - the language itself has not stagnated, and it gets better every year. I'm honestly bewildered.
And of course, Perl also replaced an existing language. It's not like people settled on Fortran in the 1950s and then never moved on.
This isn't true. Optimized Julia will pretty much always tie optimized C/C++. This shouldn't be surprising. They use the same compiler and run on the same hardware and both let you use inline assembly where needed. Octavian often beats MKL at matmul, and the Julia math library is written in Julia and doesn't lose performance from doing so.
Rewriting to Julia instead of C/C++ has the benefit that the code is still readable and improvable by scientists who wrote the code in the first place.
https://julialang.github.io/PackageCompiler.jl/stable/sysima...
In Julia 1.9 and beyond, this process now also becomes modular with a native library being produced per package.
The difficulty is determining what exactly must be compiled since Julia's methods are polymorphic. There's are tools that exist to help with this. One of the latest that is SnoopPrecompile.jl.
The choice of (non-Bash) language to write command line utilities is in a bit of odd spot right now. Python is basically almost everywhere installed but the dependency on runtime + venv oddities bring their own set of problems. Java has similar runtime needs though things might improve with initiatives regarding native binary compilation (though including the runtime may not produce exactly lightweight executables) - also, not super popular among the younger crowd. Perl used to be a hot favorite in this space but I don't think lot of people are writing new stuff in Perl even though it is still present by default almost everywhere. Go is almost perfect here except I don't want to deal with 3x the boilerplate. Personally I think Rust isn't a bad choice (libraries like clap hugely reduce the boilerplate) but the learning curve makes it a harder sell (even though for basic utilities, I don't think there would be too much wrestling with the borrow checker). Another choice that comes to mind is Nim; I think it is very well positioned except a lot of people don't know even about it so its a hard sell + even among those who know, everyone is looking at everyone else to take the initiative to adopt it in a corporate environment at a non-trivial scale.
[0]: https://github.com/ninjaaron/administrative-scripting-with-j...
Not that it changes your core message, but if you need scripting dependencies, you should use pipx[0]. Pipx will manage isolated virtual environments for each utility. ‘pipx install black’ will create a dedicated venv just to hold black. Invoking ‘pipx upgrade-all’ will scan all venvs for out of date utilities.
My only reservation is that PHP API to start external processes are awkward. They either use a shell and require careful escaping of arguments or too low level with explicit fork/exec. I took care of that with few utilities, but for a quick replacement of shell scripts this is a significant drawback.
On the other hand modern PHP supports types out-of-the box. It turned out to be a big plus when those administrative scripts grew in size.
Something like Swift might be a good option in the "OCaml featureset + boring syntax + low startup overhead" space, which is what we're really looking for.
Ah yes Swift is another excellent choice. I didnt like it much originally (few years ago) but based on an HN comment recently, went back to do the introductory tutorial. It has come a long way and is very pleasant to use. If I had to guess, its close association with Apple might bring "iOS"/"mac"-only connotations that might make folks not consider it. Don't know how I forgot about it.
This is just an idle question I’ve had, not related in any way to Python.
You also get great static types which is nice.
#r "nuget: Newtonsoft.Json"
[1]: https://learn.microsoft.com/en-us/dotnet/fsharp/tools/fsharp...
[2]: https://github.com/dotnet-script/dotnet-scriptAlso it seems like F# and C# should be on the list (see other comments in this thread).
It didn't cross my mind to add IDE information. (I don't use an IDE, which may be a mistake. I want to give IntelliJ IDEA a serious try.) I'll be honest: I probably won't add this information. Sorry. N projects × M IDEs is a sizable number of fields to keep accurate by hand, and I've learned this kind of maintenance is best avoided.
I have tried https://github.com/dotnet-script/dotnet-script. It seemed like it could not download dependencies when you ran the script, only reference already installed dependencies. At that point I stopped and did not add it to the list, since it would not qualify. I may have been wrong. I have a mental note to look at it again.
I'll see what F# does. It may work differently from how I understood dotnet-script to work. (It isn't the criterion for inclusion, but as someone who enjoyed writing Standard ML and not so much Haskell, I am actually interested in F#.)
F# support looks really interesting though; I'm definitely going to check it out.
[1]: https://libuv.org/
[2]: https://docs.julialang.org/en/v1/manual/running-external-pro...
[3]: https://docs.julialang.org/en/v1/manual/running-external-pro...
[1] https://github.com/ninjaaron/administrative-scripting-with-j...
using SHELL=julia in your makefiles.
(/s)
> write above proper english
I agree. I thought about learning English, but I also thought since ChatGPT is available, why bother learning it? So I decided not to learn it now and just wait for ChatGPT.
Just asking because I don’t want to start poking at the ML stuff but don’t have any experience/baggage to go along with it.
However, I must caution against trying to replace Torch within Julia. The Julia ecosystem does not have these huge libraries for neutral networks yet. Building such a thing requires a huge investment (by a company like Google or Facebook) and Julia is not there yet. You can do neural networks with GPU support in Julia (even with extremely fancy autodiff capabilities) but it's not "production ready" in that you will have to deal with the quickly moving ecosystem and probably even end up contributing to it, if you stick with it long enough to build something interesting.
On the other hand, if you ever wanted to add a "neutral network term" to a PDE to simultaneously solve and train the network, Julia is the place to go. It's crazy what kinds of modeling you could potentially do with stuff like that.
Maybe I was too broad in my initial statements about pythonic code, because comprehensions for example work pretty much the same as in python, and they are fast. It’s just that if you’re used to mind bending array broadcasting tricks in numpy or whatever, there’s usually a more Julian way to get it done with better simplicity and performance. BenchmarkTools.jl and some of the standard library tools are also really great for getting a sense of what matters
The result was...disappointing.