News for hackers. Stuff that matters.
Re:Potential of the Julia programming language for high ener... by fnands on Monday December 04, 2023 @07:42AM (#38516558)
Cool! Writing math-heavy code in Julia is such a pleasure. C++ is a pain, numpy is alright but Julia just makes sense. I really wish I could use it for my day-job.

Back when I was on ATLAS we mostly did things in C++. If I never have to do another matrix multiplication in C++ again it will be too soon.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @08:04AM (#38516734)
C++ is pain, numpy is pain if you need a loop, numba and cython are pain if you need any more complex data structures.

Sadly Julia is pain too if you don't do REPL/notebook (which you shouldn't). Julia has the design to solve the two language problem but not the implementation. And will probably never have because Julia community refuses to see this as a problem.

Re:Potential of the Julia programming language for high ener... by qsort on Monday December 04, 2023 @08:42AM (#38517074)
I'm starting to think that the two language problem is not really solvable at the language level. Maybe it is, but there's a significant friction.

High level naturally pushes you towards abstract types, GC, not caring about allocation, do what I mean not what I said.

Low level naturally pushes you towards concrete types, deterministic mallocs, do what I said not what I mean.

e.g. do I want integers like Python or integers like C? Yes.

Re:Potential of the Julia programming language for high ener... by bmitc on Monday December 04, 2023 @08:45AM (#38517102)
I feel F# is a pretty good candidate. One can get pretty down and dirty with low-level CLR stuff or unmanaged code, but then you have a very nice high-level language.
Re:Potential of the Julia programming language for high ener... by soulbadguy on Monday December 04, 2023 @11:55AM (#38519693)
+1 on F#, one of the most underrated language around.
Re:Potential of the Julia programming language for high ener... by agumonkey on Monday December 04, 2023 @02:24PM (#38521850)
It's so odd how it's been probably a decade of "F# is underrated" but nothing makes it shine to the eyes of the market .. really strange
Re:Potential of the Julia programming language for high ener... by bmitc on Monday December 04, 2023 @07:47PM (#38525566)
It's really more of a result of human sentiment than anything. F# is underrated and underappreciated, and it just doesn't have a critical mass of people developing libraries for it. The issues to its adoption were being associated with .NET (Windows-only at the time) and Microsoft and being sold as a C# alternative rather than its own thing and an alternative to other languages like Python.

An interesting thought experiment is to think if someone was to release F# today as a new language but calling it something else, like Flosure or something. I bet people would lose their minds over it.

Re:Potential of the Julia programming language for high ener... by blendo on Tuesday December 05, 2023 @02:07AM (#38527916)
I’ve always thought Microsoft should embed it into Excel as a coequal language to VBA.

Finance programmers would go nuts!

Re:Potential of the Julia programming language for high ener... by agumonkey on Tuesday December 05, 2023 @12:18PM (#38533815)
True, and it may even attract R users since it seems functional in its core.

MS did include lambdas as a primitive but also decided to use python as new formula language.

Re:Potential of the Julia programming language for high ener... by soulbadguy on Tuesday December 05, 2023 @01:43PM (#38535163)
Yeah it would have been great for finance, and the ocaml and ml langauge seems to be popular in some HFT firms.

Saddly i think even this boat has sailed since they added python to Excel now. A true miss opportunity.

Re:Potential of the Julia programming language for high ener... by jampekka on Tuesday December 05, 2023 @03:46AM (#38528396)
Running on CLR and coming from Mordor are the prime reasons I won't even evaluate it. Not sure how prevalent or fair this is, but at least for N=1 makes it not shine.
Re:Potential of the Julia programming language for high ener... by soulbadguy on Tuesday December 05, 2023 @01:45PM (#38535187)
As much as i love the CLR on technical level (as opposed to the JVM), and feel like Oracle is a much worst devil than MSFT. I completely understand the sentiment, msft have consistently done some very anti-community/open-source move with their open source offering.
Re:Potential of the Julia programming language for high ener... by jampekka on Tuesday December 05, 2023 @07:49PM (#38539089)
Yep. Much of this is sentimental. I associate Java with Sun, which doesn't have the same aura of evil as MSFT or Oracle. Thus I hate Java mostly based on its technical merits and the thousands of hours I've wasted with it.

While this is sentimental, as in it can't be exhaustively explained by logic and known facts, I still think it's somewhat rational. Fool me once etc.

The newer generations probably don't really grasp what MSFT pulled on OSS, developers and computing in general to make it the monopoly it is. It's possible that it has changed course, but I'll probably never trust it has.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @08:53AM (#38517180)
Javascript is not that far from solving the two language problem. In fact v8/spidermonkey speed is very acceptable for most number crunching. And Javascript isn't even very friendly for high performance but The JITs are miraculous. Sadly Javascript as language nor its "ecosystem" are very suitable for data-analysis like use.

I want integers like Python that are as fast as integers like C. I don't care how they are allocated or deallocated. Javascript comes very close even without having integers at all.

Probably nobody expects to squeeze every last cycle with a higher level language. I'd say getting consistently within magnitude of C performance can be said to have solved the two-language problem. GC pauses etc are perfectly acceptable for e.g. data analysis.

Re:Potential of the Julia programming language for high ener... by staunton on Monday December 04, 2023 @11:59AM (#38519748)
Let's see how you do those high energy physics simulations with JS...
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @12:27PM (#38520151)
Why would I do that?

Although I wouldn't be surprised them being faster than ROOT with e.g. asm.js.

Re:Potential of the Julia programming language for high ener... by elashri on Monday December 04, 2023 @04:18PM (#38523231)
In some cases yes that will be true. But good luck having the inertia to replace ROOT in general (by anything). While many people hate ROOT (I do and feel the pain daily) it is highly tailored optimized piece that will take decades to try to implement something like it. And I doubt you would be able to handle low-level tasks like optimizing memory footprint needed for HEP applications when running stuff in online world (while collecting data).

JS+ASM greatest advantage is cross-platform which is one of the least features requested in the field. i.e No one expect you to be able to run your analysis code on windows.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @05:16PM (#38523945)
I wasn't proposing ROOT to be reimplemented in JS. That was what the GP attributed to me.

My point is that JS is really fast for some things, at least compared to what some people's impressions seem to be. Even though it's very optimization unfriendly in its semantics. And that this hints that the two language problem is indeed solvable for analysis at least.

"Laypeople" may also think that code is optimized to the last cycle in something like HEP simulations. It's made fast enough and the optimization is nowhere near the level of e.g. graphics heavy games.

Real-time usage like high frequency large data collection will probably never happen on the "single language". But I'd guess ROOT is not used at that level either? Also at least last time I checked, ROOT is moving to Python (probably not for the hottest loops of the simulation though).

(Off-topic: C++ interpretation like done in ROOT seems like a really bad idea.)

Re:Potential of the Julia programming language for high ener... by elashri on Monday December 04, 2023 @06:19PM (#38524623)
> I wasn't proposing ROOT to be reimplemented in JS. That was what the GP attributed to me.

Sorry for assuming that. I really felt the pain of thinking of possibility of combining two things I hate so much together (JS+ROOT)

> "Laypeople" may also think that code is optimized to the last cycle in something like HEP simulations. It's made fast enough and the optimization is nowhere near the level of e.g. graphics heavy games.

I understand that in other areas there might be more sophisticated optimizations, but does not change things much inside HEP field community. And it is not optimized only for simulations but for other things too. It is not one problem optimization.

> Real-time usage like high frequency large data collection will probably never happen on the "single language". But I'd guess ROOT is not used at that level either? Also at least last time I checked, ROOT is moving to Python (probably not for the hottest loops of the simulation though).

I did not mean to indicate that ROOT is being used to handle the online processing (In HEP terms). It is usually handled via optimized C++ compiled code. My idea is that you will probably never use JS or any interpreted language (or anything other than C++ to be pessimistic) for that. ROOT at the end of the day is much closer to C++ than anything else. So learning curve wouldn't be that much if you come with some C++ knowledge initially.

> Also at least last time I checked, ROOT is moving to Python (probably not for the hottest loops of the simulation though).

I think you mean PyROOT [1]? This is the official python ROOT interface It provides a set of Python bindings to the ROOT C++ libraries, allowing Python scripts to interact directly with ROOT classes and methods as if they were native Python. But that does not represent and re-writing. It makes things easier for end users who are doing analysis though, while be efficient in terms of performance, especially for operations that are heavily optimized in ROOT.

There is also uproot [2] which is a purely Python-based reader and writer of ROOT files. It is not a part of the official ROOT project and does not depend on the ROOT libraries. Instead, uproot re-implements the I/O functionalities of ROOT in Python. However, it does not provide an interface to the full range of ROOT functionalities. It is particularly useful for integrating ROOT data into a Python-based data analysis pipeline, where libraries like NumPy, SciPy, Matplotlib, and Pandas ..etc are used.

> Off-topic: C++ interpretation like done in ROOT seems like a really bad idea.)

I will agree with you. But to be fair the purpose of ROOT is interactive data analysis but over the decades a lot of things gets added, and many experiments had their own soft forks and things started to get very messy quickly. So that there is no much inertia to fix problems and introduce improvements.

[1] https://root.cern/manual/python/

[2] https://github.com/scikit-hep/uproot5

Re:Potential of the Julia programming language for high ener... by pjmlp on Tuesday December 05, 2023 @08:01AM (#38530172)
While I was at CERN in 2003 - 2004, that was exactly what some people where doing on their Windows computers.

The alternative being OS X, or maybe Solaris, if one was in a building that still had a couple of pizza boxes that weren't yet on the throw away pile.

Re:Potential of the Julia programming language for high ener... by markkitti on Monday December 04, 2023 @09:20AM (#38517541)
Via Pluto.jl notebooks, I have been able explore the Julia-JavaScript interface. It's quite fun using JavaScript and SVG to interactively render the accelerated BLAS and FFTW outputs from Julia.
Re:Potential of the Julia programming language for high ener... by jjoonathan on Monday December 04, 2023 @12:08PM (#38519891)
Ooh, interesting!

Jupyter got rid of their direct javascript interface for security reasons that I don't agree with. Does Pluto.jl have a model where trusting display code is as easy as trusting the code being run?

Re:Potential of the Julia programming language for high ener... by th0ma5 on Monday December 04, 2023 @02:51PM (#38522229)
I sincerely agree with your comments so much. People that don't live with code don't see this and have weird romantic ideas of what it is and what it does. Mixing levels of abstraction has never made much sense (ultimately) to me.
Re:Potential of the Julia programming language for high ener... by markkitti on Thursday December 07, 2023 @03:54PM (#38561694)
> do I want integers like Python or integers like C? Yes.

Julia has BigInt and Cint. Maybe there could be a more Pythonic implementation that scales between machine types and BigInt. That would not be hard to implement in Julia. I just have not found a good use case.

What I like about Julia is that I can do both the high level and low level in Julia. Abstract code becomes concrete due to late binding.

You can access Libc.malloc and Libc.free if needed. See GPUCompiler.jl

The effect system exists. If you can prove no side effects, eager finalization is also possible. That is the finalizer and deallocation will run deterministically. It's new though so effect analysis is a mostly manual affair at the moment.

Re:Potential of the Julia programming language for high ener... by cosmic_quanta on Monday December 04, 2023 @08:05AM (#38516752)
What's the two language problem? One language for a high level interface and one language for low level, high performance computations?
Re:Potential of the Julia programming language for high ener... by adgjlsfhk1 on Monday December 04, 2023 @08:26AM (#38516920)
exactly
Re:Potential of the Julia programming language for high ener... by Rarebox on Monday December 04, 2023 @09:01AM (#38517280)
https://yuri.is/not-julia/ is a good write-up of one person's opinion on the problems of Julia. I'm much less experienced with Julia but I somewhat agree. There's too much focus on "magic" instead of correctness for me to try building serious software using Julia. An amazing language in many aspects though.
Re:Potential of the Julia programming language for high ener... by roflmaostc on Monday December 04, 2023 @09:03AM (#38517307)
Some of the response in the Julia community: https://discourse.julialang.org/t/discussion-on-why-i-no-lon...
Re:Potential of the Julia programming language for high ener... by roflmaostc on Monday December 04, 2023 @09:02AM (#38517291)
>Sadly Julia is pain too if you don't do REPL/notebook (which you shouldn't)

Can you be more precise on this? In my case, I do a lot work around visual outputs (such as images). So notebook based development (such as Pluto.jl) feels perfectly fine.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @09:30AM (#38517692)
> Can you be more precise on this?

Usage where you don't keep the Julia process running. E.g. "$ julia stuff.jl" form a shell.

Re:Potential of the Julia programming language for high ener... by amj7e on Monday December 04, 2023 @09:37AM (#38517772)
Yes, this has been discussed a lot recently in the Julia community and some efforts have been made to make it happen, there will be more about this in the 1.11 release. Standalone binaries are next.
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @10:11AM (#38518212)
If this is fixed, I'll probably switch from Python to Julia. As a language Julia is vastly superior to Python. The complaint was dismissed for so long (and is still dismissed e.g. here in HN discussions) I gave up hope it will be fixed, but I'd be ecstatic to be proven wrong.

Do standalone binaries here include shared libraries (with a C ABI)? That would be a dream.

Re:Potential of the Julia programming language for high ener... by amj7e on Monday December 04, 2023 @10:32AM (#38518494)
The one you need is this which is already merged but was after the 1.10 feature freeze so it has to wait till 1.11, though you can test it with nightly builds which is available on julialang site: https://github.com/JuliaLang/julia/pull/51435

Unfortunately, the core devs are not too chatty about standalone binaries, because of how Julia's internals are set there are going to be a lot of unforeseen challenges, so they are not trying to promise how things will be rather let's wait and see how things will turnout. Since packagecompiler.jl already has C ABI and one goal discussed about binaries being easily callable from other languages and vice versa, I would bet that it will have shared libraries.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @11:18AM (#38519135)
> The one you need is this which is already merged but was after the 1.10 feature freeze so it has to wait till 1.11, though you can test it with nightly builds which is available on julialang site: https://github.com/JuliaLang/julia/pull/51435

The discussion seems to be too deep in Julia internals for me to follow. Is this about startup time or defining an entry point (or both?). I haven't had problems with Julia entrypoints (yet at least).

With the nightly `./julia-f7618602d4/bin/julia -e "using DynamicalSystems"` still takes over 5 seconds. Can I somehow define a main to make this faster or precompile more efficiently?

> Since packagecompiler.jl already has C ABI and one goal discussed about binaries being easily callable from other languages and vice versa, I would bet that it will have shared libraries.

Sounds promising. Shared libraries are not a musthave for me, but could allow Julia save us from C++ in more cases.

Re:Potential of the Julia programming language for high ener... by amj7e on Monday December 04, 2023 @12:26PM (#38520134)
Thats for an entry point, you can search `Base.@main` to see a little summary of it. Later it will be able to be callable with `juliax` and `juliac` i.e. `~juliax test.jl` in shell.

DynamicalSystems looks like a heavy project. I don't think you can do much more on your own. There have been recent features in 1.10 that lets you just use the portion you need (just a weak dependency), and there is precompiletools.jl but these are on your side.

You can also look into https://github.com/dmolina/DaemonMode.jl for running a Julia process in the background and do your stuff in the shell without startup time until the standalone binaries are there.

Re:Potential of the Julia programming language for high ener... by lukego on Monday December 04, 2023 @11:47AM (#38519572)
The half-life of major Julia problems is impressively short.

Compiler latency ("time to first plot") used to be miserable but after a few releases with incremental improvements it feels mostly solved to me.

Just now on Friday at JuliaCon Local in Eindhoven one of the keynotes was about similar ongoing work on stand-alone binaries (including shared libraries to call like C/Fortran.)

Re:Potential of the Julia programming language for high ener... by amj7e on Monday December 04, 2023 @12:45PM (#38520375)
Uh man, there aren't Eindhoven videos online. What was the tdlr. ?
Re:Potential of the Julia programming language for high ener... by markkitti on Thursday December 07, 2023 @08:48AM (#38556210)
You can create a shared library via PackageCompiler.jl today and `@cfunction`. It's just not as modular as it could be.

https://julialang.github.io/PackageCompiler.jl/stable/libs.h...

Re:Potential of the Julia programming language for high ener... by markkitti on Monday December 04, 2023 @09:16AM (#38517485)
I thought that notebook based development and package based development were diametrically opposed in the past, but Pluto.jl notebooks have changed my mind about this.

A Pluto.jl notebook is a human readable Julia source file. The Pluto.jl package is itself developed via Pluto.jl notebooks.

https://github.com/fonsp/Pluto.jl

Also, the VSCode Julia plugin tooling has really expanded in functionality and usability for me in the past year. The integrated debugging took some work to setup, but is fast enough to drop into a local frame.

https://code.visualstudio.com/docs/languages/julia

Julia is the first language I have achieved full life cycle integration between exploratory code to sharable package. It even runs quite well on my Android. 2023 is the first year I was able to solve a differential equation or render a 3D surface from a calculated mesh with the hardware in my pocket.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @09:29AM (#38517669)
Pluto.jl does solve the state problem of notebooks, which is the biggest problem in them. Probably should give it another go.

How is the module reloading story nowadays? Last time I gave up the state of the art was Revise.jl, which was a world of pain.

Re:Potential of the Julia programming language for high ener... by staunton on Monday December 04, 2023 @11:56AM (#38519713)
> Pluto.jl does solve the state problem of notebooks

Yes it does, unless you do crazy stuff (which you probably should put in a Julia file and let it precompile). The order of cells and execution order does not matter (unless you do crazy stuff).

Re:Potential of the Julia programming language for high ener... by markkitti on Tuesday December 05, 2023 @04:25AM (#38528613)
A Pluto.jl notebook is also a regular file. You need to use a package for precompilation caching though.
Re:Potential of the Julia programming language for high ener... by tamasgal on Monday December 04, 2023 @12:53PM (#38520505)
I have no idea what kind of problems you have ;) I use Revise.jl on a daily basis and it works flawlessly. I don't have any comparable workflow in any other language I work with on a daily basis. I wish I could do this style in those as well...

Yes, you should give it a go (again)!

Re:Potential of the Julia programming language for high ener... by staunton on Monday December 04, 2023 @10:34PM (#38526797)
I'm not sure how Revise would work with a notebook though... Guess it's only useful in the REPL, which is a different way to work.
Re:Potential of the Julia programming language for high ener... by bobbylarrybobby on Monday December 04, 2023 @11:03PM (#38526964)
In VSCode, in an ordinary Julia file you can place the magic comments `# %%` at the start of a code cell (needs to be on its own line), and then you can send these “cells” to the REPL to execute. No notebook needed.
Re:Potential of the Julia programming language for high ener... by staunton on Tuesday December 05, 2023 @12:01AM (#38527300)
What do you do with it? Especially that benefits from Revise?
Re:Potential of the Julia programming language for high ener... by jampekka on Tuesday December 05, 2023 @10:33AM (#38532164)
Re:Potential of the Julia programming language for high ener... by Archit3ch on Monday December 04, 2023 @09:40AM (#38517829)
> It even runs quite well on my Android. 2023 is the first year I was able to solve a differential equation or render a 3D surface from a calculated mesh with the hardware in my pocket.

Is that via webassembly or... ?

Re:Potential of the Julia programming language for high ener... by markkitti on Tuesday December 05, 2023 @04:34AM (#38528658)
No. Julia runs natively on ARM.

  julia> versioninfo() 
                                                 
  Julia Version 1.9.3                                                   
  Commit bed2cd540a1 (2023-08-24 14:43 UTC)                             
  Build Info:                                                             
  Official https://julialang.org/ release
  Platform Info:                                                          
  OS: Linux (aarch64-linux-gnu)                                         
  CPU: 6 × Cortex-A55                                                   
  WORD_SIZE: 64                                                         
  LIBM: libopenlibm                                                     
  LLVM: libLLVM-14.0.6 (ORCJIT, cortex-a55)                             
  Threads: 1 on 8 virtual cores
Re:Potential of the Julia programming language for high ener... by uoaei on Monday December 04, 2023 @01:10PM (#38520728)
Would you expand on how you are running Julia on Android?
Re:Potential of the Julia programming language for high ener... by markkitti on Tuesday December 05, 2023 @04:27AM (#38528627)
Re:Potential of the Julia programming language for high ener... by tempodox on Monday December 04, 2023 @11:47AM (#38519575)
The maintainers seem to have a very narrow focus on what they think their target audience is and everything outside of that gets ignored.
Re:Potential of the Julia programming language for high ener... by soulbadguy on Monday December 04, 2023 @12:27PM (#38520155)
I think the julia team is still relatively small. So it might be was they have to do to make meaningful progress?
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @12:34PM (#38520248)
Julia's window has probably passed. Pytorch, JAX, Numba etc are eating its lunch. Which is sad because they are all pretty hacky stuff compared to what Julia could be.
Re:Potential of the Julia programming language for high ener... by soulbadguy on Monday December 04, 2023 @12:56PM (#38520549)
Sadly i think you maybe right. With support of one the big 3 (meta,google or MSFT),it will be hard for Julia to create and sustain significant mind share. Wich is really a shame because from technical design standpoint Julia is just brilliant.

Adding to that modular mojo, and i think we might have a repeat of DART vs typescript...

Re:Potential of the Julia programming language for high ener... by agumonkey on Monday December 04, 2023 @02:29PM (#38521925)
As much as I love proper foundation and language design, people must accept a certain dose of realism, 80/20 approach.
Re:Potential of the Julia programming language for high ener... by uoaei on Monday December 04, 2023 @01:12PM (#38520756)
JAX is the least hacky of them and my personal favorite, but ultimately I have to agree. I'm a huge Julia stan but they simply don't have the institutional support that Meta and Google can provide.
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @03:12PM (#38522429)
Also a lot of people left early on because their concerns and use cases were dismissed as "holding it wrong". Thus what's left of Julia audience is just the one they catered for.

The big selling point from the getgo was that Julia is general purpose. It's now over 10 years and it's still about as general purpose as MATLAB (although on a totally different level design-wise).

A big smell from the getgo was 1-based indexing. I appreciate that it's more familiar from some branches of math and physics (and MATLAB), and it's something I could live with, but more or less all general purpose languages index from zero. And there's a good reason for that. And that makes interoperability trickier.

https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...

Re:Potential of the Julia programming language for high ener... by bobbylarrybobby on Monday December 04, 2023 @11:08PM (#38526987)
Julia doesn't even have upper-exclusive ranges — `0:0` has length 1. (The length-0 sequence starting at 0 is, naturally, `0:-1`.) It fails on both counts!
Re:Potential of the Julia programming language for high ener... by kelipso on Tuesday December 05, 2023 @08:52PM (#38539587)
Lol sorry but if you read it, Dijkstra's argument for 0-based indexing is literally that it looks prettier... I really wonder if anyone who has posted that link ever read the actual argument and thought about it critically.
Re:Potential of the Julia programming language for high ener... by jampekka on Thursday December 07, 2023 @03:55AM (#38554348)
He gives various reasons and practical examples for it.
Re:Potential of the Julia programming language for high ener... by kelipso on Saturday December 09, 2023 @08:40AM (#38581832)
One can give analogous reasons (literally his main reason is it looks nicer lol) and practical examples that looks nicer in 1-based indexing too. It's a terrible argument that somehow got memed over way too long a time. Probably because no one needs to read the text, just post the link and you're done.
Re:Potential of the Julia programming language for high ener... by markkitti on Thursday December 07, 2023 @09:00AM (#38556369)
I honestly do not understand comments like this with regard to an open source project. The language and its libraries are rather hackable as is with rather powerful packages. While I may not agree with every decision, I do not complain that someone is not implementing my favorite feature. I just do it myself.

I frankly would be concerned if the main contributors were not focused.

Re:Potential of the Julia programming language for high ener... by staunton on Monday December 04, 2023 @11:55AM (#38519687)
What's the problem when working without REPL/notebook? The debugger IDE support will be fixed eventually™ (I really think it will.. eventually...). What else is there?
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @12:31PM (#38520204)
Startup speed.
Re:Potential of the Julia programming language for high ener... by staunton on Monday December 04, 2023 @06:52PM (#38525019)
That's getting much better since they started caching compiled code. With more software (and hardware, and synergy-between-them) improvements coming, this will soon no longer be an issue.
Re:Potential of the Julia programming language for high ener... by Joel_Mckay on Monday December 04, 2023 @08:28AM (#38516929)
Julia does have binary executable generation options, but most people only find this out after a few weeks. And yes, one can also call it as a library (.so or .a) from within C/C++ .

Julia is the first unique language I've been excited about in decades, as it can often outperform C, C++, and numpy in several use-cases. The only downside is until the 170MB+ lib is cached by the kernel, it gets panned by BS perf stats due to initial i/o constrained load times on some platforms.

Good luck, and have a great day =)

Re:Potential of the Julia programming language for high ener... by sampo on Monday December 04, 2023 @07:46AM (#38516585)
> C++ is a pain

Fortran would be less painful than C++, for math-heavy code.

Re:Potential of the Julia programming language for high ener... by fnands on Monday December 04, 2023 @03:58PM (#38522936)
Julia code is actually very Fortran-like (if Fortran was designed in the 21st century).

I did some Fortran in undergrad, and while it's pleasant to work with, if you have to do anything beyond numerical calculations you are basically screwed.

Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @06:42PM (#38524880)
Yes, but Fortran is outright hell outside mathy stuff.

C++ has the features as a language to be almost Fortran level pain for math heavy. But the libraries tend to fall short. E.g. Eigen kind of does it, but it will just explode with a thousand line compile error when you least expect it. Also it's missing some quite elemental stuff like ND arrays. And getting code to work across even minor Eigen versions is a crapshoot.

Xtensor seems to have some potential, although it was too buggy to use back when I last tried it.

However, due to many fundamental design mistakes in C++ I'm not really expecting any code, including math heavy, to be very plesant or productive in it.

Re:Potential of the Julia programming language for high ener... by m_mueller on Monday December 04, 2023 @08:29PM (#38525853)
Why would you need Fortran for anything other than math? To put it differently, what’s the problem with just using 2 languages, e.g. Fortran plus Python with f2py?
Re:Potential of the Julia programming language for high ener... by adgjlsfhk1 on Monday December 04, 2023 @11:30PM (#38527108)
Sometimes you want to write fast code for things that aren't purely numerical (e.g. any string processing such as CSV/Arrow/JSON etc) or things that are mostly numerical but benefit from abstractions (like generic algorithms so you can run programs in arbitrary precision or autodifferentiation). Fortran is pretty good for writing 3 loops over a double precision matrix.

Aside from "why not Fortran" the "why not 2 languages" is because moving your implimentation to a language few of your users know creates a big barrier between users and developers of your code. In Python, ~90% of users don't even know the language that the packages they use are written in which makes it a lot harder for them to become contributors. Using a single language means that as users learn how to use libraries they are also learning how to contribute to them in the future.

Re:Potential of the Julia programming language for high ener... by timbaboon on Monday December 04, 2023 @11:42AM (#38519506)
How much of that is down to C++ and how much of it is just ROOT? ;)
Re:Potential of the Julia programming language for high ener... by fnands on Monday December 04, 2023 @12:36PM (#38520268)
Little bit of column A, little bit of column B ;-)