3 ms·
If I am going to write it in C then what in the world am I using Julia for?
by pekk 13y ago
If I am going to write it in C then what in the world am I using Julia for?
- idunning 13y agoExactly - the C interop is used almost exclusively for connecting to existing libraries.
- ermintrude 13y agoCan you also call C++ libraries directly from Julia?
- 3JPLW 13y agoName mangling, as always, is a mess. If they export extern "C" headers, then of course there's no trouble. There's work on interfacing with the C++ ABI, though. See Cpp.jl[0] and Clang.jl (whose C++ support is still a WIP)[1]. [0]. https://github.com/timholy/Cpp.jl https://github.com/timholy/Cpp.jl [1]. https://github.com/ihnorton/Clang.jl/issues/20 https://github.com/ihnorton/Clang.jl/issues/20
- dagw 13y agoData IO, formatting, pre and post processing and presentation. My standard approach is to use python to read in all my data, parse it, format it and beat it into the shape I want. Then, if I need the performance, I pass the data to a highly tuned C function for slowest number crunching parts. Then I take the data back from C and parse it, format it, summarize it and write it out to the file formats I want using python. C may be faster for number crunching, but python is much nicer for data handling, and there the performance difference is negligible.