News for hackers. Stuff that matters.
Re:The beauty of functional languages in deep learning – Clo... by samcodes on Thursday September 12, 2019 @10:06AM (#20951566)
I wanted this article to convince me, but they really don't acknowledge the reason that everyone currently uses Python - the libraries. Do linear algebra using lightly wrapped C? numpy. What about NLP? spaCy. Implicitly specify a computation graph with high level code? PyTorch. Explicitly specify a computation graph using leaky C++ abstractions? TensorFlow. And using either PyTorch or TensorFlow, you get to interact with CUDA.

For now, if you want a functional language for doing deep learning, IMO that language needs Python interoperability. Long-term, I'm hopeful that GraalVM [0] can provide a way of calling Python from the JVM, but until then, I think the best option is coconut-lang [1], "a functional programming language that compiles to Python." You get pattern-matching, TCO, the pipe operator, and ADTs, all while being one AOT compilation step away from Python.

[0] https://www.graalvm.org/

[1] http://coconut-lang.org/

Re:The beauty of functional languages in deep learning – Clo... by bgorman on Thursday September 12, 2019 @10:18AM (#20951705)
For what it is worth, Apache MXNet has official Clojure bindings and you can use Deeplearning4j as well. There is also Neanderthal for CUDA/OpenCL programming in Clojure. Theoretically the ease of implementing DSLs in Clojure should be an advantage for the computation graph use case you are talking about.
Re:The beauty of functional languages in deep learning – Clo... by zgramana on Thursday September 12, 2019 @10:43AM (#20952001)
If you haven’t checked it out already, you should take a look at Jython. As the name suggests, it’s a Java implementation of Python.

https://www.jython.org/

Re:The beauty of functional languages in deep learning – Clo... by turingbike on Thursday September 12, 2019 @12:44PM (#20953555)
I think the reason the parent mentions GraalVM instead of Jython is that Jython can't use C libs like numpy. But GraalVM lets you compile JVM to a native binary, so maybe there is some way to use Cython in JVM.
Re:The beauty of functional languages in deep learning – Clo... by zgramana on Monday September 16, 2019 @11:55AM (#20985360)
JyNI* was created to bridge Jython to Numpy. I don’t have any personal experience with it, but one need not wait for a GraalVM solution.

* https://www.jyni.org/