News for hackers. Stuff that matters.
Re:Julia 1.0 by marmaduke on Thursday August 09, 2018 @02:06PM (#17726759)
Numba has user defined types,

https://numba.pydata.org/numba-doc/dev/user/jitclass.html

No one intends to fix Python but it’s straightforward to do things like Numba: use a decorator to read out the AST for a function, reimplement it however you like and pass back the compiled function, and document the semantics.

Re:Julia 1.0 by ChrisRackauckas on Thursday August 09, 2018 @06:33PM (#17729140)
But you have to define the types for them to work. That's exactly the problem and that's what Julia has already solved.
Re:Julia 1.0 by marmaduke on Thursday August 09, 2018 @09:31PM (#17730025)
What are user defined types that don’t require being defined?
Re:Julia 1.0 by ChrisRackauckas on Friday August 10, 2018 @03:58AM (#17731477)
Generic functions in Julia can use types which have no reference to their definition using dependent compilation.

http://www.stochasticlifestyle.com/why-numba-and-cython-are-...

So you can work with types even when you've never seen their definition given how the compilation will occur with all of the pieces together instead of separately.

Re:Julia 1.0 by marmaduke on Friday August 10, 2018 @07:03AM (#17732239)
I usually profit from type definitions during debugging and memory layout work, so perhaps i don’t see this is a feature.
Re:Julia 1.0 by ChrisRackauckas on Friday August 10, 2018 @07:51PM (#17737505)
It's probably us that are using types in a weird way so it's my lack of explanation that's the issue. Types in Julia undergo multiple dispatch, so by passing a type into a generic function you can make the same generic algorithm run in different ways. So I use types to parallelize my code, calculate derivatives, propagate parameter uncertainties, and things like that. This talk from JuliaCon discusses a lot of the things for free that were developed by taking a type from one package and putting it into another:

https://www.youtube.com/watch?v=dmWQtI3DFFo

Re:Julia 1.0 by chappi42 on Thursday August 09, 2018 @02:17PM (#17726885)
thank you