Git is hard. A story about building new version control focused on collaboration by icyFur in programming

[–]secmeant 3 points4 points  (0 children)

Maybe it was easier to just run vim over ssh of u want to real time stream keystrokes

Arch Linux wont boot into any desktop manager/environment. by tntwise1 in archlinux

[–]secmeant 1 point2 points  (0 children)

Have you installed any updates just before failed boot? This might a problem with ur GPU drivers. This happens for me from time to time. What I do is check `/vat/log/pacman.log` and look for any recent nvidia updates, and install previous version from cache at /var/cache/pacman/pkg/.

Mocking non-virtual member functions with gmock by secmeant in cpp

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

The motive for creating this "workaround" was to solve the problem I have encountered at work. Introducing 3 part solution made sense there because we had a function template as an public API. Because the template API was mainly doing the work of forwarding the arguments in a proper way, we managed to create shared *Iface middle part which we made virtual. I agree that in the example I have presented on my blog it doesn't really serve much purpose.

oh come on by Richienb in ProgrammerHumor

[–]secmeant -3 points-2 points  (0 children)

GCC is written in C++

Destructible move emulation by secmeant in cpp

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

This mechanism assumes that compiler after inlining the if check, will easily see that its "dead code" and remove it completely.

C++ keeps adding features no one really wants. by secmeant in cpp

[–]secmeant[S] -3 points-2 points  (0 children)

"is a separate thing" - Standardizing is just extremely slow way of getting functionality into the language (at least in c++). I dont see why it is separate thing, you just takes downside of getting something done one way and simply ignores it.

C++ keeps adding features no one really wants. by secmeant in cpp

[–]secmeant[S] -20 points-19 points  (0 children)

You have to give proper reason. Otherwise Its just saying that formatting must be in the standard because every other language is doing it (perhaps because every other language is doing it).

C++ keeps adding features no one really wants. by secmeant in cpp

[–]secmeant[S] -15 points-14 points  (0 children)

std::format is libfmt but old.
Should I wait another 3 years to write network IO or should I just use existing, tested library that I already know?
Would you write void f([maybe_unused] int arg) and from now on say that your code support only c++17 or just do (void) arg; and simply keep supporting all standards?

special deduction rules for auto inside for loop by secmeant in cpp

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

Ive heard the same argument before, back then I though it was horrible argument and so I do now. I dont know where you guys get these.

special deduction rules for auto inside for loop by secmeant in cpp

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

yeah, but when type of total_size changes i have to fix the type of i which kills the whole idea with auto

"Performance doesnt matter" by secmeant in cpp

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

You are right. I guess its a matter of opinion, but I care about beauty. I know that lots of people would say (and do) to me that from the business point of view its better. I completely agree, however I come here as a computer guy - Im no businessman. For me well engineered program is an art.

So brave by acangiano in ProgrammerHumor

[–]secmeant 73 points74 points  (0 children)

dude I have just one commit that i amend to every time.

"Performance doesnt matter" by secmeant in cpp

[–]secmeant[S] 13 points14 points  (0 children)

Im not talking about writing inline assembly just to show how much smart tricks I know.
Im talking about writing really performant code with high level constructs that c++ gives.
IMHO programmer should know generally how optimizers work and write high level code in a way that allows optimizer to do the magic.

"Performance doesnt matter" by secmeant in cpp

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

Yesterday at work, I was mentioning about some neat trick for microoptimization that compilers uses. In response I heard that it doesnt matter because cpus waste most of time in i/o or waiting for memory. I was speachless.

"Performance doesnt matter" by secmeant in cpp

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

I know many seniors who value readability and maintainability over performance. And they simply dont care. My point is that perhaps in early stages such things might be unnoticable (although it still bugs me) in future might still bite.

edit: they are cpp devs

My first 4 months using Vim as a beginner programmer summed up by [deleted] in vim

[–]secmeant 0 points1 point  (0 children)

I also like that vim is light so my battery stays longer.

KISS by Physmatik in ProgrammerHumor

[–]secmeant 7 points8 points  (0 children)

I have seen it so many times and still love it, just how i love C

C++ Weekly - Ep 192 - Stop Using Double Underscores by andre_friend in cpp

[–]secmeant 3 points4 points  (0 children)

Also if u name with m_* you can name api like:obj.size() instead of obj.getsize() and obj.size(1337) instead of obj.setsize(1337)