Re:Deep learning may need a new programming language
by kwertzzz on Tuesday February 19, 2019 @06:35AM
(#19198228)
Julia fits the bill quite well in my opinion:
* features: you have an extensive standard library, macros, high level constructs (like generators, asynchronous programming, ...)
* performance: julia is based on LLVM and as long the code is type-stable and avoids memory allocation in hot loops, the performance is similar to C or Fortran.
* usability: you can also program at a very high level like you would do in matlab or python/numpy.
Re:Deep learning may need a new programming language
by dunefox on Tuesday February 19, 2019 @09:26AM
(#19199098)
I really hope it takes off as it seems very promising.
Re:Deep learning may need a new programming language
by awestroke on Tuesday February 19, 2019 @03:26AM
(#19197472)
Or use Rust to get all 3!
Re:Deep learning may need a new programming language
by semi-extrinsic on Tuesday February 19, 2019 @04:30AM
(#19197746)
I'm sorry, but Rust certainly doesn't score high on usability. Compare e.g. the "Guessing Game" intro from the official docs, just look at how much more complicated both the code and the tutorial is as compared to how you would do the same in Python, heck even in Fortran:
https://doc.rust-lang.org/book/ch02-00-guessing-game-tutoria...
Re:Deep learning may need a new programming language
by adrianN on Tuesday February 19, 2019 @04:53AM
(#19197849)
I don't think comparing 100 line programs is a good benchmark for usability. Most software is much larger and the design choices you have to make for a programming language should favor programs with at least a few thousand lines of code.
Re:Deep learning may need a new programming language
by pjmlp on Tuesday February 19, 2019 @06:11AM
(#19198156)
Then try to do a few thousand lines of code in Gtk-rs, including custom widgets, the issues with borrow checker and internal mutable struct data accessible to callbacks is what lead to the creation of Relm.
Re:Deep learning may need a new programming language
by adrianN on Tuesday February 19, 2019 @10:38AM
(#19199639)
The GUI story in Rust is currently terrible, I agree. But writing GUIs in Python with wrappers to C(++) libraries is not exactly nice either ;)
Re:Deep learning may need a new programming language
by pjmlp on Tuesday February 19, 2019 @10:53AM
(#19199759)
To me it looks pretty nice.
Re:Deep learning may need a new programming language
by giornogiovanna on Tuesday February 19, 2019 @08:04AM
(#19198621)
The final code is longer because Rust's standard I/O is a lot more minimal than Python's, Fortran's, and even C's. If you use a library like [text_io], which provides the equivalent of scanf, then I don't think that it'd be any longer.
[text_io]: https://crates.io/crates/text_io
Re:Deep learning may need a new programming language
by semi-extrinsic on Wednesday February 20, 2019 @03:10AM
(#19206423)
But surely, having a sane way to do I/O in the standard library is one of the traits included in "Usability"?
Re:Deep learning may need a new programming language
by giornogiovanna on Thursday February 21, 2019 @10:05AM
(#19217299)
Why does it have to be in the standard library when adding it as a dependency involves adding just a single line? Since (a) there's no one true way to do input parsing, and (b) most projects don't need to interactively ask for input, it doesn't sound like something that belongs in a standard library.
Re:Deep learning may need a new programming language
by pjmlp on Tuesday February 19, 2019 @04:01AM
(#19197604)
They still need a bit of work to improve the 3., specially against GC languages.
Re:Deep learning may need a new programming language
by akhilcacharya on Tuesday February 19, 2019 @09:27AM
(#19199106)
Honestly, I think Swift on Tensorflow fits the best for this case right now. The problem being that they seem to be integrating Tensorflow directly into the compiler (correct me if I'm wrong) which is going to be impossible to upstream and just going to lead to a Google-derived Swift fork.
Re:Deep learning may need a new programming language
by skocznymroczny on Tuesday February 19, 2019 @04:25AM
(#19197717)
You could use D for all three - https://github.com/Netflix/vectorflow
Re:Deep learning may need a new programming language
by semi-extrinsic on Tuesday February 19, 2019 @04:33AM
(#19197761)
From the examples there, we find e.g. this nugget:
return bigEndianToNative!T((cast(ubyte*)&b)[0..b.sizeof]);
Do you really feel this is a language that scores high on usability? Because it doesn't look like it.
Re:Deep learning may need a new programming language
by skocznymroczny on Tuesday February 19, 2019 @05:56AM
(#19198077)
It's basically a reinterpret_cast, it's dirty and should look dirty, even if it's necessary in this case.
Re:Deep learning may need a new programming language
by semi-extrinsic on Wednesday February 20, 2019 @03:09AM
(#19206420)
Why is it necessary to do something that looks dirty? To me, "usability" means I shouldn't have to care about endianness, pointers, all the superfluous mental overhead of C et al. If you program in Python, at best you need to care about whether something is a float or int (or string if read from file). In recent Python versions we no longer have to care if a string is unicode or not (they're all unicode now); that is precisely progress in usability.
You can pick only two options;