Re:Deep learning may need a new programming language
by amelius on Tuesday February 19, 2019 @05:23AM
(#19197966)
The main problem, imho, is that (for best performance) most libraries require the programmer to create a data flowgraph, and to think in terms of this graph. However, this is the perfect job for a compiler. In mainstrain compilers, dataflow analysis has traditionally been the task of the compiler, so it seems silly to break with this tradition. A new (compiled) language could bring us back on track.
[ Parent
| on HN ]
Re:Deep learning may need a new programming language
by spinningslate on Tuesday February 19, 2019 @07:35AM
(#19198480)
I'd probably argue the opposite. Dataflow is a natural way to think about ML activities. The problem is that no mainstream languages offer dataflow as a first class construct; at best it's a set of libraries. That creates some impedance mismatch between intent and implementation. That compilers already do dataflow under the covers would hopefully mean that implementing a first-class dataflow language wouldn't be too hard.
Re:Deep learning may need a new programming language
by amelius on Tuesday February 19, 2019 @12:09PM
(#19200558)
By that argument, dataflow is also a natural way to think about NumPy/SciPy programs.
However ... that's not really true. Humans prefer to think in terms of operations (consecutive steps) and labels for intermediate results.
The most important situation where this is important is if the dataflow is dynamic. A dynamic graph can make it unclear what is assigned to what, at which point in time, and programming becomes a mess.
Re:Deep learning may need a new programming language
by giornogiovanna on Tuesday February 19, 2019 @07:55AM
(#19198580)
What would a language primitive for "dataflow" look like, and what would it offer over an implementation as a library?
Re:Deep learning may need a new programming language
by spinningslate on Tuesday February 19, 2019 @08:42AM
(#19198852)
There are a few things, nicely covered in "Concepts, Techniques and Models of Computer Programming" by Van Roy and Heridi [0]. Briefly:
1. First-class dataflow variables 2. Syntax for creating flows (c/f pipe in *nix shell) 3. Transparent parallelisation
All of these things exist in libraries of various sorts, but can feel cumbersome compared to native syntax.
[0] https://mitpress.mit.edu/books/concepts-techniques-and-model...