Re:Julia 1.6: what has changed since Julia 1.0?
by saiojd on Sunday February 14, 2021 @01:05PM
(#26134533)
You can't possibly be serious. As things stand, even just redefining a struct field requires restarting the interpreter, which forces you to wait ~10-30 seconds for everything to compile, over and over again. Maybe you only use Julia for small scripts, and can afford to never restart the interpreter?
[ Parent
| on HN ]
Re:Julia 1.6: what has changed since Julia 1.0?
by fishmaster on Sunday February 14, 2021 @01:48PM
(#26134946)
> even just redefining a struct field requires restarting the interpreter
It really doesn't if you use a module.
Re:Julia 1.6: what has changed since Julia 1.0?
by saiojd on Sunday February 14, 2021 @06:11PM
(#26137198)
I mean, I still need to recompile the module no? Or do you split your project into several small modules to avoid this? (I've avoided this so far as I found the module system a bit tedious tbh, as it requires to explicitly list everything you need to export, as well as manually import stuff from the parent module).
Re:Julia 1.6: what has changed since Julia 1.0?
by fishmaster on Monday February 15, 2021 @04:59PM
(#26148055)
Usually as long as I develop I have structs that I change inside a small module, then I can recompile just the module and access the new struct, e.g. for neural networks.
It's not perfect but it's something.
Re:Julia 1.6: what has changed since Julia 1.0?
by saiojd on Tuesday February 16, 2021 @07:46PM
(#26161089)
Useful trick, I'll try that, thanks.
Re:Julia 1.6: what has changed since Julia 1.0?
by the-smug-one on Sunday February 14, 2021 @01:39PM
(#26134863)
Dang, why can Common Lisp do this so well and Julia so poorly?
Re:Julia 1.6: what has changed since Julia 1.0?
by eigenspace on Sunday February 14, 2021 @01:53PM
(#26134988)
The assumptions our compiler is able to make about types never changing (and a few other restrictions) allows for a lot of optimizations in julia that are not possible in Common Lisp. Julia's compiler is able to do a few things significantly more aggressively than CL.
That said, there is some very interesting work happening on getting around these restrictions. There was a PR from Tim Holy a while ago that could have allowed it, but there were some problems with the PR, and there were also some associated costs that were deemed too steep to pay.
That said, there's other great work on other ways around this. For instance, you can dynamically redefine structs all you want in Pluto.jl notebooks and there's no performance penalty!
This is something that kinda just fell out as a natural consequence of it's reactive design.