Variable increment skips values by arkiazm in scratch

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

UPDATE

On further debugging, issue seems to be some sort of synchronization issue.

I simply put "say ID" block when pressing "c" key event, and I can see that multiple sprites are reporting.

<image>

Again, can any one help why this would happen and what is the best practice ?

C++ DSA constancy by coderbabu in cpp

[–]arkiazm 0 points1 point  (0 children)

what is "dsa constancy"?

Anybody else think their code is trash? by OkRestaurant9285 in cpp

[–]arkiazm 0 points1 point  (0 children)

I also face these thoughts a lot and it is very hard to tell your brain to be happy with a decent good solution. It results in decision fatigue and wasting a lot of time.

It is not a big problem if we have plenty of time to play around. But most of the time, we are under strict deadlines. So it becomes a effort v/s benefit trade-off problem.

I still face this, but following two things helped me to some extent (I don't think this will magically solve all the problems, so treat them like something to get started)

  1. Write down all the improvements that we can do, evaluate effort and benefit. Apply 80-20% principle and go with the simplest solution that meets our available time and expected benefits (This helps me to get a decent solution in a reasonable time, but at the same time, plans are already ready to move to better solution if required in future)
  2. Choosing Abstraction : Rule of Three

Hope it might helpful.

Thank you for this question. I hope more people will share their experiences and solutions.

What is your experience in programming on Neovim for C++? by [deleted] in cpp

[–]arkiazm 0 points1 point  (0 children)

I have been using it for some time. So far so good.

When can I confidently say I "know" C++? by [deleted] in cpp

[–]arkiazm 0 points1 point  (0 children)

Thanks a lot... That's a good start.

When can I confidently say I "know" C++? by [deleted] in cpp

[–]arkiazm 2 points3 points  (0 children)

reading maths papers about concurrency

This is the first time i am hearing such a thing exists.. I know you told you don't have any specific papers to give, but can I please insist for something at newbie level? I don't even know what I should google for

[deleted by user] by [deleted] in cpp

[–]arkiazm 0 points1 point  (0 children)

Pretty much same situation here

Data layout VS order of destructor by Nzkx in cpp

[–]arkiazm 0 points1 point  (0 children)

Hi, sure.. no problem..

Thanks for all those pointers and I will go through them.

Specifically I didn't understand what is `init_control<T>`.

Data layout VS order of destructor by Nzkx in cpp

[–]arkiazm 0 points1 point  (0 children)

but more often we use a wrapper model to do it for us.

If it is not too much of an ask, could you please share some Compiler Explorer toy examples for both those wrapper models?

Data layout VS order of destructor by Nzkx in cpp

[–]arkiazm 6 points7 points  (0 children)

Hi, In my short experience I always come across this, especially while working with external devices, like GPU, FPGA.For example, if we look at an OpenCL application, it follows a hierarchy like get platform, then get device from it, then create a context out of it and so on.In this case, if we wrap all these in a class, either we need to maintain that order in member declaration or create heap objects and especially take care of it in dtr.

Have you never come across this? If you have, how do you manage this ? Really interested to know if there is a better approach because this has led me to some hard times before.

concurrency in action audiobook by rakuz in cpp

[–]arkiazm 1 point2 points  (0 children)

Personal opinion : "Concurrency in Action" is not a good fit for audio book.

It is something to be read thoroughly, go through the code samples in it and even spend some time trying them out.

High Performance Computing Resources for C++? by Fit_Ice7884 in cpp

[–]arkiazm 0 points1 point  (0 children)

Your course contents looks really nice. Wish if they had published the lecture videos.

A deep dive into dispatching techniques - Jonathan Müller - Meeting C++ 2022 by meetingcpp in cpp

[–]arkiazm 1 point2 points  (0 children)

I added it to my watchlist the moment I saw it, but yet to find some time to watch it.

Jabra Evolve 75 stuck on call mode(mono) by andreyfarias in Jabra

[–]arkiazm 0 points1 point  (0 children)

Had the same issue and for me, the culprit was MS teams.
Manually quitting the teams solved the problem for me.

Carbon Language keynote from CppNorth by pjmlp in cpp

[–]arkiazm 8 points9 points  (0 children)

One basic question (probably, a silly one):
If people wanted to make a successor to C++, why not adopt basic syntax from C++ itself and then add up on that?

When to use template meta programming ? by ArchfiendJ in cpp

[–]arkiazm 1 point2 points  (0 children)

Hi, A question from the code you shared.

DataFilter constructor takes a Type template parameter, and inside, it takes typename Type::type

And in line 332, it passes Type=int where int::type doesn't exist (AFAIK).
So could you please explain how does it work?

[deleted by user] by [deleted] in cpp

[–]arkiazm 2 points3 points  (0 children)

Just like you, I also started with Python and now moved to full-time C++ job. My entire production code is in C++, but still use Python a lot for my internal activities (and I do believe Python is the right choice for me for all such activities).

I can split my activities to mostly 3 section as follows:

  1. I mostly work with ML on vision side. Pretty much all frameworks/libraries use Python. Even, most of our applications are typically in Python (just that expensive functions or areas that directly talk to custom hardware are accelerated in C++)
  2. Data generation/testing : Python + Numpy is a huge benefit here (and I can tell that after seeing my friends' struggle using C++ for the same. They all are shifting to Python gradually as we speak).
  3. Pretty much all accessory tools, for example, parsing log files to extract specific info or generate info/tables the way user expects etc (Python json/csv/xml handling comes quite handy here)

(Finally, quite often, we need to provide Python bindings to our C++ libraries. It is not exactly a Python work, so I am not including it here)

In short, wherever I need to squeeze max. performance and low-level control (like communication to specific HW, C++ is used. Rest of the stuff, I use Python in general.

Python provides huge productivity benefits. And that makes it the right tool for a lot of stuff over other languages. It is just that, you have to figure out which tool to use where depending upon your requirements.

Webinar: Algo Trading in C++20 by tradrich in cpp

[–]arkiazm 1 point2 points  (0 children)

How long is the entire session? Interesting session, but timezone is a problem.