11 ms·
GoQt
- api 11y agoAwesome, but them are going to be some fat static binaries. Of course I get the sense that shared libraries are being abandoned so that seems to be how things are going. You have to ship qt with any qt app anyway.
- SwellJoe 11y agoIt's unfortunate on Linux, but on Windows and Mac, as you note, you're already shipping your users a copy of Qt with the application. And, in the modern world of big computers (desktops and laptops), it is not all that big of a deal (I don't actually know, but I would guess it's on the order of a few MB, maybe in the tens of MBs), and from what I can tell a lot of applications are already built statically for distribution to Windows and Mac OS X.
- api 11y agoI personally think it's a complexity management problem and a version management problem. Shared libraries make sense for "timeless" stuff like math or very core system stuff, but beyond that there is too much variation both in version and in approach. Unless your target is a platform as rigidly managed as Apple, you must ship it all or you will get missing shared library errors. I do think changes in how shared libraries are shipped or managed may help. I've had ideas for ages around using cryptographic hashes but have no time to experiment with such things.
- bitwize 11y agoThw thing about Apple is they give no fucks about backwards compatibility for developers anyway. You're a developer and you're working with Apple tech, so naturally you were waiting in line in the cold to get their latest hw and sw, weren't you? This bit me on the ass when Apple forced a libstdc++ update on OS X 10.3 with a new ABI, permanently breaking all C++ compilation on my Mac. Compiling C++ programs for 10.3 was still possible, but you needed a 10.4 machine, the latest Xcode, and compatibility libraries to do it.
- forgettableuser 11y agoThat wasn't just Apple. The reason that happened was because gcc went from 3 to 4 in that time frame. gcc and C++ never guaranteed binary compatibility, especially between major versions. I had similar problems on Linux and Solaris because of that transition. My own fault (actually my employer's) for assuming binary compatibility when it was never promised.
- bitwize 11y agoIndeed, but most Linux distros of the era did not force a new-ABI libstdc++ upgrade on you, breaking C++ compilation with a mandatory security update. Apple did. Therefore I bite my thumb at them.
- gpderetta 11y agoGCC transition from 3 to 4 didn't break the ABI. The last required ABI break was 3.0 to 3.1.
- forgettableuser 11y agoI'm not being pedantic. libstdc++ was mentioned. That always can break. The ABI between g++ transitions is also platform and architecture dependent. Mac was PowerPC back then. Sun used Sparc. Not everything is always x86, even on Linux.
- gpderetta 11y agoYou are right, I had forgot that GCC broke the libstdc++ ABI between 3.3 and 3.4 (not 3.x to 4.x though). That was 12 years ago, though, the ABI has been stable ever since [1]. I still would characterize it a fairly stable ABI, not something that "can always break", especially compared with other vendors that break the library ABI every release. [1] A new libstdc++ C++11 ABI was added in GCC 5.x but it is optional even in C++11 mode.
- voltagex_ 11y agoUPX might be an option, if binary size is a concern. I agree with you on "big computers" to an extent. I just bought a temporary [1] laptop. It's beefy enough, but only has 2GB of RAM and 32GB of relatively slow flash storage [2]. Mobile broadband prices have been falling in Australia but it's still at the point where I have to thing before downloading anything >5MB. [1]: http://www.pendo.com.au/pendopad/pendopads-windows-8/pendo11-6-convertible-ultrabook-pndfwxufd11blk3-black/ http://www.pendo.com.au/pendopad/pendopads-windows-8/pendo11... (I didn't pay RRP) [2]: Okay, okay, it's still eMMC, but it feels slow.
- kuschku 11y agoIn fact, Qt’s – or even Java’s – program sizes, if you bundle the runtime and all libs, are still smaller than what is currently distributed as node-webkit apps.
- fogleman 11y agoJust built the "wiggly" example on OS X, the binary is 22 MB.
- voltagex_ 11y agoIs that stripped? What if you UPX it?
- adrusi 11y agoGo typically uses dynamic linking for interfacing with foreign functions. The static-linking-only rule doesn't go quite that far.
- rhodysurf 11y agoIt links to the qtdrv libraries it produces dynamically
- shmerl 11y agoHow does it manage C++ bindings? Rust struggled with that, and it has a lot of issues because of compiler specific name decorations and etc. https://en.wikipedia.org/wiki/Name_mangling#How_different_compilers_mangle_the_same_functions https://en.wikipedia.org/wiki/Name_mangling#How_different_co...
- pierrec 11y agoThe difficulty in importing C++ libraries from other languages don't really represent a Rust issue, but rather a C++ issue, of course. As to the very interesting question of how it's handled here, it looks like part of the project (the "qtdrv" folder) is a shared library written in C++ that includes Qt, wraps the desired functionality, and exports it as C-style symbols (with extern "C"). This is a pretty standard way of circumventing the name mangling problem. What I find interesting is that everything appears to be wrapped into a single exported function "qtdrv". Might be a wrapping technique that I'm not aware of, or maybe I'm completely misreading the source. I'm actually quite interested in knowing how the wrapping code was generated, having projects where the same kind of C++ wrapping is required.
- shmerl 11y agoI guess success of such approach depends on how well C++ logic can be wrapped in C. It's not always straightforward or even possible.
- Elv13 11y agoI haven't looked into the source, but Qt use a "MOC" pre-compilation system to generate introspection data. Once you have access to that, you don't have to mess with C++ symbols anymore. Same for the objects properties, you can get/set them by name.
- majewsky 11y agoIn principle, yes, but a) access via MOC is certainly slower than compiling a direct function call into a single `call` opcode, and b) MOC only covers signals, slots, and Q_INVOKABLE methods. For QObjects, that means that the remaining methods are not accessible. And methods for non-QObject-derived classes are also inaccessible.
- zanny 11y agoQt has evolved fantastically since Digia's acquisition. Just throughout the 5.0 series it has gained incredible feature support for almost anything from full multimedia faculties to websockets to a revitalized 3d rendering engine. And QML is such a breakout success in UI design and just general applications programming compared to the competition - if you have not, you must try coming up with a simple program idea and then try implementing it in QML. Compared to any other tech - GTK, HTML, even Android's ADT the mechanism behind QML is incredibly elegant. I dream of seeing a day in ten years or so where everyone expects right once run everywhere native look and feel applications out of Qt, a toolkit that provides you mechanism to access the full power of your target devices without having to lock yourself into whatever vendors SDK is and thus forcing you to rewrite the same program 5 times for 5 different target devices. Its not there yet - just the other week I was arguing with someone on reddit about the usability of Qt on mobile and conceded it lacks a prebaked gesture support library to easily just do a two finger swipe rather than having to use the multitoucharea type to specify how two finger motion works - but it is getting so very close.
- pjmlp 11y agoThe last time I checked, it lacked almost everything in what concerns native mobile widgets, device hardware support, OS events, background services and IPC between apps. Someone made me aware that they are now in yet another reboot for mobile support. Using C++ with standard libraries like Boost plus platform specific language is less effort than re-writing QML for each platform, which still doesn't feel native, while having anyway the work to wrap platform API ourselves.
- detaro 11y agoDoes QML have native widgets by now? When I used it last (2 years ago?) you had to make nearly all widgets yourself. Was no problem for our project, which didn't have a native environment to match, but would be an issue for normal applications.
- andresmanz 11y agoIt does, but I'm not sure if material design is ready now. There is qml-material[0] though, and it's pretty good. But: The last time I checked (maybe 5 or 6 months ago), QML/Qt Quick apps on Android took way too long to launch. I couldn't do anything about it, so haven't used it since then. [0] https://github.com/papyros/qml-material https://github.com/papyros/qml-material
- rhodysurf 11y agoWhoa cool. I was working on a fork of his original goui library and updating it for Qt5. Awesome to see this and im pumped to not have to keep working on the other fork.
- malkia 11y agoWhile Qt is awesome, I'm not so sure about it's recent license change. I know lots of people would love that, but for other programmers (stuck in big companies) this simply means that they can't use it, as not always money would be approved for commercial projects, even if the project do have a big budget.
- deleted 11y ago[deleted]
- dd9990 11y agoI'm moving towards using Qt at work. My understanding is that nothing major changed with regards to licensing recently. Why do you think it is now more restrictive?
- malkia 11y agoIt's not, but it scares company lawyers nonetheless. For example if you develop a tool for internal use, and later decide to ship to 3rd parties, or more general audience (say mod tool editor for a game).
- SwellJoe 11y agoI don't understand this comment. Isn't it still under LGPL or more liberal licenses, depending on the component, as it has always been? According to the website, it is. http://doc.qt.io/qt-5/licensing.html http://doc.qt.io/qt-5/licensing.html I see nothing in that list that seems different or that would prevent one from building commercial products on Qt without licensing fees.
- rcxdude 11y agoIt's gone from (L)GPL v2 to v3, which some companies care a lot about (e.g. Apple).
- SwellJoe 11y agoApple already refused to use LGPL v2 stuff. They refused to use anything (L)GPL in the past and now they continue to refuse to use anything (L)GPL. Apple is not a useful data point about what has changed, because they have not changed position based on v2 vs v3.
- VeilEm 11y agoThere's also https://github.com/go-qml/qml https://github.com/go-qml/qml
- brunoqc 11y agoLast commit is from a year ago.
- l1n 11y agoSo does this mean you could write a QT application in Go on Linux and cross compile the whole mess for Windows?
- archimedespi 11y agoI mean, theoretically, yes, if you're masochistic, but why wouldn't you just compile on Windows? This set of bindings even supports Windows: https://github.com/visualfc/goqt#system https://github.com/visualfc/goqt#system
- l1n 11y agoMostly because I don't have access to a copy of Windows to compile on :)
- archimedespi 11y agoTotally understand that :) Maybe https://www.appveyor.com/ https://www.appveyor.com/ would work out for you? It's free for OSS projects.
- l1n 11y ago-----BEGIN PGP MESSAGE----- Version: Keybase OpenPGP v2.0.49 Comment: https://keybase.io/crypto https://keybase.io/crypto wcFMA870sdh2nXAaAQ/8DUGGHzm2OoMPJKY2auJgRt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fnhf4W+1k4Dg888E7kCUDZWFPYk8GwBpCmzHL+15+NyU34s g67xufcEVA51LsQsTgquznR/ypCuMRB7yYE59ktBuV3vymFIMrdHG5kBknwrPYjJ HUXdzCfZcFT8nVg8NV6kqdC8ouRu7lz5IuS/kcUDSh6KHVNyCwKHhBXChLPJjjqU 90OgwIOfVvkB5E1KbBGv9eHjTHvj+8x4om01KBFZ3dINwkM5xoqcZwsttdNbQHTb tKhOAXmTelAhiOe96q+NqWV+YbxHT+M3UgedAXDdfCfK+8CHm/YuwI+aNdbTLrMp 1GS9/Avsphk6qZksRpzKtiDaE88T9uL4ZaO5iHY62WJPL2Or9w0SVcsvZzIDi6X8 +rT+5E7JkUIMymNpplmzilCcu+VmSWVtHzdUvXvvw2UFkLSRcNvi5NWwQ4HuRhuc ++RMqe1+mjhAdtwQowke1aNKgl/UfDXP2zVEigjEVsuz9H93GihoJGeIL/YTgFm0 i8L9K7IxerJ6BxmbZkBA5xDcuRFF/i85owCh7Y8pT0mZPeHb =ppm8 -----END PGP MESSAGE-----
- u14408885 11y agoWhenever I hear of a golang binding to a library implemented in C++ I'm always interested to see how they map the class hierarchy to golang's type model which doesn't have traditional inheritence. Does QT's class hierarchy map cleanly to Go? Is it just interfaces everywhere? (I'm not trying to start a language war, just genuinely curious.)
- rhodysurf 11y agoSo it uses interfaces and anonymous fields. So if you are familiar with Qt, something like QPushButton would be implemented in go by having an anonymous field for QAbstractButton which would have an anonymous field for QWidget. Furthermore, this class has to implement an interface so it can be passed around like a normal QWidget in C++ would. That was kind of a ramble, but thats the gist of it.
- josephcooney 11y agoI like LiteIDE, I will have to give this a shake.
- nickbauman 11y agoYeah someday maybe we can get a vertical split pane like other environments have had for a decade or more!
- ozzmotik 11y agomy phone is showing there being a lot of empty comments from five decades ago. clearly signs consistent with time travel.
- elcapitan 11y agoQMessageBoxWarningWithParentTitleTextButtonsStandardbutton And people make fun about Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch in Wales.