Re:Gluon – Deep Learning API from AWS and Microsoft
by stingraycharles on Thursday October 12, 2017 @01:18PM
(#15459547)
That doesn’t sound like a very satisfying reason to me. Isn’t a ByteArrayBuffer in Java pretty much the same (its underlying implementation is a char[] which can be used directly from C)?
Is there perhaps another factor, such as an existing ecosystem or that it’s widely used in the academic field?
Re:Gluon – Deep Learning API from AWS and Microsoft
by agibsonccc on Thursday October 12, 2017 @07:52PM
(#15462330)
If you use direct allocation yes. Java has great facilities for direct memory management. (Look at the number of libraries like netty and co that exist). The problem with java is more the friction at getting at some of the lower level apis.
Python just has momentum and a fairly easy to use FFI.
Re:Gluon – Deep Learning API from AWS and Microsoft
by pathseeker on Thursday October 12, 2017 @03:53PM
(#15460805)
>Is there perhaps another factor, such as an existing ecosystem or that it’s widely used in the academic field?
Yes, it's widely used in science in general. Don't underestimate the learning curves of other languages when your audience is scientists and mathematicians. Python is incredibly easy to use, even when using numpy and other scientific tools.
Re:Gluon – Deep Learning API from AWS and Microsoft
by genericpseudo on Thursday October 12, 2017 @01:31PM
(#15459633)
Python has been the language of choice for many physicists (when not doing Fortran) since the early 2000s.
> Python's Buffer Protocol: The #1 Reason Python Is The Fastest Growing Programming Language Today
> The buffer protocol was (and still is) an extremely low-level API for direct manipulation of memory buffers by other libraries. These are buffers created and used by the interpreter to store certain types of data (initially, primarily "array-like" structures where the type and size of data was known ahead of time) in contiguous memory.
> The primary motivation for providing such an API is to eliminate the need to copy data when only reading, clarify ownership semantics of the buffer, and to store the data in contiguous memory (even in the case of multi-dimensional data structures), where read access is extremely fast. Those "other libraries" that would make use of the API would almost certainly be written in C and highly performance sensitive. The new protocol meant that if I create a NumPy array of ints, other libraries can directly access the underlying memory buffer rather than requiring indirection or, worse, copying of that data before it can be used.
(The italic emphasis was copied from the original article.)