4 ms·
I would disagree, first Go has been tremendously successful and yes will have generics soon. The ML community really needs a better language than Python, the cu
by yahyaheee 6y ago
I would disagree, first Go has been tremendously successful and yes will have generics soon. The ML community really needs a better language than Python, the current alternatives (Julia, Nim, R) are alright but seem to miss the mark in this arena. I see few data scientists excited about Swift, its too heavy handed and deeply embedded in the Apple iOS community.
People are searching for a better language in this space and it's something that often needs a corporate backing. Google is aware of this problem and hired Chris Latner to fix it, its just a bit of unfortunate oversight, I guess we'll keep using Python for now.
- girvo 6y agoJulia is I think perhaps more focused on ML and data analysis, but Nim has some neat tricks up it's sleeves too: https://github.com/mratsim/Arraymancer https://github.com/mratsim/Arraymancer
- yahyaheee 6y agoI like Nim quite a bit, I would put it and Julia as the best contenders at the moment.
- gtycomb 6y agoNim is a languge that has good performance and I had good experience porting an enterprise Python application to Nim (for performance gain). For a new user the risk obviously is the newness of Nim but the Nim team was very helpful and prompt whenever I posted a question. Its a very complete and surprisingly issue-less language. Hopefully Arraymancer will help increase its reach, I wish the implementors all the best.
- Alex3917 6y ago> I see few data scientists excited about Swift, its too heavy handed and deeply embedded in the Apple iOS community. Which is unfortunate, because it would probably be the best language if it were controlled by a non-profit foundation like Python. As it stands it's basically unusable.
- lostmsu 6y agoWhy do you think Swift would be the best language? I am doing a lot of C#, and so far have not seen anything in Swift, that would make it feel better. In fact, at this moment even Java is doing leaps forward, so will quickly catch up on syntax. And C# and Java have a benefit of JIT VM by default, meaning you only build once for all platforms, unless you need AOT for whatever rare reason (which they also have).
- danielscrubs 6y agoI'd say the culture is very, very different. Java/C#-heads are in love with OOP and create layers on layers everywhere, hiding as much state and methods as they can (you can't use this operator, you'll shoot yourself in the foot!) and rarely doing pure functions. It's just a long way from how math works. Not saying it wouldn't work, it definitely would, but I think I'd rather switch profession than deal with Maven and Eclipse in 2020. Swift culture is more about having non-mutable structs that in turn is extended via extensions and heavy use of copy on write when mutable structs are needed. It's a small difference but it's there.
- lostmsu 6y agoI fail to see how culture is related to the language. You have a weird notion of mutable by default in either Java or .NET. The former is notorious for builder patter because of that exact reason. Does Swift have special syntax for copy + update like F#: { someStruct with X = 10 }? Never had problems with Maven. How is Swift different? People have not been using Eclipse much for a while. There is IntelliJ IDEA for Java and Resharper for C#.
- danielscrubs 6y agoI might be wrong but as I've understood it Builder Pattern is mostly used as a solution to mitigate mutable state from being accidentally shared. Which is duct taping around the complexity instead of removing it. In Swift the copy on write happens as an implementation detail: https://stackoverflow.com/questions/43486408/does-swift-copy-on-write-for-all-structs https://stackoverflow.com/questions/43486408/does-swift-copy... I don't really know why but the coding patterns (what I call culture) that are popular for each language are very, very different even when they can support the same feature-set.
- freedomben 6y agoWhat is deficient about Julia? I've been heavily tempted to try it out but if there are problems I may invest my previous time elsewhere.
- yahyaheee 6y agoEh wrote it for a couple years my tldr; multiple dispatch is odd, types are too shallow, jit is really slow to boot, the tooling is poor.
- UncleOxidant 6y agoI found multiple dispatch to be odd at first, but after adapting my mindset a bit I really like it. It makes it really easy to just drop your functions specialized for your types into existing libraries, for example. It's a win for code reuse. What do you mean by "types are too shallow"? Yes, jit can be slow to boot, but I think this is an area they're going to be focusing on. "the tooling is poor" Not sure I agree here. I think it's great that I can easily see various stages from LLVM IR to x86 asm of a function if I want to.
- celrod 6y agoI've a lot more experience with Julia than any other language (and am a huge fan/am heavily invested). My #2 is R, which has a much more basic type system than Julia. So -- as I don't have experience with languages with much richer type systems like Rust or Haskell -- it's hard to imagine what's missing, or conceive of tools other than a hammer. Mind elaborating (or pointing me to a post or article explaining the point)?
- eigenspace 6y agoWhat version did you last use? Boot times still aren't ideal, but I find it takes about .1 seconds to launch a julia repl now. First time to plot is still a bit painful due to JIT overhead, but that's coming down very aggressively (there will be a big improvement in 1.5, the next release with differential compilation levels for different modules), and we now have PackageCompiler.jl for bundling packages into your Sysimage so they don't need to be recompiled every time to you reboot julia. I also think the tooling is quite strong, we have ana amazingly powerful type system and I would classify discovering multiple dispatch as a religious experience.
- kyllo 6y agoI don't know that the ML community necessarily _needs_ a better language than Python for scripting ML model training. Python is decent for scripting, a lot of people are pretty happy with it. Model training scripts are pretty short anyway, so whatever language you write it in, it's just a few function calls. Most of the work is in cleaning and feature engineering the data up front. Perhaps a more interesting question is whether the ML community needs a better language than C++ for _implementing_ ML packages. TensorFlow, PyTorch, CNTK, ONNX, all this stuff is implemented in C++ with Python bindings and wrappers. If there was a better language for implementing the learning routines, could it help narrow the divide between the software engineers who build the tools, and the data scientists who use them?
- yahyaheee 6y agoCan you get things done in python/c++ sure, but the two language problem is a well known issue, and python has a number of problems. People certainly want a better option, and google investing as much as they did validates that notion.
- deleted 6y ago[deleted]
- kyllo 6y agoYes, so to me, the key question is not whether Swift can replace Python's role, but whether it can replace C++'s role, and thereby also making Python's role unnecessary and solving the two-language problem in the process.
- pacala 6y agoI've been recently wondering why something like Javascript/Typescript could not grow into the role. * Ubiquitous. * Not owned by a single corporation. * Fairly performant runtime characteristics, with multiple implementations. * Optional typing for quick explorations. * Quite pleasant to use in its 2020 incarnation. * The community has a proven process, tooling and track record of incrementally improving a language and its ecosystem. Please don't shoot, I'm interested in constructive criticism.
- gtycomb 6y agoIn addition to your list here, I am drawn by ES6 on the backend. This is not javascript of the early days. On Differentiable Programming, you might be aware of a tensorflow counterpart in javascript: https://www.tensorflow.org/js https://www.tensorflow.org/js I tested this to a certain extent and its not a toy. Its well thought out product from a very talented team, and has the ease of coding that we love about javascript. It can run on browsers! This being said, we should note the strengths of a statically compiled language with the ease of installation and deployment like with Go, Rust, Nim, etc. in enterprise scale numerical computing.
- goatlover 6y agoBecause JS wasn't designed for scientific computing like R and Julia are. Best case scenario is that you reimplement all the libraries Python has, but then you're just replacing Python with another generic scripting language instead of a language built for that purpose. Why would data scientists bother switching to JS when Python already has those libraries, and Julia and R have better numeric and data analysis support baked in? And if Python, Julia and R don't cut it, then there's no reason to think another scripting language would. Instead you'd be looking at a statically typed and compile language with excellent support for parallelism.
- MiroF 6y agoI have similar thoughts. I think that Typescript could allow for a lot of the "bolt-on" type checking that I find appealing with static languages and most of these are just interfaces to the same C/C++ framework, so no reason you couldn't create typescript bindings..