r/Julia • • Aug 08 '25

Best AI for Julia?

0 Upvotes

What do people find to be the best AI for helping write Julia code?

It seems to change as the AI evolves, but lately I've had pretty good results with Gemini. I usually get a reasonable answer. Mistakes get corrected and it doesn't get into loops where it changes something, but it still doesn't work repeatedly.


r/Julia • • Apr 13 '20

How NASA could have prevented a $200m crash with Julia's type system (youtube.com)

Thumbnail
youtube.com
0 Upvotes

r/Julia • • Jan 26 '24

2024 maybe the year for Julia

6 Upvotes

With companies focusing on saving cost now, I think it might be the year when Julia can replace Python in production ml systems


r/Julia • • Oct 15 '20

Higher dimensional cross product (post banned on discourse)

2 Upvotes

This is a response to https://discourse.julialang.org/t/higher-dimensional-cross-product-in-linearalgebra/47919

akshu3398:

and some of the major packages still uses the same definition in LinearAlgebra library for their own cross products(may be they were thinking that someone might someday extend that definition).

There’s no problem with extending the LinearAlgebra.cross method in Grassmann because the cross product defined in Grassmann.jl only operators on AbstractTensors.TensorAlgebra types, so that it doesn’t interfere with LinearAlgebra or cause type piracy. It would in fact be type piracy to redefine the LinearAlgebra.cross for Vector types.

akshu3398:

cross([1,1,1,1], [2,2,2,2], [3,3,3,3]) .|> iszero |> all

You don’t need a cross product for this operation at all. The cross product is the complement of the exterior product, and all you need there is to take the exterior product to see if it is zero. The cross product would be unnecessary for your operation, since taking the complement is not needed.

Additionally, the cross product is defined as the complement of the exterior product of 2 vectors, which makes the cross product a pseudo-bivector! What you’re describing is a pseudo-trivector, which is no longer a generalized cross product at all, so the LinearAlgebra.cross name is incorrect.

akshu3398:

cross([1,1,0,2,4], [3,0,1,-5,3], [3,3,3,1,2], [-4,2,0,7,1]) == [-13.0, -221.0, 195.0, 51.0, 33.0] # true

Again, this is not a cross product at all, a cross product would be a pseudo-bivector, while you are calculating a pseudo-vector here.

Therefore, you seem to be misunderstanding some fundamentals here, LinearAlgebra.cross should produce a pseudo-bivector.

In 3dimensional space, there is a special case for the cross product that results in a vector, because the pseudo-bivector of 3dimensions is a vector. However, in higher dimensions, the pseudo-bivector is not a regular vector at all.

What you seem to be looking for is just a regular exterior product to check for linear independence.

Olof_Salberger:

attempt to avoid a situation where people have to worry about whether they are importing PackageA.(∧) or PackageB.(∧)

This issue has already been resolved by AbstractLattices.jl, which provides an undefined `∧` symbol for common use among packages.

Orbots:

what “those other operators” could be would require someone with knowledge of how tensors and geometric/clifford products are related.

Unfortunately, chakravala has been banned from discussing on discourse, he has a lot of ideas about how to integrate Grassmann exterior products into the Julia language for linear algebra purposes.

Indeed the exterior product is metric independent, so it would be easier to implement it in the base language than other geometric algebra operations. Nevertheless, to have any sort of performance efficiency you need something statically allocated, and just like StaticArrays is outside of the base language it naturally makes sense to have static allocated exterior products in external packages.

The main reason for not including things like this in the base language is because these type of packages are still changing at a much faster pace than the base language, so it wouldn’t make sense to only update it once every 6 months on the base language release cycle.

The fact that Julia Stewards censors open source collaboration is problematic, this is why somebody else will have to link my response to the discussion.

Please post a link to my response on the original discourse thread, to help akshu3398


r/Julia • • Jun 18 '20

please ignore this post

0 Upvotes

but i can't resist posting. in some random forum, the problem came up to find with a function that gives 5, 12, 21, 89 to inputs 1, 2, 3, 8. after fiddling with it a bit, here is what i came up with:

[i^j // 1 for i = [1,2,3,8], j = 0:3] \ [5, 12, 21, 89]

which gives:

4-element Array{Rational{Int64},1}:
1//5
109//30
6//5
-1//30

so we have 1/5 + 109x/30 + 6x2/5 - x3/30. problem solved in one line of code.


r/Julia • • May 27 '20

Julia's worst (but possibly only) mistake

1 Upvotes

There are many things about Julia I really like (from the functional paradigm, the flexible macros, to the opensource philosophy and github integration), but honestly there is one rather big thing that almost kills it: column-major arrays.

Is that really the way of the future? So far I have not heard a single argument about why any language should use column-major, aside from appealing to ancient languages - which doesn't sound very futuristic.

Meanwhile, row major has some significant benefits:

  • when iterating over dimensions - if we iterate over one dimension after another, right to left

[Edit: the point here is that column-major expects us to iterate over dimensions right to left (if we think of the nested loops outer to inner). With row-major arrays, the inner most loop is over the last dimension (which is significantly more intuitive in terms of coding)]

  • A (contiguous) list of matrices can be treated just like a 3-tensor in terms of indexing (ls[i][j,k] == A[i,j,k], but for column major ls[i][j,k] == A[j,k,i])

  • LAPACK/BLAS and the like are designed for both row major or column major (with a simple wrapper, you don't even have to worry about transposition/optimizations)

  • vectors and (contiguous) lists are the same - as has been judiciously discussed in the Julia forums, dealing with vectors correctly is complicated in part because different fields think about them in different ways. From a "learning to program" perspective however, you will encounter lists, and you will encounter vectors - both are exactly the same in row-major, but in column major a vector is treated like a column, but a list is not (granted this is more an educational benefit, than an actual one, but education is important for the language to grow).

Honestly, as a seasoned python programmer hungry for more performance without sacrificing convenience, I want Julia to be the future. But I can't see it happening before someone implements a powerful (numpy levels of power and comfort) library in Julia that uses row-major arrays.

With the rather unorthodox (albeit superior) scoping and the (frankly religious) care taken with where and how exactly the program state is modified, Julia has already established that it is not afraid of making a clean language, even at the cost adding a few hurdles for programmers coming from more traditional (object-oriented or functional) languages.

Clearly, Julia is willing to rethink many expectations of traditional languages, so why then would it use column-major arrays? Is there some great benefit I'm not seeing? Was it just a most unfortunate coin toss that the designers were more comfortable in MatLab/Fortran than Python/C?

Edit:

While working through some examples in the threads below, I can share a clearer way of thinking about the problem:

Row major: the fastest changing dimension is the last one (usually called the "column"). Therefore you start by iterating over the first index (usually called "row", or, for higher orders "batch", "depth", etc).

Column major: the fastest changing dimension is the first one (usually called the "row"). Therefore, you start by iterating over the last index (usually called "column", or, for higher orders "batch", "depth", etc).

Both these definitions follow the convention that M_{ij} is the element in the ith row and jth column, the only difference is in the order in which we iterate over the matrix (because the memory layout is different). Here column major would have us iterating over the last indices first, while row major works best when iterating over the first indices first (which makes more sense).

To illustrate how using row major can clean up code (using pseudo Julia syntax), which option is better (imagine we have a 4-tensor corresponding to B batches of T trajectories of M steps each of an N dimensional signal)?

# option A
batches = rand(B,T,M,N) # row major
for batch in batches
    for traj in batch
        for signal in traj
            do_something(signal)

# option B
batches = rand(N,M,T,B) # column major
for i in size(batches,4) # Note the reverse order of the loops
    for j in size(batches,3)
        for k in size(batches,2)
            do_something(batches[:,k,j,i]) # and the reverse order of the indices

The point here is that any batched operation (which is essentially all of linear algebra) can be cleaned up using row major indexing which makes use of the structure of the data, rather than just treating it like an atomic block of values. That's not to say it's impossible to be consistent with both column major and row major, it's just row major makes it easier to read and understand the code, and is more consistent with the way we talk/write (leading to fewer indexing errors).


r/Julia • • Nov 23 '25

Building Standalone Julia Binaries: A Complete Guide

Thumbnail
joel.id
25 Upvotes

This blog post provides a detailed guide to building standalone binaries with Julia, e.g. for microcontrollers and embedded.

I used ChatGPT and Claude to modify to the stock version of StaticCompiler.jl and bring it up to Julia 1.12.

I didn't write a single line of code but carefully shepherded the project to completion.


r/Julia • • Oct 04 '25

looking for thing to do

0 Upvotes

hi i need a julia open source project or team developers to join to


r/Julia • • May 17 '20

Make game

0 Upvotes

Hi guys, can you give me some tips on how can i make simple platform game in julia. Thanks in advance.


r/Julia • • Feb 05 '16

Julia's "ecosystem" is a superfund

Thumbnail ironholds.org
1 Upvotes

r/Julia • • Jul 16 '20

How to correctly do this histogram? I want dates in the x-axis and frequency in the y-axis but the graph is using the int value if the DateTime in the x and the DateTime in the y. Thanks.

Thumbnail
imgur.com
0 Upvotes

r/Julia • • Jul 22 '21

Julia nested array comprehension being more than 2X SLOWER than Python's nested list comprehension counterpart. Tips on how to optimize/speed this up?

6 Upvotes

So I have a 3D function that I want to make a contour/surface plot of originally in Python, which involves the Gauss error function:

from numpy import *
from scipy.integrate import quad
dps = 301 #number of data points
x = linspace(0, 3, dps)
t = linspace(1, 2.592e7, dps)
Ti, Ts, alpha = 12, -15, 0.138e-6
def T(x,t):
    erf = lambda x: quad(lambda u: exp(-u**2), 0, x)[0]
    expr = Ts + (Ti-Ts)*2/sqrt(pi)*erf( x / ( 2*sqrt(alpha*t) ) )
    return expr
z = array([ [ T(i,j) for i in x ] for j in t ])

Because of the error function where the independent variable is the upper bound of the integral, I am forced to use a nested list comprehension to generate my z values as shown from above and this is where the problem starts. I would like to have a dense contour/surface plot, with the number of data points being at least 1001, but I realized that the reason why Python is being slow with this even if I just gave it 301 points is because the number of iterations being performed is the number of data points squared. 301 points mean 90601 iterations and 1001 data points mean 1002001 iterations, well over a million already!

I tried speeding this up with numba, but the resulting function after applying njit() doesn't perform any better than standard Python so I decided to try this in Julia:

using PyCall
si = pyimport("scipy.integrate")
dps = 301 #number of data points
x = LinRange(0, 3, dps)
t = LinRange(1, 2.592e7, dps)
Ti, Ts, alpha = 12, -15, 0.138e-6
function T(x,t):
    erf = x-> si.quad(u->exp(-u^2), 0, x)[1]
    expr = Ts + (Ti-Ts)*2/sqrt(pi)*erf( x / ( 2*sqrt(alpha*t) ) )
    return expr
z = [ T(i,j) for i=x, j=t ]

The resulting performance is palpably worse in Julia than in Python. For dps = 301, the execution speed in Python as timed with %time z = array([ [ T(i,j) for i in x ] for j in t ]) is 7.5-8 seconds while Julia's execution speed as timed with:

 @time begin
z = [ T(i,j) for i=x, j=t ]
end;

is 18-20 seconds. This is the case even if I broadcast the function with T.(x,t') .

Could this be because I'm using scipy's quad function that makes it so slow? I expected Julia to be faster especially because the documentation for Julia says that we don't need to vectorize our code to make it fast. When I have a normal Julia function like f(x,y) = x*log(y+1) and I evaluate and time it over a meshgrid of points using Julia's broadcast mechanism as in the following:

x = LinRange(-10, 10, 1001)
y = LinRange(0, 10,1001)
@time begin
f.(x,y')
end

the execution speeds after compilation is at most 7 milliseconds.

Edit:

  1. Replacing SciPy's quad function with quadgk from from QuadGK.jl already makes the code way faster and more bearable. It takes around 3 seconds to generate the z values for 2001 data points with this change, in contrast in Python it can barely manage 1001 data points.

  2. In addition to what the others suggested about using SpecialFunctions.jl's erf function, it actually turns out that, upon google-searching, there is also an erf function from SciPy in scipy.special that is able to take input arrays (Python's math also has an erf function, but it can't take arrays as input). So that makes either quad or quadgk not needed anymore and I actually could feasibly and easily make dense contour/surface plots for this problem even in Python.


r/Julia • • Jun 14 '25

The Untapped Potential: Why Isn't Julia Language Leading AI Agent Development?

0 Upvotes

As AI agents become increasingly ubiquitous across industries—from autonomous trading systems to intelligent automation in healthcare—I can't help but wonder why Julia isn't getting more attention in this space.

Julia's Computational Superpowers

For those unfamiliar, Julia was specifically designed to solve the "two-language problem" in scientific computing. It delivers:

  • Near-C performance with Python-like syntax

  • Native parallel computing capabilities

  • Exceptional numerical precision for complex mathematical operations

  • Seamless integration with existing C/Fortran libraries

  • Built-in GPU acceleration support

The AI Agent Revolution

We're witnessing an explosion in AI agent applications:

  • Autonomous financial trading bots processing millions of transactions

  • Real-time decision-making systems in manufacturing

  • Multi-agent reinforcement learning environments

  • Large-scale distributed AI systems

These applications demand exactly what Julia excels at: high-performance computing with mathematical precision.

The Puzzling Gap

Despite Julia's clear advantages for computationally intensive AI workloads, the ecosystem seems dominated by Python/PyTorch and JavaScript/Node.js frameworks. Sure, Python has the ML library ecosystem, but when your AI agent needs to process massive datasets in real-time or run complex simulations, wouldn't Julia's performance benefits be worth the trade-off?

Questions for the Community

  • Are there any notable Julia-based AI agent frameworks I'm missing?

  • What's preventing wider adoption—is it just the ecosystem maturity?

  • Has anyone successfully deployed Julia-based agents in production?

  • Could Julia be the secret weapon for the next generation of high-performance AI agents?

I'd love to hear from anyone working on AI agents, especially if you've experimented with Julia or have thoughts on why it hasn't gained more traction in this domain.

TL;DR: Julia seems perfectly suited for high-performance AI agents, but the development community appears to be sleeping on it. What gives?


r/Julia • • Apr 11 '21

Hello everyone I’m new to programming and i want to use julia in vs code and i saw my teacher’s computer it was written here julia so can anyone tells me how i can use julia in terminal so i can write

Post image
0 Upvotes

r/Julia • • Oct 24 '24

TidierPlots.jl plots are ugly: what to do?

0 Upvotes

I spent considerable time to learn TidierPlots.jl but the experience is not fun. This is in sharp contrast to "Franklin.jl" that I cannot praise enough for making the "starting out" phase as fun as possible.

Is there any way to make plots in general nicer? Staring with the bar graph from below?

using TidierPlots
using DataFrames
using PalmerPenguins

penguins = dropmissing(DataFrame(PalmerPenguins.load()))

ggplot(data = penguins) + 
    geom_bar(@aes(x = species)) +
    labs(x = "Species")

r/Julia • • Feb 18 '25

A Tragedy of Julia’s Type System

Thumbnail
medium.com
0 Upvotes

r/Julia • • Jan 20 '25

what i wish for: an AI agent that just converts Matlab code to Julia

3 Upvotes

Let me know when you get it done. I want all the engineering students to see that they don't need Matlab anymore.


r/Julia • • Jun 11 '21

How can i convert from MATLAB to JULIA? Help Please

0 Upvotes

https://lakras.github.io/matlab-to-julia/

The above site isn't working


r/Julia • • Sep 14 '26

Give AI access to VS Code Julia Terminal

0 Upvotes

I want to give VS Code AI Agent access to VS Code Julia Terminal.

And created VS Code extension that patches standard Julia VS Code extension https://github.com/al6x/julia-bridge

Ideally something like that should be part of standard Julia VS Code extension.

Ideas to improve/simplify welcomed.

P.S.

Also here's AI instructions how to use it

Don't run Julia unless explicitly asked, and never start a fresh process. Use static inspection by default. When asked,
run `/projects/julia-bridge/client.js --timeout 120 'code'` from the project root. It uses the existing VS Code REPL,
returns JSON, and interrupts Julia on timeout or Ctrl-C.


For nontrivial work, replace the body of `AgentEval.run()` in `./AgentEval.jl`, then evaluate
`import AgentEval; agent_result = Base.invokelatest(AgentEval.run)`. Revise reloads it before each request. After
changing `const` or `struct` definitions, explicitly run `Revise.revise(AgentEval)`. Return compact values, preferably
named tuples, and use files for large output. Use plain code and
don't use `eval` to monkey-patch package methods.

r/Julia • • Aug 08 '23

Skill assessment on LinkedIn

1 Upvotes

I love Julia but I don't consider myself proficient enough to propose a LinkedIn assessment to evaluate skills. Would you please guys do it.


r/Julia • • Dec 31 '22

The do’s and don’ts of Julia programming — Tips for writing efficient & maintainable Julia code

Thumbnail
juliazoid.com
13 Upvotes

r/Julia • • Aug 04 '25

The al‑ULS repository provides an intriguing combination of neural‑network training with a Julia‑based optimization backend. It illustrates how to implement teacher‑assisted learning where an external mathematical engine monitors stability and entropy and suggests adjustments.

0 Upvotes

I'm a big dumb jerk and I'm sorry for upsetting you all, I'll throw it away and go to college, but in ten years I'm gonna put it back


r/Julia • • Mar 24 '14

Embedded print Statements != Debugging (or "why Julia needs a true debugger")

Thumbnail
drdobbs.com
0 Upvotes

r/Julia • • Sep 04 '20

Tell me if I'd hate Julia

0 Upvotes

Hi all,

I'm a research scientist with a large existing MatLab codebase. I'm curious about Julia, but my biggest worry is that if I tried to use Julia that parts of my codebase would be difficult to replicate without bringing in a ton of third party packages. What's nice about MatLab is that with all the relevant toolboxes, just about everything I need to do is doable in native. So what I'd like to know is, how much work would it take to do the following in Julia?

  1. Insert / update / query a Postgres database

  2. Serialize arbitrary arrays / objects to store as blobs (bytea postgres type) in database (e.g. in MatLab I can take a table or struct or what have you and convert it to a int8 vector to store in the db)

  3. Tables - I make extensive use of MatLab's "table" data type. Is there a convenient equivalent data structure in Julia?

  4. Graphs - I deal with a lot of graph data. Does Julia have native support for graphs, including basic graph theoretic algorithms for finding minimum spanning trees, etc., as well as graph visualization tools?

  5. IDE - Is there an IDE for Julia that does more or less the same basic things as the MatLab IDE?

  6. Basic statistics - rank-sum, ROC curves, bootstrapping, etc.

Also, as a more general question: Is there a lot of dependency wrangling involved in Julia? What I hate about Python is that if you want to do anything besides "hello world", you have to install 482 different packages from different sources, with documentation in varying states and styles, and some of them inevitably have conflicting dependencies, or they're special snowflakes that need their own dedicated environment, or some shit. It's ALWAYS SOMETHING with Python. Am I going to hate Julia?