Julia 1.10
docs.julialang.org
docs.julialang.org
Additionally:
* Parser error messages are clearer
* Stack traces are no longer infinitely long! They are good and legible!
* VS Code auto-complete stuff is snappier and more predictive (might be unrelated, but is a recent improvement in some VS Code things)
Altogether, I'm pretty happy with how this one shaped up and am looking forward to static compilation and interfaces being the next big focus areas.
using Plots
plot(sin)
from fresh start, and it's about 2 seconds on my Dell Latitude 7400 (Core i7).time julia -e "using Plots; plot(sin)"
Looking forward to update my Julia installation.
It takes some time to precompile packages, but once that's done I'm seeing the first plot pop up in fractions of a second.
Compliments to the Julia team! I'm looking forward to trying out this new version.
Not a fan of Python at all but now I just stick with that for my quant analysis. Tons of issues with Python too but atleast they are all known / well documented problems (also chatgpt knows pandas / matplotlib / python very well).
It does take some asking around to discover the optimal Julia workflow with Revise.jl, PkgTemplates.jl, VSCode settings/debugger, Pluto.jl, but now it's probably my best development experience. Julia 1.10 improves much of this as well.
This is a bit vague, any concrete example?
Are there subdomains that use it a lot? I am not sure what the diffeq landscape is exactly although it sounds related to dynamical simulations?
https://github.com/JuliaSpace/
Out of curiosity, what Python, Fortran, and C/C++ packages do you use / can you recommend?
I personally end up doing a lot of work that uses the HEALPix sky tesselation, so I use healpy [2] as well.
Openorb is perhaps a good example of a pure-Fortran package that I use quite frequently for orbit propagation [3].
In C, there's Rebound [4] (for N-body simulations) and ASSIST [5] (which extends Rebound to use JPL's pre-calculated positions of major perturbers, and expands the force model to account for general relativity).
There are many more, these are just ones that come to mind from frequent usage in the last few months.
----
[1] https://healpix.jpl.nasa.gov/
[2] https://healpy.readthedocs.io/en/latest/
[3] https://github.com/oorb/oorb
[4] https://rebound.readthedocs.io/en/latest/
[5] https://github.com/matthewholman/assist
Will look into those. I recently wrote a little n-body simulator to become familiar with Julia's DifferentialEquations.jl and that motivated me to learn more about astrodynamics.
The DiffEq library seems to pull you towards the SciML ecosystem and that might not be agreeable to everyone.
For instance a known Julia project that simulates diff equations seems to have implemented their own solver
It's an interesting space because:
-(a) there aren't really good benchmarks on the full set of options, so a benchmarking paper would be interesting to the field (which then gives a motivation to the software development)
-(b) none of the implementations I have seen used the detailed tricks from standard stiff ODE solvers and so there's some major room for performance improvements
-(c) there's some alternative ways to generate the stable steppers that haven't been explored, and we have some ideas for symbolic-numeric methods that extend the ideas of what people have traditionally done by hand here. That should.
so we do plan to do things in the future. And having Oceananigans is then great because it serves as a speed-of-light baseline: if you auto-generate an ocean model, do you actually get as fast as a real hand-optimized ocean model? That's the goal, and we'll see if we can get there.
We have tons of solvers, but you always need more!
I really do wish it were open source already though. I know they have laid out a roadmap for opening the source.
It gives real “Jony Ive leaving Apple to go work somewhere where nobody can tell him ‘no’ “ vibes.
Mojo also owes part of its design from the lessons it took from Julia (as per Chris Lattner [1]).
There is simply too many rough edges and usability problems as it is now, and at the current pace it will take maybe 10 or 15 years to address them.
On the other hand, the major use case for Julia is to have a fast, dynamic language. And it seems to me the time horizon for Python to become fast, or Rust or C++ to become dynamic is indefinite, so Julia is still the best bet in that space.
There are AOT compilers for JS.
There are also some nice demonstrations showing Julia compiled to web assembly. https://tshort.github.io/WebAssemblyCompiler.jl/stable/examp...
Each thread has its own lua_State. However, we provide a serialization scheme which allows automatic sharing for several Torch objects (storages, tensors and tds types). Sharing of vanilla lua objects is not possible, but instances of classes that support serialization (eg. classic objects with using require 'classic.torch' or those created with torch.class) can be shared, but remember that only the memory in tensor storages and tds objects will be shared by the instances, other fields will be copies. Also if synchronization is required that must be implemented by the user (ie. with mutex).
That's not general-purpose multi-processor threading, that's solving it for a very specific sub-problem.Numba is also really nice, and for just compiling against arrays I like it better than Cython. Neither help if you need data structures or abstractions, though.
Though as I said before, sometimes no amount of c++/c escape hatches can improve performance since you have to use python objects at some point or another and that will be the bottleneck. But by then, you won't needing some of the stuff Julia offers like the REPL and notebooks etc.
I haven't used Julia a lot but to me it's in a weird spot where it would be ideal to start projects with in theory since you won't need to outgrow the language you are starting with, since it's fast enough and has a pretty good/maintainable/sane design. But then you are sacrificing so much and will need much more time to get started that you might not ever get to that point anyways.
Just as an example, debugging obscure problems or deploying pytorch models that are more custom in prod is already pretty daunting at times, and it's the "best" and most popular ML framework in the world. I can't imagine how much more time consuming it would be when using a much smaller/less used library/framework.
So yeah all of that to say that being way faster isn't how Julia will win. Maybe a push from an influent player/big tech might give it the momentum it needs.
For open source accounts, there's the SciML showcase page https://sciml.ai/showcase/. Thats very focused in just one domain though, and I tend to just update it with what I remember to put in there so it probably only has about 1/4 of the blogs and news articles that it should, and the "External Applications Libraries and Large Projects using SciML" part is woefully incomplete, but at least it gives a picture of what's going on. It's hard to keep those kinds of pages up to date because exponential growth means that page requires exponential work.
All my data are in a database, Julia need to become more db oriented , that is it
A large part of why I started using Julia is because calling into other languages through the C FFI is pretty easy and efficient. Most of the wrappers are a single line. If there is not existing driver support, I would pass the C headers through Clang.jl, which automatically wraps the C API in a C header.
https://github.com/JuliaInterop/Clang.jl
I most recently did this with libtiff. Here is the Clang.jl code to generate the bindings. It's less than 30 lines of sterotypical code.
https://github.com/mkitti/LibTIFF.jl/tree/main/gen
The generated bindings with a few tweaks is here:
https://github.com/mkitti/LibTIFF.jl/blob/main/src/LibTIFF.j...
And don't get me started on how nice JuMP.jl is for mathematical optimization.
In what way is this true? Looks like Julia didn't exist until 2012. If I remember correctly, theano was the big AD thing in python at that point.
• Hello World 200 MB ?
• discoverability of functions:
object.fun<tab> => fun(object) in REPL / IDE?
object.<tab> => List of applicable functions?I think for the most part this is solved. It works very well and has good integration with VS Code:
julia> integrator.<tab>
EEst accept_step alg cache
callback_cache differential_vars do_error_check dt dtacc ...
etc. cut short. julia> ODEProblem(<tab>
ODEProblem(f::SciMLBase.AbstractODEFunction, u0, tspan, args...; kwargs...) @ SciMLBase C:\Users\accou\.julia\dev\SciMLBase\src\problems\ode_problems.jl:183
ODEProblem(sys::ModelingToolkit.AbstractODESystem, args...; kwargs...) @ ModelingToolkit C:\Users\accou\.julia\packages\ModelingToolkit\arrCl\src\systems\diffeqs\abstractodesystem.jl:911
ODEProblem(f, u0, tspan; ...) @ SciMLBase C:\Users\accou\.julia\dev\SciMLBase\src\problems\ode_problems.jl:187
ODEProblem(f, u0, tspan, p; kwargs...) @ SciMLBase C:\Users\accou\.julia\dev\SciMLBase\src\problems\ode_problems.jl:187
> Hello World 200 MBNot quite. There's a bunch of knobs you can use to get small binaries (I use this for industrial deployments often), but Jeff Bezanson gave a really nice talk at JuliaCon Local Eindhoven 2023 that described the reasons for the large binaries, what the memory is actually attributed to, and what to do about it (https://youtu.be/kNslvU3WD4M?si=hwo9AgXthNpiQ3-P). With the "normal options" you get to about 15MB now, still bad but not half as bad. The vast majority of that is the base system image. Jeff's talk then goes into the next steps with reducing the size of that base system image.
julia> x="hi" "hi"
julia> x.<tab>
nothing!
julia> propertynames(x)
()
Nothing is the correct answer there because there are no properties. `x.y` for any y is an error, so that is correct.If what you're trying to do is instead discover functions which are compatible with a given signature, you can use what is described in the other post:
julia> ?("hello", 1, 2.0)[TAB]
broadcast(f, x::Number...) @ Base.Broadcast broadcast.jl:844
readuntil(filename::AbstractString, args...; kw...) @ Base io.jl:520
...
which shows all of the dispatches that match an argument set and thus the functions that can be called on it. Generally the IDE completions do a bit nicer display of that then the REPL though. julia> using StaticTools, StaticCompiler
julia> hello_world() = printf(c"Hello World\n")
hello_world (generic function with 1 method)
julia> compile_executable(hello_world, (), "./")
"~/hello_world"
shell> ./hello_world
Hello World
shell> du -h hello_world
16K hello_world
See https://github.com/brenhinkeller/StaticTools.jl for further details and limitations.For discovering methods you can do
julia> ?("hello", 1, 2.0)[TAB]
broadcast(f, x::Number...) @ Base.Broadcast broadcast.jl:844
readuntil(filename::AbstractString, args...; kw...) @ Base io.jl:520
...
See the Tab Completion section of the REPL documentation, https://docs.julialang.org/en/v1/stdlib/REPL/#Tab-completion .Can I use PyTorch or JAX comfortably in Julia?
https://github.com/FluxML/Flux.jl
On top of that there are many higher level libraries such as Transformers.jl
Lux is similar to Flax (Jax) where the parameters are kept in a separate variable from the model definition, and they are passed in on the forward pass. Notably, this design choice allows Lux to accept parameters built with ComponentArrays.jl which can be especially helpful when working with libraries that expect flat vectors of parameters.
Flux lies somewhere between Jax and PyTorch. Like PyTorch, the parameters are stored as part of the model. Unlike traditional PyTorch, Flux has “functional” conventions, e.g. `g = gradient(loss, model)` vs. `loss.backward()`. Similar to Flax, the model is a tree of parameters.
No. And it doesn't seem like that will become possible any time soon.
There is https://github.com/rejuvyesh/PyCallChainRules.jl which makes this possible. But using some of the native Julia ML libraries that others have mentioned is preferable.
unescaped * caused website to italise text between formulas