News for hackers. Stuff that matters.
Re:Progress on the Gilectomy by saghul on Friday June 02, 2017 @02:52AM (#14467992)
The problem is with CPU intensive tasks. Being as expressive as Python is, it would be nice if CPU intensive algorithms could be written in it, without blocking all other Python threads while the algorithm runs. For example.
Re:Progress on the Gilectomy by crdoconnor on Friday June 02, 2017 @05:14AM (#14468565)
>it would be nice if CPU intensive algorithms could be written in it

It would be nicer if instead of trying to turn python into something it is not (a language for writing CPU intensive tasks), it was made better at what it is (glue code).

It would be especially nice if there were tighter, more seamless integration between python and rust so that hot paths in python can easily be migrated to rust.

Re:Progress on the Gilectomy by sevensor on Friday June 02, 2017 @10:52AM (#14470302)
I'm not a Rust guy, so take this with a grain of salt, but I was under the impression that Rust did a great job with C interoperability, which is all you need for writing Python extensions. Some hasty googling brings up https://github.com/PyO3/setuptools-rust, which appears to be exactly the thing you're asking for. In other words, it's not heavily advertised, but it appears to be entirely feasible to build Python extensions in Rust, and not spectacularly complicated either.
Re:Progress on the Gilectomy by steveklabnik on Friday June 02, 2017 @11:26AM (#14470570)
The language does do great at the core of it, but there's a lot of stuff that makes it easier that's not the language's job.

compare https://doc.rust-lang.org/1.2.0/book/rust-inside-other-langu... to http://usehelix.com/ for example; the former is only using what the language knows, the latter is a nice library built on top.

There's been some effort for nicer Python integration, but I haven't seen anything super super slick yet.

Re:Progress on the Gilectomy by crdoconnor on Friday June 02, 2017 @11:11AM (#14470445)
>Some hasty googling brings up https://github.com/PyO3/setuptools-rust, which appears to be exactly the thing you're asking for.

Yeah, I've tried it and it didn't work.

It's certainly feasible it's just not very well developed.

Re:Progress on the Gilectomy by mjburgess on Friday June 02, 2017 @05:41AM (#14468677)
No to threading, but yes to tighter integration with rust.

Ah yes, let's not focus on something python is not. Let's appeal to the majority use case.

What minor planet are people here from?

Re:Progress on the Gilectomy by Walkman on Friday June 02, 2017 @07:55AM (#14469205)
Python is far more than glue code.
Re:Progress on the Gilectomy by xorcist on Friday June 02, 2017 @05:34AM (#14468647)
If it's really CPU intensive, you can always fork.
Re:Progress on the Gilectomy by srean on Friday June 02, 2017 @06:54AM (#14468973)
The problem is the overhead of memory copy.

Linux is somewhat smart about it with its copy on write semantics (a double edged sword really). However, the moment you refer to an existing Python object the underlying data-structure gets mutated because of reference counting and boom now you have to copy the whole thing.

This can be worked around with creative stealing and by keeping a sharp lookout for references but it gets really painful and annoying.

Even if that were resolved its still not as flexible as one would want. One cant really go about spawning and terminating process too frequently. This forces one to move larger and larger parts of the logic into C.