News for hackers. Stuff that matters.
Re:Hello Qt for Python by adamnemecek on Saturday May 05, 2018 @05:35PM (#17003967)
This is like 10 years too late. This could have prevented electron.
Re:Hello Qt for Python by pjmlp on Sunday May 06, 2018 @04:42AM (#17005745)
Electron is the third wave, before we had MSHTML and XUL.

Just like its predecessors I give it one or two years more max, then it will fade away like they did.

Re:Hello Qt for Python by nadioca on Sunday May 06, 2018 @01:59AM (#17005427)
Most interfaces created through web technology would be incredibly hard and slow to do using pyside/pyqt. We take for granted the non-blocking aspect of javasript where in python in order to make a slick interface would require to deal with threads/GIL in a much slower interpreted language compared with javascript running on V8.

Qt (Qt Desktop) bindings for python are welcome. But, it's not a suitable for a viable replacement for electron. Maybe Qt Quick, but even qt quick has some decisions that can make incredibly uncomfortable to use in large applications.

Re:Hello Qt for Python by ptx on Sunday May 06, 2018 @05:22AM (#17005812)
We have asyncio now to handle things in a non-blocking way with async/await. Someone just needs to write an implementation of asyncio.AbstractEventLoop that hooks into the Qt event loop.
Re:Hello Qt for Python by always_good on Sunday May 06, 2018 @08:10AM (#17006107)
And then they need to write an async version of everything you might want to use. And then they're done!
Re:Hello Qt for Python by ptx on Monday May 07, 2018 @02:03AM (#17010674)
No, async versions of everything are already being written, based on asyncio. You just need the glue for using it with Qt.
Re:Hello Qt for Python by jcelerier on Sunday May 06, 2018 @11:36AM (#17006772)
but.... 10 years ago there was PySide 1 which was the exact equivalent of this except with the 10 years ago Qt version
Re:Hello Qt for Python by adamnemecek on Sunday May 06, 2018 @11:46AM (#17006805)
The licensing was weird iirc.
Re:Hello Qt for Python by always_good on Sunday May 06, 2018 @08:11AM (#17006110)
People use Electron because of web technology and also the abstractions available there like React, not because any dynamically-typed language would've sufficed.

In fact, Python is at a disadvantage here anyways because it's not async by default.

Re:Hello Qt for Python by stefano on Sunday May 06, 2018 @08:21AM (#17006141)
What's so important about being async by default to build desktop applications? Offloading slow tasks to a background thread is not at all harder and actually allows you to use more than one cpu core.

Threads avoid the need of callbacks/promises/async/await and they're also cheap and performant unless you need to spawn >10k of them, which seems very unlikely in a desktop applications.

Being async by default is an advantage when you need to handle hundreds of thousands of tasks, all of which are mostly waiting on I/O, which is something that can happen on server side applications, and almost never on the desktop.

Re:Hello Qt for Python by asdfaoeu on Sunday May 06, 2018 @06:48PM (#17009077)
Python is really in the same category as JavaScript as far as being asynchronous is concerned.
Re:Hello Qt for Python by chimen on Saturday May 05, 2018 @08:40PM (#17004695)
You make it sound like that would have been a good thing. Why?
Re:Hello Qt for Python by _ZeD_ on Saturday May 05, 2018 @11:47PM (#17005134)
Electron is bloated