Hacker News new | past | comments | ask | show | jobs | submit login

I've been using Julia 0.3 for algorithmic trading in production for about 3 months now, and the language is truly, astoundingly productive. The only thing lacking for me at this point is true multithreading support (so I can fork off a python thread from within julia) - I currently get around this by using a socket interface to pass messages to python.

Edit: For anyone who's interested, an indicative problem is this: http://stackoverflow.com/questions/21113030/async-thread-dea...




In this case, you could either use the Python multiprocessing module, or start the python listener from another Julia worker as suggested in the SO answer. I just tried the latter and it works fine: you need to do `@everywhere using PyCall`, change the `@async` to `@spawnat 2 begin ...`, and put the `@pyimport` inside the spawnat block). See: https://gist.github.com/ihnorton/2d22639230d4bbe30639

(alternatively, you might be able to use Python's asynccore module to create an asynchronous listener and yield back to Julia)


Thanks, ihnorton. That worked!


There is a threads branch and we expect to have support in 0.4.


This is great news! How do I get this branch from github? And a big thank you for the tremendous work you guys are putting in.


The work can be found here: https://github.com/JuliaLang/julia/tree/threads. This is still pretty rough and experimental, however. It requires a patched LLVM to fix thread-local-storage support in MCJIT and the patch only works on Linux. And the threading API is also far from final. I can't say that I recommend using this yet.


Could you send me an email (see my profile)? I'd be interested in learning a lot more about how you have your system set up - training, testing, databases, hosting. I've had trouble finding a good resource for how to do so.


Sure, sent.


Could you refactor that email as a blog post?


How would you compare this to using python with an easy JIT like numba?


Whenever I have tried to use Numba, I find it is slower than standard python. OTOH, Julia just works. Gives me the same performance as C.


I actually both in terms of speed, and in terms of writing code they are remarkably similar approaches.

numba forces you into certain ways of writing code to achieve significant speed ups, but usually that's not too restrictive.

If you are used to writing numerical python code, you'll feel write at home in Julia - especially with the amazing PyCall module.


I haven't used numba or benchmarked it, so I'm not really qualified to comment. I do however vastly prefer the MATLAB-like syntax of julia to that of python.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: