News for hackers. Stuff that matters.
Re:Tensorflow sucks by KirinDave on Monday October 09, 2017 @02:46AM (#15431961)
Usually I'm on the hook for being open minded about programming languages in this forum, but I'm putting my foot down.

I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful, error prone, obfuscated, and beholden to Python's difficulties with large sums of data.

Re:Tensorflow sucks by walrus on Monday October 09, 2017 @03:17AM (#15432059)
Can you give a sketch of how you would like these examples to look? Any language is fine; you can pretend that libraries for GPGPU, backprop, and gradient-based optimization already exist.

I tried to do so myself and couldn't come up with anything significantly better, but I've been writing Python for a long time and might just be stuck in a local minimum :)

Re:Tensorflow sucks by KirinDave on Monday October 09, 2017 @11:37AM (#15434744)
Sure.

Another comment has already pointed out that Julia framework. I'll relink it for completeness: https://fluxml.github.io

You can also look at Haskell's Grenade examples: https://github.com/HuwCampbell/grenade

Fundamentally different because the notion of what the compiler should be doing is fundamentally different, and the notion of how data should be input is somewhat different.

Re:Tensorflow sucks by Gtifn on Monday October 09, 2017 @10:53AM (#15434264)
Re:Tensorflow sucks by hueving on Monday October 09, 2017 @03:57AM (#15432164)
Can you turn your comment into something productive by showing a code example front another language that handles these cases better?
Re:Tensorflow sucks by KirinDave on Monday October 09, 2017 @11:32AM (#15434677)
Other people will.

But it is productive to say, "An excessively declarative style has been considered bad in programming for over thirty years."

That is reminding people this is a largely solved problem that the industry refuses to embrace because our legacy rube-goldberg contraption of software refuses to accept ever abandoning anything in favor of simplicity.

A great example: Why are both of these examples using the error prone pattern of explicit bounds iteration?

Re:Tensorflow sucks by Gtifn on Monday October 09, 2017 @10:52AM (#15434255)
Re:Tensorflow sucks by bsg75 on Monday October 09, 2017 @12:22PM (#15435191)
Any example of better approaches in R?
Re:Tensorflow sucks by MihailBurduja on Monday October 09, 2017 @03:19AM (#15432065)
I bet you love Perl
Re:Tensorflow sucks by KirinDave on Monday October 09, 2017 @03:23PM (#15436660)
No. Julia and Haskell are my go-to suggestions.

But I'd even take Scala at this point, and you could do worse than Clojure.

Python code isn't especially "ugly" as in line noise. It's ugly in the sense that it's a deluge of outdated and ineffective programming paradigms that maximize the difficulty of writing code.

Re:Tensorflow sucks by aeoost on Monday October 09, 2017 @09:46PM (#15438722)
I got fed up with up with Python and switched to F#. My main issue was the lack of static typing made testing and debugging a major timesink and headache.

It's early days but so far F# it ticks all my boxes and I'm finding it an extremely nice language to write in. It is just as terse as Python (due to type inference) but statically typed, and there is a great plugin Ionide for VSCode which makes for a really polished development environment.

Plan is to use Microsoft's CNTK for ML/DL stuff.

For anyone frustrated with Python's duck typing, I highly recommend you check out F#.