News for hackers. Stuff that matters.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @09:22AM (#16281991)
I used (and liked) wx in the nineties - didn't know it was still around.

Qt is my goto GUI for Python these days, does anyone have experience with wx vs Qt for Python? The samples look like it's all dynamically generated (vs. something like QtDesigner) and that's how we used it way back when.

Re:WxPython 4.0.0 Released by mrastro on Thursday February 01, 2018 @09:37AM (#16282093)
I haven't used wx but at least one of the advantages is when exporting a project to .exe I assume you don't need to include the Qt libraries (i.e. .dll files) separately to conform with their licence, it can (legally) be in a single executable.
Re:WxPython 4.0.0 Released by vog on Thursday February 01, 2018 @10:34AM (#16282535)
Yes, that's an issue, but only if you don't want to make your Qt client Free Software. Since nowadays most client-side applications are tied to some web service anyway, releasing those as Free Software might even be advantageous.

Having said that, statically linked wxWidgets .exe files are usually smaller than Qt .exe files. Moreover, dynamically linking to Qt does have technical advantages for certain types of applications (mostly plugin architectures).

Shameless plug: You can create all variants (Qt or wxWidget, each statically or dynamically linked) very conveniently on your Linux build server via cross-compiling, which has become really easy thanks to the MXE project that I started in 2007.

http://mxe.cc

Re:WxPython 4.0.0 Released by Kliment on Thursday February 01, 2018 @11:07AM (#16282885)
Thanks so much for MXE, it made cross-platform application development much less painful for me.
Re:WxPython 4.0.0 Released by ihnorton on Thursday February 01, 2018 @11:10AM (#16282921)
The LGPL requirement is relinkability, which implies either distributing object files for your application (rare, inconvenient), or, more commonly, linking the LGPL library as a shared object. But that shared object could be stripped down to contain only the symbols your app uses (and their transitive dependants) — just as long as someone can do the same and use their API-matched .so as a drop-in replacement.
Re:WxPython 4.0.0 Released by jstimpfle on Thursday February 01, 2018 @09:45AM (#16282136)
I tried Qt (in C++) and even though it's developing (QML brings "modern" mobile widgets) it felt like they are stuck in the nineties.

Heavily object-oriented code and custom scripting languages that are really hard to understand and use, and when there were problems (memory leaks, reference counting) I was stuck 15 (Qt) calls deep somewhere in the huge codebase.

Thanks, but I'm now doing it myself and learning the right abstractions (and sane software architecture in general), instead of spending my time learning the incantations to make this elephant move the way I need him to.

Re:WxPython 4.0.0 Released by fps_doug on Thursday February 01, 2018 @09:57AM (#16282225)
"Qt is Java for C++", one of my colleagues used to say, and I saw what he meant once I started working with it. We used to develop with Qt4 a lot and I rarely ran into any issues at all, getting started was really straight forward and the documentation and examples are (were?) pretty comprehensive.
Re:WxPython 4.0.0 Released by ris on Thursday February 01, 2018 @12:49PM (#16283932)
I do still cite Qt's API documentation as the best I've ever used.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @09:49AM (#16282160)
I've only done Qt toy apps on the Pi with C++, which was a pretty good experience, could imagine a large Qt codebase in C++ could be stressful.

For Python I like Qt quite a bit because the loose signal/slot approach meshes nicely with a dynamic language.

Re:WxPython 4.0.0 Released by sevensor on Thursday February 01, 2018 @11:02AM (#16282838)
I work on a sizeable desktop application written in PyQt. While I agree that Qt has a very nineties feel about it, you don't have to buy into that. Specifically, you don't have to use class hierarchies to model your domain. It actually helps to have a language boundary -- we can let Qt be its object-oriented self, but on the Python side it's different. We do a limited amount of subclassing, which lets us hook into user interaction events, but other than that we use whatever works best in Python. As time passes, this seems to involve more and more straight-forward procedural code, less and less object-oriented modeling.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @11:11AM (#16282933)
My experience as well - a lot of my nuts and bolts OO work in static languages was making things conform to interfaces and existing class hierarchies. In dynamic languages there's less need for that and hierarchies are shallower and less entangled. None of that is surprising, of course.
Re:WxPython 4.0.0 Released by cabalamat on Thursday February 01, 2018 @09:30AM (#16282048)
My "go to GUI" is a web app -- I can't imagine anything I'd write a GUI app for these days.
Re:WxPython 4.0.0 Released by IgorPartola on Thursday February 01, 2018 @09:40AM (#16282105)
Text editor, video, audio editor, system widgets and settings, web browser, terminal emulator, git GUI client, crypto coin wallet, chat client, games, document editor, security focused software a la Keybase client.
Re:WxPython 4.0.0 Released by tempay on Thursday February 01, 2018 @10:04AM (#16282286)
> I'd write a GUI app for

It's unlikely that cabalamat would attempt making most of those and the others could definitely be done as a web/electron app if desired.

Re:WxPython 4.0.0 Released by IgorPartola on Thursday February 01, 2018 @02:12PM (#16284807)
Well sure. That is to say that Qt/Wx/GTK/etc. are as useless to cabalamat as to a Ukrainian plumber. In other words, that isn't saying much. If you don't write desktop apps, you wouldn't use a desktop app GUI toolkit, but that's a tautology. But cabalamat's comment implied that all desktop GUI toolkits are now useless because we have the web, which is a fallacy of generalizing personal experience to everyone else.
Re:WxPython 4.0.0 Released by cabalamat on Thursday February 01, 2018 @04:27PM (#16286064)
> But cabalamat's comment implied that all desktop GUI toolkits are now useless because we have the web, which is a fallacy of generalizing personal experience to everyone else.

Not useless in general, just useless for me

I once wrote a Python program to compile GUIs[1] -- you input a description of the GUI as a text file and it outputs Python code that implements the GUI in Tkinter. I dusted this off for a project last year but eventually decided that making it web-based would be easier to write, look nicer, and have more functionality.

Obviously if other people find WxPython useful, good luck to them.

1: see https://github.com/cabalamat/parrot

Re:WxPython 4.0.0 Released by JustSomeNobody on Thursday February 01, 2018 @12:11PM (#16283569)
> ... and the others could definitely be done as a web/electron app if desired.

But probably shouldn't because we don't produce enough renewable energy yet. There's still something to be said about using TRUE native apps.

Re:WxPython 4.0.0 Released by cabalamat on Thursday February 01, 2018 @04:30PM (#16286096)
I agree that electron is a bloated resource hog. But if you're running a web browser anyway (I always am) then it's not a big deal to have a web app with the server running locally and the client being a browser tab.
Re:WxPython 4.0.0 Released by cabalamat on Thursday February 01, 2018 @04:22PM (#16286035)
> It's unlikely that cabalamat would attempt making most of those and the others could definitely be done as a web/electron app if desired.

I'd write a web app and expose it on 127.0.0.1:someport rather than electron (which is bloated). Going down IgorPartola's list:

Text editor - I'd probably make this terminal-based using curses. Then I could easily use it on a remote server I'm ssh'd into.

video, audio editor - I've no plans/desires to write anything like these

system widgets and settings - a web app is highly suitable for editing system settings

web browser - far too big a project for me!

terminal emulator - plenty of good ones around already. I mostly use KDE's konsole.

git GUI client - I've recently been adding some git functionality to my catwiki wiki software (a web app) https://github.com/cabalamat/catwiki

crypto coin wallet - web app

chat client - web app or terminal-based

games - I've considered writing a hex-based board wargame as a web app

document editor - my catwiki wiki software is this, I suppose

security focused software a la Keybase client - the last time I wrote security software was a zero-user-interface email encryption system. If I did something like that in future, any interface would be web based

Re:WxPython 4.0.0 Released by sfifs on Thursday February 01, 2018 @10:06AM (#16282307)
the point is HTML5/CSS/JS nowadays provides superior UI experience to traditional UI frameworks. In many of the categories above, there are electron/webview based applications that's very popular.

Text editor, document editor -> VS Code/Atom

terminal emulator -> Google's terminal emulator

git GUI client -> GitHub client is electron based

chat client -> slack is electron based

games -> lots of web based

Re:WxPython 4.0.0 Released by seanmcdirmid on Thursday February 01, 2018 @10:11AM (#16282334)
The only thing superior about HTML/CSS/JS GUI are its ease of deployment and portability characteristics. As a UI platform, it feels like a huge step back from modern desktop GUI APIs, like we are doing UI programming in the 90s again.
Re:WxPython 4.0.0 Released by sfifs on Thursday February 01, 2018 @10:17AM (#16282381)
And I feel the other way around. "Modern Desktop GUI" feels clunky and archaic to me :-) Like menus and toolbars and the "ribbon" ajd the status bar and those clunky desktop widgets...
Re:WxPython 4.0.0 Released by seanmcdirmid on Thursday February 01, 2018 @10:28AM (#16282482)
That is a UI design issue: you don’t gave to use those, and if you do, it’s up to you to use them right. Web comes with a lot of limitations, many of those widgets obviously don’t make sense in the browser; heck they probably don’t make sense on the desktop but that is less obvious. With web, simplicity is enforced out of nescessary limitation, and this has turned out to be good for users.

From a programming perspective, modern desktop UI libraries are much more powerful and have less limitations. How you use that power is up to you and your UXD, however.

Re:WxPython 4.0.0 Released by coldtea on Thursday February 01, 2018 @02:26PM (#16284965)
It's because you have been conditioned to have low expectations by web apps.
Re:WxPython 4.0.0 Released by sfifs on Thursday February 01, 2018 @05:59PM (#16286767)
I've been programming computers since the time they came with two 5.25 inch floppies with green text monitors and have seen all UI paradigms since then. Maybe I have a right to have a point of view?

The standard desktop design paradigms were built by programmers for programmers - a lazy way to approach things leading to clunky to use software. The dog eat dog world of the web and rise of touch has forced us to turn to designers to play a huge role in simplifying interfaces and flows.

Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @06:35PM (#16286973)
I'll see your 5.25 floppies and green text monitors and raise you 8" floppies and smooth-scrolling VT100s.

Agree with your opinions, though, you old fart.

Re:WxPython 4.0.0 Released by coldtea on Thursday February 01, 2018 @06:07PM (#16286821)
>The standard desktop design paradigms were built by programmers for programmers - a lazy way to approach things leading to clunky to use software. The dog eat dog world of the web and rise of touch has forced us to turn to designers to play a huge role in simplifying interfaces and flows.

UI design and HCI has been a thing for 4+ decades.

The web is a very poor example of those things -- not to mention it has forgotten decades of research and best practices.

What it has is just ubiquity and easy access.

Re:WxPython 4.0.0 Released by IgorPartola on Thursday February 01, 2018 @10:22AM (#16282425)
Electron != web app. Have you tried using Slack's actual web client vs the Electron app? I personally strongly prefer the stand-alone client. The same with the git GUI client. The equivalent web thing is github.com.

If the original statement was "I prefer Electron for my desktop apps over Qt/Wx/GTK/etc." I could totally understand that. But the original comment was "My 'go to GUI' is a web app". That's not the same thing. It is our modern version of "when all you have is a hammer, everything looks like a nail."

Re:WxPython 4.0.0 Released by cabalamat on Thursday February 01, 2018 @04:32PM (#16286103)
> It is our modern version of "when all you have is a hammer, everything looks like a nail."

No. I've written GUI software, and tools for building GUI software[1], in the past.

1: https://github.com/cabalamat/parrot

Re:WxPython 4.0.0 Released by sametmax on Thursday February 01, 2018 @11:04AM (#16282848)
It's not my experience. Appart from some chat apps and vscode, i have only bad xp with electron apps. Stuff like stremio or popcorn time are slow and the mix of web paradigms into the destop sucks. Using dropbox, office, mails clients, are way better on native than then web version.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @10:15AM (#16282365)
Also, GUI toolkits were never fun or easy to use in desktop development. I've used MFC, wx and Qt with C++, Forms and WPF with C# and Qt with Python. All of those had their challenges so browser-based GUIs don't seem so bad as an alternative. Not a fan of JS but modern toolkits are almost at a point where they hide enough of the ugliness.
Re:WxPython 4.0.0 Released by protomyth on Thursday February 01, 2018 @10:49AM (#16282685)
Also, GUI toolkits were never fun or easy to use in desktop development.

NeXTSTEP was fun. Frankly, its still easier to develop for OPENSTEP 4.x then the web. VB when it first came out was amazing and all the VBX control you could buy were amazing. Heck, even the Newton was a lot cleaner to build a UI which still amazes me since Javascript should have been capable of the same type of prototype-based interface.

Re:WxPython 4.0.0 Released by markroseman on Thursday February 01, 2018 @10:31AM (#16282505)
Never? Dude, Tk back in the day! Compared with all the raw X11 predecessors, it was a revelation for Unix GUI's.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @11:16AM (#16282987)
True - Tk was quite the step up back then. I still use it every day when I fire up gitk or git gui.
Re:WxPython 4.0.0 Released by zwieback on Thursday February 01, 2018 @09:44AM (#16282132)
I'm in my 50s but not trying to be stuck in my ways so this year my development goal is to learn web app development. Interestingly, I will learn it from my mentee, who's been doing a great job using browser-based GUIs for a fleet of test and production machinery. Guess I'm the mentee now...
Re:WxPython 4.0.0 Released by mmargerum on Friday February 02, 2018 @10:14AM (#16291108)
49 here. Old c / c++ salt. Self taught go, js, and vue. I love it. Always fun to learn new approaches . After build reactive uis it will be hard to go back to building them the traditional way
Re:WxPython 4.0.0 Released by fencepost on Thursday February 01, 2018 @10:43AM (#16282613)
It's been a long time since I looked at wxpython, but does it still have a wxWebKit or similar that you could use to wrap your web app into a local compiled executable?

Edit: at a computer, this would be wx.html2, but it's a wrapper for the native platform's browser components so would vary from system to system.

Re:WxPython 4.0.0 Released by sireat on Friday February 02, 2018 @04:50AM (#16289494)
How do you keep sane in web-app development?

Rather what is the normal workflow for making UI in web-apps?

How do you keep the abstractions from leaking over?

It seems you need to keep all the CSS quirks in your head to be productive.

As a counterpoint in something like WPF, I do not need to know much or anything about XAML to produce a usable UI quickly that will not break in bizarre ways.

Same goes for PyQT, a few hours starting from scratch(ie not knowing anything about PyQT) and you can make something usable.

WxPython same thing, classes in a control such as wx.dataview look normal enough.

Re:WxPython 4.0.0 Released by cabalamat on Friday February 02, 2018 @01:11PM (#16292677)
> It seems you need to keep all the CSS quirks in your head to be productive.

Bootstrap does away with a lot of them.

Re:WxPython 4.0.0 Released by rburhum on Thursday February 01, 2018 @09:43AM (#16282124)
how about the very browser you are using to read this?
Re:WxPython 4.0.0 Released by pc86 on Friday February 02, 2018 @09:12AM (#16290589)
What are the odds cabalamat will need to write a web browser from scratch?
Re:WxPython 4.0.0 Released by cabalamat on Friday February 02, 2018 @01:11PM (#16292679)
None