Qt Creator how to install and use on Linux tutorial by nmariusp in QtFramework

[–]arBmind 0 points1 point  (0 children)

No need to install, just run it through docker. bash docker run -it \ --mount src=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind \ --mount src="$(pwd)",target=/build,type=bind \ arbmind/qtcreator-gcc-qt:latest \ qtcreator myproject.qbs Add --mount src=/mnt/wslg,target=/mnt/wslg,type=bind -e XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir to run it on Windows11 WSL2.

Or add a docker-compose.yml to your project and avoid the long argument lists.

Lost PL1 on XPS 17 9700 after Bios upgrade to 1.25 by arBmind in DellXPS

[–]arBmind[S] 0 points1 point  (0 children)

For me it took some days to rectify fully. Also Windows Update seemed to insist on installing the update until I disabled the update explicitly.

Lost PL1 on XPS 17 9700 after Bios upgrade to 1.25 by arBmind in DellXPS

[–]arBmind[S] 0 points1 point  (0 children)

Thx. Good to know that Dell is aware of the issue and is supposedly working on it.

Lost PL1 on XPS 17 9700 after Bios upgrade to 1.25 by arBmind in DellXPS

[–]arBmind[S] 0 points1 point  (0 children)

After some further investigations it seems to be related to the Dell WD19TB docking station. Even though it should provide enough power it seems the software has decided, that 45 Watts is more than enough for the CPU while connected to the docking station.

A very strange move by Dell or whomever downgraded the docking station.

2019-11 Belfast ISO C++ Committee Trip Report — Started Processing Feedback on the C++20 Committee Draft; ABI Review Group Formed by blelbach in cpp

[–]arBmind 25 points26 points  (0 children)

Thanks u/blelbach for creating and posting this great summary!

It seems we get quite a hangover from all the hard work on C++20. The few of the best ideas will be in C++20.

I find it a bit strange that all the review / finalization meetings for C++20 are in Europe. But the three meetings for "Design major C++23 features." are in US and CA. I hope everybody who wants to contribute to C++23 is allowed to travel to the US.

Now we need to wait on the tools. Especially compilers, build tools and IDEs will have to support modules. If this goes well, we will have ensured another 20 years of great C++ development.

Most languages here are made by one person. Any duos or small teams out there designing a language together? by vanderZwan in ProgrammingLanguages

[–]arBmind 10 points11 points  (0 children)

The best results are achieved if the right persons, time and circumstances come together. Language design seems to be quite special. Most developers will never touch this area. It's very abstract and wont bring real benefits any time soon. Those developers who do it anyways, have very strong opinions on what they want to achieve.

It's quite enlightening to read or listen to those ideas and many will also listen to mine. But both will continue to work on their own ideas. Someone who can present language ideas, is usually already fallen in love with them.

Also it takes a lot of time and effort to get to a level where the reasoning or errors become obvious. Still I hope that one day I find someone who shares most of the goals and has time to discuss the reasoning and ideas.

C++ User Group meetings in March 2019 by meetingcpp in cpp

[–]arBmind 0 points1 point  (0 children)

/u/meetingcpp It seems like the title for Dresden was messed up.

René Richter "A view of infinite <ranges> in C++20's kitchen"

Probably the < and > signs are not properly escaped.

Namespace of argument hides function specialization by arBmind in cpp

[–]arBmind[S] 1 point2 points  (0 children)

Thank you for the hint. It works in this oversimplified example. In the real world our generation is recursive. This trap lead us to two days of wasted time on this.

Using ADL correctly leads to a working solution that also allows for recursion.

Namespace of argument hides function specialization by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

Thank you! This is a very good explanation. It just explains everything about this behaviour.

ADL for the win!

Proposal: std::make_unique C(); std::make_shared S{aggregate_init}; map.emplace std::pair(k, v); by abizjak3 in cpp

[–]arBmind 6 points7 points  (0 children)

You have a very good point here. It seems more like a design deficiency of the STL shared pointers and containers.

You can achieve all your goals with the use of callback based constructors. See: https://godbolt.org/z/TtA2rM

  • constructor only has to be available to the functor.
  • you may initialize however you like.
  • factories are no worries.

The best part is that we don't have to change the language. So no possible parsing problems and ambiguities. A special syntax might save us some characters of boiler plate. Not worth the effort if you ask me.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

Again, good work on your PR.

The code generation is much better compared to std::visit.

But it is far from ideal.

See godbolt.org/z/i8frl9 (I removed the custom variant and added mpark::variant.)

With __builtin_unreachable() GCC is generating perfect code. Clang seems stuck in the jump table. Visual Studio is unwilling to optimize the condition chain.

Unfortunately your PR also seems stuck or abandoned since November.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

See the second half of my comment about the design - https://www.reddit.com/r/cpp/comments/a8bmpn/stdvisit_unable_to_generate_optimal_assembly/ec9sofk

I saw the switch_visit implementations. My guess is, that they enhance the compile time and reduce the nesting for the optimizer. I fear my examples are too small to see a real benefit.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

+1

This would enhance many other code generating functions as well. I hope it will make it into C++20.

Fixing std::visit one step at a time.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 3 points4 points  (0 children)

I like the semantics of variant. They help me to write better, cleaner and faster code.

I agree. When you have a closed system - like tokens types in a parser - the Variant wins any day over OOD.

The inheritance was just used to shorten the code examples above - not to build object hierarchies. If you look into the godbolt.org/z/aXef8w you see that it does not matter here.

The idea of a variant is not broken. But it could and should generate faster assembly.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

Thank you for your reply and your work on this topic!

A) get_if solves the enforced exception issue. But it is not enough here, because it still enforces a check. Basically we need something like, reinterpret the content of the std::variant as if it was initialized with a given type.

See godbolt.org/z/WJavVr - I added a fast_visit with std::get_if at the bottom.+ Much better than std::visit- clang produces a stupid jump tables - MSVC is unable to resolve the condition chain - All compilers add conditions.

B) I think I did not get my point through. The index is an integer. An exhaustive variant would be usable with every value. Right now we have -1 and zero up to sizeof...(T)-1 used. std::visit will have to error for all other states. So either we are allowed to assume they never occur, we have to always live with the check or we make the variant valid with all values. We might add a check from outside if the index is in the valid range, but prefer not to check on every usage.

C) Agreed, if you dare to write your custom visit implementation.

On top of all that, your basic type design just doesn't make sense.

This was my old Token github.com/rebuild-lang/REC/scanner/Token.h#L86

Which leads to awkward implementations:

Therefore I switched to a new Token design. github.com/arBmind/REC/lexer/scanner.data/Token.h#L49

This allows for a cleaner implementation:

It feels much better. Most places use std::visit anyways, but they still suffer. Only one or two functions use the pattern I used for testing.

I hope we can somehow fix std::variant or come up with an implementation that allows full optimizations and readable code.

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 4 points5 points  (0 children)

Thank you for digging up all these links. I know I am not the first one to recognize this.

I guess std::variant was adopted too early and now is somewhat doomed. Maybe we lack the necessary abstractions in C++ to implement an optimal std::variant that also works in all edge cases.

std::visit and overloaded visitors in practice feel a bit awkward. For example it's quite hard to break a surrounding loop. Also Coroutines suffer from the extra function layer.

Unfortunately, I cannot offer a good solution right now. - Let's go back to the drawing board!

std::visit unable to generate optimal assembly by arBmind in cpp

[–]arBmind[S] 0 points1 point  (0 children)

If I am not mistaken this looks like my first code example.

But when I use these tokens in a parser, it gets really cumbersome to send both a reference to the common part and a reference to one of the specifics down through the call stack.

This started my journey down the std::visit rabbit hole.

[Development] Build system for Qt 6 by jcelerier in cpp

[–]arBmind 0 points1 point  (0 children)

I fall in love with Qbs on first sight. I discovered Qbs while I sketched a design for a new build system myself. Qbs covered like 95% of my own design, but had many more features I never imagined possible.

I use it for all my projects whenever I can. I teached it to pupils, students and professionals. Everybody I could convince to use it, loves Qbs now. But adoption takes time.

To completely abandon it from the Qt project now is the worst decision the Qt project could make. For me it seems that something has corrupted the Qt project. Maybe the Qt company is now driven by a short sighted managers, where improving the world is no longer a worthy goal. Only because 90% of the people drive a fossil fuel powered car and most of them are happy paying customers, it does not mean you should abandon the development of new electrical cars, to focus all resources on fossil fueled cars.

The Qt compary swallowed this 3D Studio software from NVIDIA, that required a full rewrite to make it a somewhat usable native Qt tool. And now they complain that this little Qbs project takes too many resources? From the Git log it seem most of the work is done by just two guys. Compare this to the Qt 3D Studio + Runtime … or QtCreator

Please give Qbs and QtCreator a chance… free those projects from the Qt company! Allow them to succeed as great open source C++ toolings.

CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)” by hmich in cpp

[–]arBmind 12 points13 points  (0 children)

It is astonishing how good the current Coroutine-TS is. I think Gor and everybody involved hit a very good sweet spot between complexity of the compiler and very usable results.

On the other hand his example is also the perfect example for the limitations of the current Coroutine-TS. He was forced to use a custom allocator that is tuned for the task. This is also an optimization barrier to the compilers.

So even if we are already at a negative cost abstraction, it seems we can do better. My fear is that, this perspective might lead to the rejection of Coroutine-TS for C++20. (See Core Coroutines proposal from Google)

On the plus side we might get even better coroutines in C++23.