News for hackers. Stuff that matters.
Re:Julia: Dynamism and Performance Reconciled by Design (2018) by snicker7 on Monday October 26, 2020 @05:29PM (#24901679)
CORRECTION: I am mistaken. See https://docs.python.org/3/library/ctypes.html

Python is a pretty poor glue language, in my experience.

Calling C APIs from Python is not pleasant. This is how one might import the libm "error function" from Julia:

    const libm = "/lib64/libm.so.6"
    erf(x) = @ccall libm.erf(x::Float64)::Float64
Python requires writing/compiling a separate dll written in C (see [^1]). Python extensions are (reasonably) fast, sure. But they are not pleasant at all to write.

[^1]: https://docs.python.org/3/extending/building.html

Re:Julia: Dynamism and Performance Reconciled by Design (2018) by dragonwriter on Monday October 26, 2020 @05:41PM (#24901808)
> Calling C APIs from Python is not pleasant. [...] Python requires writing/compiling a separate dll written in C (see [^1]).

No, it doesn't, see [0] and [1].

[0]: https://docs.python.org/3/library/ctypes.html

[1]: https://cffi.readthedocs.io/en/latest/

Re:Julia: Dynamism and Performance Reconciled by Design (2018) by jhayward on Monday October 26, 2020 @05:40PM (#24901800)
Python has a perfectly useful CFFI. There's no need to write an extension module.
Re:Julia: Dynamism and Performance Reconciled by Design (2018) by orbifold on Tuesday October 27, 2020 @05:12AM (#24905649)
Pybind11 is a dream to work with and there are python packages that implement hot reloading for C++ into a live python session aswell as autogeneration tools for it.