11 ms·
CopperSpice, a Modern C++ Fork of Qt
- meir_yanovich 11y agogreat work! but i wander .. What is the purpose of this ? is the license is still LGPL ? if yes so ...?
- pavanky 11y agoYou can't change GPL licenses by forking the original sources. You will need to have a rewrite.
- zanny 11y ago> What is the purpose of this ? Its a fork of Qt by a guy who wants to see how much cleaner you can make the framework using a modern version of the language, it seems. Maybe it might be merged back upstream at some point to reduce complexity in the parent project, which would be nice.
- scrollaway 11y agoNo chance of it being merged back upstream. It's based on 4.x.
- asermersheim 11y ago> Its a fork of Qt by a guy who wants to see how much cleaner you can make the framework using a modern version of the language A very astute observation. Actually, it's a fork of Qt by a girl and a guy but the rest of your statement is spot on. There is no way we could merge back upstream, but that is not because we forked from 4.8. It is because statements made by several key individuals in the Qt project indicate that our changes would not be welcome and they see no reason to remove moc.
- scrollaway 11y agoWhy? And why 4.8? The 5.x branch is a far better version of Qt. This looks ridiculous. Qt is a massive framework - the work of hundreds, if not thousands, of people - and this seems to be the work of a random dev with zero backing and a 2004-style website with zero content (everything, even the 14-forum completely empty phpbb forum).
- fla 11y agoI fail to understand either, but they say: > CopperSpice has been modified to remove moc, the Qt meta object compiler. Moc was removed to simplify the build process, allow CopperSpice to be a standalone library, increase run time performance, and allow developers to utilize C++11 features. So they replaced the moc functionality with some c++11 magic ?
- zerr 11y ago> So they replaced the moc functionality with some c++11 magic ? You mean they replaced moc magic with C++11?
- cjslep 11y agoAdvanced template metaprogramming is far less common of a skill than opening a generated source file and reading source code.
- zerr 11y agoWell, one of the aim of C++11 (and 14) is to make template metaprogramming much easier.
- emsy 11y agoTo the user it shouldn't matter wether you use a moc DSL or a template DSL. If you're a developer, you'll have to learn the innards of the moc on top of C++, which already contains templating anyway. When I first saw the signal/slot API, I wondered how they solved it and was dissappointed that they used a standalone tool for something that could've been solved with standard C++.
- stevejones 11y agoC++ is a far more common skill than moc. I know C++, I can barely get my head around writing a Qt app.
- seletz 11y agoHmm. On a (quick) glance, I can't find: - a license - a repository -- I very much like to browse the code, issues, PRs ... - some tutorials -- I often judge projects by whether or not their tutorials work OOTB Unfortunately, that's how I evaluate tools. It's a big red flag for me if one of these things is missing in new projects -- especially when it's a fork (is it?) of something else. Maybe the author(s) can add these?
- cjslep 11y agoQt's Contributor Summit just ended, and one of the topics was C++11 support [0]. The key takeaway is Qt 5.6 will start the move away from C++98 towards C++11 support, though not fully C++11 mainly due to the MSVC compiler's limitations. The joy of being cross-platform. That being said, I don't immediately see the value of using CS over Qt. Binary size alone is not generally worth jumping ship from an established community. I'm also not sure why you would replace moc with template magic - moc will generally not fail (or will tell you if, say, you forgot to inherit from QObject), whereas template errors are midæval latin on a good day. The source files generated by moc have a lower bar to read through its generated code (making the Qt framework more accessible and seem less like magic), whereas templates require a very good understanding of metaprogramming (which is a less common skill). Also the 4.8 pick was an odd choice. Many significant changes that happened to 5.0 were made from a maintenance standpoint. Or "lowering technical debt" if you are playing buzzword bingo. Of all the issues, this is the biggest one in my opinion. [0] http://wiki.qt.io/QtCS2015_ModernCpp http://wiki.qt.io/QtCS2015_ModernCpp
- frozenport 11y agoOne thing broken with moc is parralel build in MSVC. I think we all agree that moc is a dirty hack and needs to go.
- slavik81 11y agoI'd blame vcbuild/msbuild for its oddly limited parallel build rules. If you feel like switching build tools, I've personally used cmake, bjam, waf and qmake /w makefiles. All parallelize on both Windows and Linux. I'd recommend cmake or qmake /w makefiles, though qbs is worth looking into. We certainly don't all agree that the moc should go. An extra compiler adds complexity to the build, but the build is fast and the generated code is simple. That said, I'm interested to look into CS's alternative.
- pjmlp 11y agoSo will Qt stop supporting commercial UNIX compilers and embedded platforms with compilers still stuck in C++98/03/partial 11?
- janoc 11y agoUhm, "modern" and "built using GNU Autotools" in a single sentence just doesn't compute. Cross-platform portability obviously isn't their goal. Oh and thank you for removing moc and replacing that with some template black magic. Yeah, you can do that, but your developers are going swear up a storm at you once they see the wonderful compilation errors that e.g. MSVC produces with templates ... But I guess they don't target professional Windows devs (cf the MinGW compilation ...). This looks very much like a classic not-invented-here syndrome project - "let's make something better by throwing out everything that made it useful". I do wonder what is the raison d'être of this project.
- easytiger 11y ago> Uhm, "modern" and "built using GNU Autotools" Autotools represents a pragmatic solution to a non trivial problem. What's your solution? Hipster like complaining? Perhaps the c/c++ eco system is too easy and straightforward for the hipster developer class?
- janoc 11y agoBefore you call someone "hipster", I suggest you actually learn something about the problem. CMake is the defacto standard for building portable C/C++ software today, there is also SCons. In fact, Qt includes its own build system called qmake. All of these offer much more than the GNU Autotools ever did. So why do these things exist when autotools are so wonderful? Well, autotools are a damn nightmare to maintain (m4 scripts anyone?) and next to impossible to use outside of the GNU ecosystem - try to use it on Windows or Android without crutches like MinGW or Cygwin. Basically, an autotools build system is pretty much unusable except on a POSIX/Unix-like platform and even then it handles only building of the package. Not a proper installation support (e.g. support for installer building/packaging), no tests, no continuous integration/compile farm support, poorly written m4 code breaks parallel compilation, etc.
- berkut 11y agoUse something like CMake which is cross-platform, works very well in most cases and a lot of cross-platform open-source C++ libs are using already.
- cpp098 11y agogreat! could you explain in detail why you want to replace MOC: "The redesign allowed us to completely remove the Qt Meta-Object Compiler (moc) system. Moc is a code generator and did not support many aspects of C++ including templates, complex data types, static type checking, and relies heavily on string comparisons. Removing moc improves run time performance, reduces the complexity of the build process, and allows more issues to be detected at compile time."
- zanny 11y agoJust as someone who uses Qt every day... because its kind of a mess? You already have your compiler preprocessor and the moc is an extra step ahead of that. When the language didn't support templating that made the moc necessary, but nowadays you can do signal / slots the Boost way with templates and without a framework-specific preprocessor to mangle the source files into a string comparison nightmare. Maybe in the purest sense the fact you cannot just do g++ <qt-program.cpp> -o <binary> kind of sucks. It just makes the whole build process implicitly complicated, and I haven't manually messed with the moc in five years so I've pretty much forgotten the syntax of baking it into homebrew makefiles.
- hobarrera 11y ago> The redesign allowed us to completely remove the Qt Meta-Object Compiler (moc) system. I recall having heard that this was one of the new goals for Qt now that we have C++ 11. Is the intention of this fork to merge back at some point? I don't see the fragmentation working out for everyone in the long run.
- sirspudd 11y agoIt is Qt 4.8 based, there is clearly zero intention of remerging it. They changed the build system! There are lots of people seeking to repackage Qt's work, add their own spin (pittance of work) and then attempt to profit off of it as a discrete product.
- asermersheim 11y agoCopperSpice is a fork of Qt 4.8 but we have evolved considerably past the Qt version we started from. We switched the build system to autotools in order to get away from the brittle and complex bootstrap system that Qt must maintain. With respect to your comment about 'a pittance of work' here are some current numbers from CopperSpice: 43426 files changed, 2062325 insertions(+), 7974133 deletions(-) Since CopperSpice is an open source project released under the GPL & LGPL, we are not looking to profit from it nor can we. Now, if someone throws money at us, we certainly will not refuse. But we did this for the love of the game.
- deleted 11y ago[deleted]
- CrLf 11y agoThe last time I used Qt was a long, long, time ago. I liked it, mainly because it avoided the STL and was cleaner. I'm not a fan of C++ (I consider it a baroque and overly complex language), but I enjoyed using Qt. So, this line seems like a drawback to me, instead of an advantage: "CopperSpice is a C++ library derived from the existing Qt 4.8 framework. Our goal was to change the core design of the libraries, leveraging template functionality and C++11 capabilities."
- cmrdporcupine 11y agoWell you should take another look at C++. The changes in the language in the last 10 years have really made it more pleasant to work with, in particular around the STL (which imho is excellently designed, but was hampered by the the language itself.) There was always a kernel of a beautiful language inside C++ trying to get out (and it wasn't C). I think the recent moves within the language have started to expose it. FWIW I have approached Qt many times and always been repulsed by its non-standard use of C++. It felt very much like the project had to be built around Qt -- with their nonstandard preprocessor, lack of embrace of the STL, etc -- rather than Qt fitting itself into existing C++ projects. I'm very picky about the style and structure of my code and I always felt like Qt imposed a huge proprietary overhead on that front. So I've avoided it. If Qt can finally drop moc, and use C++11 features, I might consider it.
- CrLf 11y agoMy perception of Qt may be based on outdated information, but not my perception of C++. It has too many features, a too high probability of two C++ programmers having chosen a different subset of the language to work with and thus barely understand each other's code. What I liked about Qt was exactly how it used nothing from C++ but the core language, adding a Java-like API on top. Non-standard was a good thing.
- eklavya 11y ago<sarcasm> Oh my god. And he/she is forcing me to use this, that too for free? Whatever will I do? Such a waste of his/her time, I demand compensation. </sarcasm> Why so much negativity people? It's a huge undertaking and an awesome accomplishment. Why shouldn't he/she do it? Remember, we are (most of us?) in it for the love of it.
- scrollaway 11y agoIt's an obscure fork of a massive project, on an outdated version, with no chance of further support, no VCS, no discussions, no background and no author here to back any of it up. The negativity really shouldn't be a surprise.
- dman 11y agoTo be perfectly honest a fork in Qt does not surprise me. Most of the people I know who are using Qt use the QWidgets api which has been neglected since 4.8 . Increasingly Qt development appears to be geared for completely new paradigms (Mobile, Scene graphs, Styling via CSS, QML, QtQuick ...) while leaving the core desktop functionality at a stand still.
- nib952051 11y agoDont be surprised but development of widgets/core libraries wasn't stopped, just fetch qtbase and inspect git logs. Keep in mind that there is QtCreator which based on QtWidgets and unlikelly will be based on something else. What kind of styling, qss? What new widget class do you need?
- weland 11y agoThe QWidgets API seemed to work just fine the last time I touched it. I'm not unhappy. I see no reason for a fork. And I've never used QML, QtQuick and all that. I played with them a little, saw absolutely no point in it, and never really needed them. But the QWidgets API is nice, stable and very well documented.
- 11y ago
- sqeaky 11y agoI find the lack of source control access the largest red flag. Where is their link to Github or something similar? Maybe I missed it, but I would expect it to be on the download page.
- simfoo 11y agoBeing one of the few developers who doesn't like the direction Digia went with Qt in the 5.x versions I welcome this
- tenfingers 11y agoCan somebody comment on the experience between transitioning from 4.8 to 5.x? I didn't see any massive advantage, and the performance of my native UIs, after porting some large projecs, were negatively affected on both Linux and Windows (that is, qt 5 added significant overhead without any user-facing benefit). I don't know what to think about QtQuick/QML, I feel like I see no significant use for them. It sounds nice to be able to push dumb logic into the UI, but then again UI and code are often tied together to the point that there's a limit of what can be done without becoming a state synchronization burden. It's also slower, which brings me to my first point. Even though Qt5 has polished some edges, the project being based on 4.8 "rings home" to me.
- cpp098 11y agoWill Qt become over-complex as C++11 itself if add more c++11 element?
- ehvatum 11y agoPresumably, Digia is following the money with their emphasis on Javascript smartphone stuff. Qt taken as a whole is profitable for Digia, I have heard. However, it's very clear that the effort directed towards Javascript on smartphones is effort not directed towards long-pressing desktop C++ Qt issues. Lack of QPainter OpenGL core profile support, for example. Because OS X GL compatibility profile supports almost nothing beyond OpenGL 2.1 and QPainter can only work in compatibility profile, a cross platform application that wants to draw into the same OpenGL context with straight OpenGL calls and QPainter is limited to OpenGL 2.1. This absolutely sucks. Of course, the javascript stuff works with GL core profile - because the effort that should have gone into QPainter instead went into stuff relevant to the javascript-land. Digia is well aware of the issue: https://bugreports.qt.io/browse/QTBUG-33535 https://bugreports.qt.io/browse/QTBUG-33535 WONTFIX, because out-of-scope. It's out of scope because anything that isn't directly and urgently required by the Javascript adventure is out of scope, I worry. The changes required are not so complex as the WONTFIX excuse would imply. Almost all of the shader code that has to be updated to replace/remove legacy calls is contained in one file: https://github.com/qtproject/qtbase/blob/dev/src/gui/opengl/qopenglengineshadersource_p.h https://github.com/qtproject/qtbase/blob/dev/src/gui/opengl/... Most of that file is not GLSL. The GLSL that is there is mostly boilerplate. It turns out that QPainter GLSL drawing is actually elegantly implemented and quite straightforward, especially in comparison to how Windows did "GPU accelerated" drawing last I looked (during the Vista days). I made decent progress with my first hack-and-slash attempt to implement core profile support in just an hour. How about a Metal backend? And a Vulkan backend? Will QtWidgets ever have either? I have been getting a lot of signals that, indeed, QtWidgets is the past, and "NO, why don't you try javascript? How about Javascript? In addition, Javascript. It's Javascript you're looking for, friend." Never mind that Qt Quick Controls are currently extremely limited... If Digia is not, in fact, making money on the Javascript side and is making money from the desktop and enterprise C++ side, I would gently suggest that more consideration should be made of the needs of existing paying customers. If Javascript really is paying the bills, then great. I'll continue not liking it, but at least the decision to go all-in on Javascript would be rational. PS, I would welcome any tips for getting a GL 4.1 context texture into a GL 2.1 context on OS X without passing the texture through main memory...
- dman 11y agoWanted to add this link by a Krita developer describing their experience porting from Qt4 to Qt5 - http://www.valdyas.org/fading/index.cgi/2015/04/06#portingkritaqt5 http://www.valdyas.org/fading/index.cgi/2015/04/06#portingkr...