18 ms·
Yes. You just described modern computing.
by wickedlogic 10y ago
Yes. You just described modern computing.
- sametmax 10y agoComputing for ever. We use C to avoid writing assembly. Use Java to avoid writing C. Use Python to avoid writing Java. The world is asking for more and more software, and the resources to provide it are not following so people are taking shortcuts. Want something better ? Someone has to pay for it.
- cableshaft 10y agoYeah, but Python still doesn't seem to have a great cross-platform desktop GUI, as far as I can find. I'd prefer to code entirely in Python if I could, but I haven't liked a single GUI library I've tried for Python. Although to be fair I haven't really tried PyQT out still, but I don't like the idea of having to buy a commercial license for it.
- sametmax 10y agoPyQT is alright. Kivy as well. Or anything in any other language. But none of them are close enough to the benefit of being able to use the tone of experience from the Web UI into the desktop. Eventually all GUI app toolkit ends up with a custom MVC framework, a client/server architecture, some kind of db for persistence, their own implementation of asynchronous event and communication models and a declarative layer to create the UI without code. For the most advanced this layer separate structure and layout. Well guess what, this is what the Web has natively being doing for ever. Since the web is now the most popular platform, with millions of libs and tutorials on it, people just reused that. It just makes sense. The problem is not the concept. The problem is we should have driven this effort with a standard to sanely close the gap between the desktop and the web so that you don't have to spawn a freaking browser-engine-os for every one of your app. But no, the web is the only platform with a standard. And it flourished while all the big players created closes gardens with proprietary shitty API. And this is the result. Have you not seen Jurassic Park for god sake ? Life finds a way.
- cableshaft 10y agoYep, completely agree with everything you said. I'd love for their to be a standard on the desktop side, but until then, I'll keep using a hodge-podge of technologies depending on the project, I guess.
- Arizhel 10y agoThey should have adopted Qt; it makes it easy to write native C++ code that compiles on different platforms, so you get the performance and RAM usage of C++ but still most of the benefits that web coding offers, without so many drawbacks. (It's also quite nice to work with IMO.) It's too bad it wasn't more universally adopted, by any of the 3 major platforms (including Linux, where the all-C Gtk+ has become the standard for the most part). Instead, it seems to have found its greatest success in, ironically, small embedded devices. Devices like this simply cannot take the performance hit of something like Electron.
- ornitorrincos 10y agoI do strongly disagree with the web having the only strong standard, specially since it switched to a living standard I admit that for someone from the web electron is a godsend, but to be honest, responsiveness of the applications leave something to be desired
- wott 10y ago> But none of them are close enough to the benefit of being able to use the tone of experience from the Web UI into the desktop. Web UI is a gazillion shades of shit, please don't dump that rubbish on the desktop. Thank you. Seriously, how can one take Web UIs, the most cumbersome, unreliable, inconsistent, unreactive UIs, as examples to be followed? That's beyond me.
- brokenmachine 10y agoHaha, "a gazillion shades of shit". So true.
- tigershark 10y agoIt's completely false. The web at the beginning was a huge mess of static pages, hacked CGI scripts and no interactivity at all with the need to submit a form to trigger a full reload of the page. Everything was absolutely synchronous and a lot of times the database was accessible directly from the public interface and some pages did actually have the connection string directly in the HTML for everyone to see. I'm really not sure in which alternate reality you have seen web apps doing all that forever.
- skuzye 10y agoIf you really want to use PyQT you may try PySide which is LGPL licensed. I'm not sure whether it restricts commercial use.
- deleted 10y ago[deleted]
- lmm 10y ago> Python still doesn't seem to have a great cross-platform desktop GUI, as far as I can find. PyQt is literally the best cross-platform desktop GUI going, in any language.
- tigershark 10y agoLast time that I tried QT was a huge pain compared to WPF or other solutions, admittedly something like 5-6 years ago. And it was proprietary and it needed a licence. With all my good will I find quite difficult to believe that now PyQT is the silver bullet to write all UIs. For sure it's not for me given that I find python a pretty average language with the huge handicap of duck typing (and before someone starts, yes, I'm aware of the 'type annotations')
- lmm 10y ago> Last time that I tried QT was a huge pain compared to WPF or other solutions, admittedly something like 5-6 years ago. Shrug, I found it much nicer than anything else I'd used, but I've never used WPF (which is single-platform in any case). > And it was proprietary and it needed a licence. Neither Qt nor PyQt is proprietary in the usal sense of the word (nor were they 5-6 years ago). If you're using a non-standard definition it would probably be more productive to use a different word. > For sure it's not for me given that I find python a pretty average language with the huge handicap of duck typing (and before someone starts, yes, I'm aware of the 'type annotations') I'm a huge fan of type systems. I wish I could find a UI framework that's anywhere near as nice as PyQt for an ML-family language.
- kofejnik 10y agotake a look at https://github.com/dddomodossola/remi https://github.com/dddomodossola/remi, which transpiles python into html (kind of)
- user5994461 10y agoWe use Java because Python proved to be too slow.
- reitanqild 10y agoAnd because the IDE support (refactoring etc etc), compile time error checking and ease of use more than compensates for Java being a little bit verbose.
- sametmax 10y agoYeah, and they used C because the compilator could optimized stuff the JVM couldn't but now it can. And now Python get type hints so you can have the IDE tools you have with Java like with PyCharm. It's the circle of life.
- user5994461 10y agoNot quite correct about type hint. They are only in python 3. Everyone who adopted python 2 on sizeable codebase is likely stuck there forever, with zero annotations and none of the new tools available, and they'll never be ported back.
- sametmax 10y agoYou can use type hints with Python 2 in the form of special comments (http://mypy.readthedocs.io/en/latest/python2.html#type-checking-python-2-code http://mypy.readthedocs.io/en/latest/python2.html#type-check...). Guido has been working on the type hint project for dropbox specifically to help them to migrate 2.7 code to 3. But let's be fair, type related tooling in Python are not close to the ones you have in Java yet. It's just that eventually, everything comes around. Java got faster. C++ easier. Python ...toolier ? Etc.
- user5994461 10y agoJava got faster and got some functional features. Python broke all retro compatibility and put all existing sizeable software in a miserable deprecated state with the breaking of python 3. I don't recall C++ getting easier. The few tools and IDE still fail at decent refactoring and code completion. The C++11 movement is adding few stuff more or less useful, piling on top of the vast amount of already existing complexity.
- pducks32 10y agoWe use some hipster language and act like we're doing it just to be ironic when actually it's a super cool language.
- wvenable 10y agoI can't help but think there's a different flavor to this than with higher-level languages. This is adding a platform on top of another platform. The same objections existed years ago with Java when Swing was released. Java is a cross-platform high-level language but Swing is basically an entirely new platform. It's this platform on top of a platform that is objectionable from a performance, memory, storage, and integration perspective.
- sametmax 10y agoWe see the same thing with containers. Docker, flatpak, snap... It's just the right time for it. Languages have evolve to change the way we handle constraints like memory, speed, readability, expressivity etc. We are arriving at the pick of what languages can bring on the table. Sure we can improve things here and there, but the huge challenges now are integration, packaging, distribution, updates, communications, multi-tiers architectures and all that. So we now tweak platforms to help us with that. But because we didn't see that coming, it's not done in any structured way. It's done exactly the way we did everything since the beginning of computing, by stitching together stuff then hitting hard on it with a hammer until the job is done. This is not new. IT is a joke of an engineering field. We hack everything, don't think about the future, and then end up using the status quote. It's always has been like that.
- wvenable 10y agoI agree. Containers should be unnecessary -- all that they could provide could be done at the process level with an operating system designed to isolate computing resources appropriately. But operating systems were not historically designed for that so another (somewhat ridiculous) layer is added on top.
- coldtea 10y ago>Computing for ever. We use C to avoid writing assembly. Use Java to avoid writing C. Use Python to avoid writing Java. Yeah, but until Electron and they like, we seldom shipped desktop apps in anything than C, C++, Delphi etc even after all those decades. Which are all as close to the metal as can be. And in fact C/C++ can be as fast, or even faster than hand-rolled assembly most of the time (with few exception), so the whole premise is moot. The few Java desktop apps that were around, people used to hate as memory hogs.
- sametmax 10y agoYou bet ? I have 3 software opened right now using Python for their GUI: my rss reader, my torrent downloader and dropbox. And I got many more installed on my machine. But the thing is, even when I write something for myself, I first write a command line app, then a web service. Never a GUI, because it's such pain.
- weberc2 10y agoTo be fair, your "Python GUI apps" are a very thin wrapper around C/C++ libraries.
- sametmax 10y agoOf course. Electron is just a layer around the chrome compiled engined as well. If you want anything to display a matrix of pixels changing rapidly, you need low level performances eventually.
- weberc2 10y agoOf course, but in your case, the C/C++ libraries you're calling into aren't doing any heavy lifting, they're just making calls to an X server (or equivalent) or perhaps to a graphics card. There's no reason GTK (or the GUI portion of Qt) couldn't be implemented in Python, it's just a huge undertaking and it was started in C (or C++ as the case may be).
- 10y ago
- vbezhenar 10y agoC is generally faster, than hand-written assembly, so it doesn't make sense to write software in assembler. For macOS desktop applications are written with Objective C, which is C with fast message-passing, and doesn't trade much to speed. Swift is modern alternative, but it doesn't trade anything for speed either. For Linux applications are traditionally written with C and Gtk or with C++ and Qt. Those options are both very performant. For Windows main language for a long time was C++ and it remains supported language. There's movement to .NET, so Windows is an outlier here. But .NET is generally very performant language, it makes some tradeoffs for safety, but it has enough features to stay fast and its implementation is specifically tuned for desktop applications. The only terrible platform with slow language is Android and it's well known for its lags. There's very little desktop software written with Java and Python and usually those are specialized applications, when users don't really care about experience, but rather care about functionality. So JavaScript invasion here is unexpected and not wanted. I won't use any JavaScript desktop application, if I have choice. I don't like this technology. JavaScript and V8 made for browser with advanced sandbox capabilities. That's fine. But for desktop it's just not needed. And there's no other advantages. UI is terrible and does not conform to any standards. Performance is not good. Memory consumption is abysmal. Energy consumption is abysmal as well. If I'm about to buy application for macOS, I'm always carefully inspecting its bundle and trying to determine which technologies were used. Unless it's pure Objective C/Swift, I'm usually won't buy it. I hope, more users would do it.
- omginternets 10y ago>C is generally faster, than hand-written assembly, so it doesn't make sense to write software in assembler. That's true now. It wasn't true then. The point still stands.
- ornitorrincos 10y agoand not even true now for certain workloads, each tool for its job
- faaq 10y agohehe, you remember me, that crystal, nim and rust are invented to avoid write C ¯\_(ツ)_/¯