3 ms·
Imagine a world where papers are written as a Julia Jupyter Notebook (or other nb format) that compiles to both a pdf suitable for publishing and also to a libr
by infogulch 5y ago
Imagine a world where papers are written as a Julia Jupyter Notebook (or other nb format) that compiles to both a pdf suitable for publishing and also to a library that is directly consumable. The phrase "I'm using an algorithm I found in this paper" would become a much more meaningful statement.
- gugagore 5y agoThat is a great world. But considering that we still do not really know how to write e.g. generic code that operates on both immutable and mutable arrays, I think Julia is not there yet. The other big thing missing in Julia that is IMO important here is more control over evaluation, like allowing lazy evaluation. You can build some of these features on top of Julia (e.g. https://github.com/RelationalAI-oss/Salsa.jl https://github.com/RelationalAI-oss/Salsa.jl). Math is usually not written with computation in mind, so some algorithm might e.g. re-evaluate f(x) multiple times. Compiler optimizations can help in some cases, as can a "dynamic" solution like memoization/caching. But again, I don't think Julia is "there" yet.
- StefanKarpinski 5y agoI don’t really get the first issue. If an algorithm doesn’t need to mutate a matrix then it will work for a mutable or immutable matrix. If it needs to mutate a matrix then how could it work for an immutable matrix? If you want a polyalgorithm that uses a mutating algorithm on mutable matrices and a non-mutating algorithm on immutable matrices, then you can just do that (and multiple dispatch makes it easy). What additional features are needed? Is there some language that “does this right”?
- pjmlp 5y agoThat was the premise of literate programming, but it did not took the world by storm. https://en.wikipedia.org/wiki/Literate_programming https://en.wikipedia.org/wiki/Literate_programming