News for hackers. Stuff that matters.
Re:Python Is Eating the World by botto on Monday August 12, 2019 @06:59AM (#20674288)
Isn't it also just as much about Python is having it's day, granted a day long in the waiting but many langs go through this (Ruby, PHP) and then it tapers off and the next language has it's day.

Probably Go will be the next hotness in 5 years.

Re:Python Is Eating the World by Rotareti on Monday August 12, 2019 @07:44AM (#20674481)
> Probably Go will be the next hotness in 5 years.

I think it will be difficult to grow a large ecosystem for a language with very poor FFI performance [0] in the long run. Golang's poor FFI performance is the number 1 reason I wouldn't use it for my own projects.

[0]: https://github.com/dyu/ffi-overhead

Re:Python Is Eating the World by ben509 on Monday August 12, 2019 @01:10PM (#20677470)
It depends on how active the community is. Java has had the same issue, and people just knuckled down and rewrote stuff in Java.
Re:Python Is Eating the World by naikrovek on Monday August 12, 2019 @08:04AM (#20674600)
People gripe about the strangest things.

After using Go almost exclusively for about 18 months I have had to interface with existing C libraries exactly zero times.

Re:Python Is Eating the World by dcolkitt on Monday August 12, 2019 @09:52AM (#20675374)
I think it's less an issue of the average programmer using FFI and more an issue of common libraries leveraging it.

With python, why is it so popular currently? For large part because of its very good data science and machine learning ecosystem. And why does that exist? Mostly because python libraries like numpy, theano, and scikit-learn were built on top of mature, high-performance C libraries like OpenBLAS, LAPACK, and Cuda.

I very much doubt that anything like scipy would exist if the developers had to reinvent the wheel of the underlying numbers libraries from scratch. C's been around a long-time. There's huge amounts of high-quality mature software that already exists in a C framework. A language's ability to easily "plug-in" to the C ecosystem is a major leg-up when it comes to bootstrapping its own comprehensive library ecosystem.

Re:Python Is Eating the World by TurboHaskal on Monday August 12, 2019 @08:53AM (#20674957)
How is FFI remotely strange? Not everyone is doing webdev, and even then, you would be surprised how many libraries are leveraging C ones.
Re:Python Is Eating the World by treve on Monday August 12, 2019 @08:18AM (#20674684)
I've run a few semi popular open source projects, and it's surprisingly common to hear people tell me it's useless because it's lacking their specific pet feature. Now these comments just make me laugh, just like the parent's gripe with slow FFI
Re:Python Is Eating the World by Rotareti on Monday August 12, 2019 @01:19PM (#20677573)
Calling the FFI a pet feature is nonsense.
Re:Python Is Eating the World by Rotareti on Monday August 12, 2019 @08:17AM (#20674674)
I think you don't get the point. Most people don't create such interfaces, but the libraries/systems they work with use them a lot, at least in other languages.

This is for example the reason why there won't be a large mathy/scientific ecosystem in golang.

Re:Python Is Eating the World by jerf on Monday August 12, 2019 @10:39AM (#20675791)
Python needs FFI, because its native performance is fairly poor [1]. In general, Go gets away with less FFI because it's fast enough that it doesn't need things to be implemented in C to run quickly. This is especially true if you consider "Go" as "Go + its ASM", which is probably what you'd want if you think of it in terms of science programming.

For another example of a similar effect, Rust has great FFI. Yet I would expect over time it will be necessary for fewer and fewer things, because Rust is already roughly on par with C, and over time, a native Rust API will still be preferable to a C API wrapped with a Rust access layer. It will always have great C FFI, by its nature, but the percentage of projects that won't need it is already pretty high and probably only going up over time.

[1]: People seem to misinterpret this statement a lot, as if I'm saying Python is bad or something. No; it is simply this: Python performance is not very good at a very raw level. It is merely one characteristic of a language out of many, many relevant ones, not a full assessment of the language. Python has many other dimensions in which it has superior capabilities. It just pays for that on the performance dimension. (Whether that's an essential or an accidental tradeoff, well, ask me again in ten years; the programming language community seems to be in the process of working that out right now.)

Re:Python Is Eating the World by 6gvONxR4sf7o on Monday August 12, 2019 @12:53PM (#20677276)
It's not just about speed. Great mature libraries have been written in C over the decades. Rewriting them in a new language is a herculean effort. Writing bindings to them lets you use the fruit of all that labor.
Re:Python Is Eating the World by jerf on Monday August 12, 2019 @01:25PM (#20677642)
What you say is true, yet, I observe that people undertake that herculean effort with some frequency.

Whether that's a good idea, and why that is, those would be entirely separate conversations. But it's just an observable fact that languages pick up native implementations of core functionality over time, subject to certain performance restrictions (e.g., I'm sure that if it wouldn't be unusably slow, Python would have a native-Python image library... it's just Python doesn't really have that option).

Re:Python Is Eating the World by 6gvONxR4sf7o on Monday August 12, 2019 @01:39PM (#20677834)
The effort I'm familiar with is the many attempts to make a decent linear algebra library in haskell. There are a number of libraries with huge work put in, but none has reached blas/lapack parity. Nothing's remotely comparable to numpy in ease of use yet. It picks up more libraries as time goes on, and the existing ones mature, but it's so slow that I'm skeptical they'll ever match numpy's usefulness a decade ago.
Re:Python Is Eating the World by jerf on Monday August 12, 2019 @03:37PM (#20679090)
I think it's really easy to focus on the big hitters and forget they are the exceptions. Yes, matching lapack, any GUI toolkit, a browser engine, and a handful of other things is a big challenge that takes its own community to overcome, not something any language community can do with an incidental fraction of the community's available firepower.

But those are the exceptions, and often you don't need a best-of-breed solution and may prefer the language-native one.

Again, I'm not theorizing about what could be here; I'm looking out in the world, where I see that most libraries tend to emerge out into a native version if the underlying language can possibly meet the basic requirements for performance and such. This is something that needs to be explained, not explained away.

Also... I love me some Haskell, and on a per capita basis the community is great, but if Rust's community isn't already several times larger and growing faster, I'd be stunned, just to pick one example. Haskell has some very interesting cases of best-of-breed libraries, but it doesn't exhibit the library profusion you get from sheer personpower. (Of course, it doesn't really have the problems you get when your libraries are generated by sheer personpower either.)

Re:Python Is Eating the World by tome on Tuesday August 13, 2019 @01:59AM (#20683168)
> if Rust's community isn't already several times larger and growing faster, I'd be stunned

I'd love to see the numbers on that if you know where to find them.

Re:Python Is Eating the World by Rotareti on Monday August 12, 2019 @12:45PM (#20677186)
If the go-silo offers everything you need than yes, there is no need for a good FFI in go... but if you want access to the low-level ecosystems of C/C++/Rust without a heavy penalty, then it might not be an option.
Re:Python Is Eating the World by justinclift on Monday August 12, 2019 @08:23AM (#20674710)
> This is for example the reason why there won't be a large mathy/scientific ecosystem in golang.

That seems weird. Go has a pretty large (and growing) Data Science Community.

Lots of Math/Scientific stuff there, especially including many people from Python and Ruby backgrounds.

Re:Python Is Eating the World by syntex on Monday August 12, 2019 @07:28AM (#20674424)
Actually, Golang isn't so great. Try to change something lower level, for example in their socket implementation. Also, it's trying to promise a sane concurrency and all code I've seen use mutex all over the place.
Re:Python Is Eating the World by lijogdfljk on Monday August 12, 2019 @08:49AM (#20674919)
> Also, it's trying to promise a sane concurrency and all code I've seen use mutex all over the place.

I think that's a fault of the devs, more than the language. In many cases (not all, of course) Go gives you multiple ways to achieve concurrent safety. Channels, being the big secondary. Yet it generally (in my experience) requires a very different implementation and in general has a lot of pitfalls. Over all I don't like Go these days, but I prefer it over Python (mostly due to at least having basic types)

I've switched everything to Rust though. Just as productive as Go (to me), with more tooling. Though, Rust will be much better in a couple years with some additional baking on new features (GATs, Futures, etc).

Re:Python Is Eating the World by takeda on Monday August 12, 2019 @10:43PM (#20682319)
> I don't like Go these days, but I prefer it over Python (mostly due to at least having basic types)

You should try type annotations, with mypy and/or PyCharm it helps finding bugs before you run the code. It also makes autocomplete and refactoring work correctly (I would say they work better in PyCharm than in GoLand)

Re:Python Is Eating the World by nighthawk648 on Monday August 12, 2019 @08:12AM (#20674643)
The main reason I get so curious as to why so many developers would rather use premade packages then spend r&d into highly optimized solutions.
Re:Python Is Eating the World by lioeters on Monday August 12, 2019 @09:12AM (#20675057)
As someone with a tendency towards writing my own custom solutions (from scratch or forked), I'm learning the hard way why people prefer depending on premade packages: they're usually better documented, better tested (both written tests and real-life battle-tested), and in a team/collaborative environment, having some canonical packages that everyone is familiar with helps to have common understanding, rather than having to explain how a one-off custom solution works.
Re:Python Is Eating the World by takeda on Monday August 12, 2019 @10:53PM (#20682374)
It really depends, I've seen many examples where:

1. the package offering the functionality I needed was much more complex than needed and my solution implementing that functionality was much simpler (because it implemented only what I needed) 2. was not the best quality, because it was written by someone who was not necessarily better than me, or didn't spent enough time understanding the problem he was trying to solve

Having said that generally popular packages are good quality, although even then #1 applies, if you need just small functionality of a specific package try implement it yourself, it might turn out that the problem was not as hard as you thought and because you're just implementing what you need it might be more elegant.

Re:Python Is Eating the World by mises on Monday August 12, 2019 @07:27AM (#20674417)
Yes and no. Go has its applications, but is not built to replace python but rather to be a better c. That overlaps with the "easy code" part and not much else. Glue code, application scripting, etc. are python's strengths, and I don't see those going away.
Re:Python Is Eating the World by growtofill on Monday August 12, 2019 @08:21AM (#20674699)
Source on your claim? The best I was able to find is this:

> Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++.

https://techcrunch.com/2009/11/10/google-go-language/

Re:Python Is Eating the World by Ensorceled on Monday August 12, 2019 @07:07AM (#20674327)
Maybe, I love Go but I'm not sure it's the next "hot" thing, all the recent "hot" languages have been scripting languages PHP, Ruby, Python, JS ... I'd say JS and Python are currently jockeying for that position.
Re:Python Is Eating the World by gwd on Monday August 12, 2019 @07:27AM (#20674415)
> all the recent "hot" languages have been scripting languages

All the languages you list are over 20 years old. I think the popularity of Go and Rust show that statically-typed languages are having a resurgence.

As a long-time C programmer (with significant bits of bash and perl on the side), I've really enjoyed learning Go. But the responsiveness to developing new language features has been _sooo sloooow_. We'll have to see in 10 years if this turns out to have been a wise decision or not.

Re:Python Is Eating the World by Ensorceled on Monday August 12, 2019 @09:03AM (#20675010)
You could be right, especially as microservice architectures are very popular.
Re:Python Is Eating the World by danielscrubs on Monday August 12, 2019 @07:18AM (#20674373)
Isn’t JS one of the most popular languages? It has a monopoly in the browser so that and C++ already has the most impact on users. Hard to see how it can become more popular.
Re:Python Is Eating the World by arcticfox on Monday August 12, 2019 @07:24AM (#20674401)
The server-side of things can start eating away at other languages. Node.JS is obviously already very popular but it can still grow massively.

I for one have started running TypeScript on my servers whenever I can, I love it. There's still room for improvement though.

Re:Python Is Eating the World by lioeters on Monday August 12, 2019 @09:17AM (#20675104)
> running TypeScript on my servers

I'm curious, do you mean compiling to JS and running it on the servers? Because I would love for the runtime itself to run TypeScript, something like Deno [0] but (maybe in the future) as mature as Node.js.

[0] https://deno.land/

Re:Python Is Eating the World by saagarjha on Monday August 12, 2019 @07:45AM (#20674488)
> It has a monopoly in the browser

Well, there’s WebAssembly…

Re:Python Is Eating the World by Ensorceled on Monday August 12, 2019 @08:13AM (#20674646)
That's what I mean: Python and JS are jockeying for position as the hot language right now.
Re:Python Is Eating the World by tyingq on Monday August 12, 2019 @08:39AM (#20674835)
I'm sort of wondering if there might be a PHP resurgence. Things have gotten much better recently. The historical warts are easier to avoid now.
Re:Python Is Eating the World by ProZsolt on Monday August 12, 2019 @09:03AM (#20675006)
I was a PHP hater before but in my last job, I had to rewrite a big chunk of code from PHP 5.x to 7.2. Actually quite liked it. I would happily work with PHP 7.2+ code in any day but still wouldn't start a new project in it.