« first day (3269 days earlier)      last day (1904 days later) » 

05:31
@Permian 0xK3ANUR33V35
 
3 hours later…
08:42
@Rick Okay so go install Ubuntu
 
3 hours later…
11:23
@Rick Have you considered getting a raspberry pi? It's one of the cheapest linux hosting options, either that or use a virtual machine.
11:56
Is it a good idea to read this if I've been learning C++ for only 3 days?
12:35
@AdamG it's just a short article, if it's interesting just read it
Skimming it, seems like it's pretty much spot on.
12:47
12
A: avoiding if statements

Stefan KendallExplain how to implement the following without an if statement or ternary logic: if ( x < 5 ) { x = 0 } else { print x; }

really
This deserves 12 points
13:27
int x;
x=3;
x > 5 && std::cout << x << std::endl;
x < 5 && ( x=0 );
std::cout<< x<< std::endl;
@Mikhail I will make the attempting
@TelKitty I am considering this too, but I have no compelling mechanical problem I need solving.
14:15
@CaptainGiraffe what if it happens to be a poetry professor like John Keating, and their grand exposition of their vigina/penis is some type of metaphor. Maybe it's a metaphor for a binary star systems being sucked into a black whole. It might show up on a quiz as part of an extra credit assignment about some greater life lesson.
Consider Michel de Montaigne
 
6 hours later…
19:56
@Puppy I double dog dare you to find fault with this
class Solution
{
public:
    static std::vector<std::string> findTopCommonSelection(std::unordered_map<std::string, std::vector<std::string>> const &friends)
    {

        std::unordered_map<std::string, size_t> preferences;
        for (const auto &selections : friends)
        {
            for (const auto &resturant : selections.second)
            {
                preferences[resturant]++;
            };
        };

        size_t maxValue = 0;
(see full text)
nwp
nwp
"It's C++ code." Easy.
(*topSelections).second
@nwp explain
nwp
nwp
That's part of your code that is commonly written topSelections->second.
@nwp that's not substantive enough criticism. Can you point to an authoritative source
nwp
nwp
An authoritative source for what? That that's the preferred syntax?
for (auto value : Solution::findTopCommonSelection(users)) unnecessarily copies all the users.
20:07
ok this one is fair ^
nwp
nwp
Maybe bring this to codereview.so. Although it might not fit their criteria because it might not count as "real code".
@nwp "real code"?
@nwp you do understand that, that just prints out the values so you can see it.
nwp
nwp
And copies strings, yes.
If you have a working piece of code from your project [..]
Is it actual code from a project rather than pseudo-code or hypothetical code?
Arguably it's demonstration code.
ofcousre it works the whole thing is there, you can copy and paste
just include the libraries
You need to install a static analysis tool like ReSharper. Both of these would show up as errors.
20:13
What did ReSharper say about how I dereferenced?
It would say you're doing it wrong
Go install the tool and upgrade your game
I don't want to pay for it
Get a trial or cuagh up $50 dollars
Basically the code you wrote and especially your response to cirticicism would disqualify you during any serious job interview
You probably can't fix your personality but you might be able to address the coding style
I don't know, I rather just get Jerry's opinion. I'll take his opinion over ReNotSoSharp
@Mikhail I accepted the second criticism
@Mikhail And I was going to accept the first criticism after you chimed in. But now I am suspicious, Do you get a discount when you refer me
nwp
nwp
@StackedCrooked This would be useful if it was installed.
Might not need to escape the * there.
20:25
Maybe one day.
But I'm really lazy right now.
nwp
nwp
/tmp/test.cpp:39:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
    for (auto value : Solution::findTopCommonSelection(users))
              ^
         const  &
@Rick Don't necessarily need to pay for tools.\
(That was clang-tidy)
@nwp I acknowledged this without the linter, I just said it was low lying fruit since I don not copy in the class method. You don't have to beat this to death
*needlessly copy in the class method
you could also say I forgot the const as well
that would be another thing, which clang would not have caught since by including it, my code would be more verbose
This is what happens when you rely on a machine to fix your code
style
@StackedCrooked did you see the new horror movie that takes place in Sweden?
21:10
@Mysticial some idiot (Supermicro) gave LTT the 64c/12T EPYC chip and a board... and yes it will run Crysis
21:22
hey, I like Supermicro
nwp
nwp
@Rick You're way too sensitive. I pointed out that you can have tools that don't cost anything to get the analysis. The point is to save you 50$, not to repeat the criticism.
@Rick Fairly easily, but I'm a little busy right now; give me like, 30 minutes ;p
@nwp I followed your advice and I installed the clang linter. However, I don't know how to feel about it. A lot of the errors just seem like noise
nwp
nwp
Turn off the ones you don't like. Some of them are indeed not useful for you.
@Puppy i"m looking forward to it :-)
do your worst
 
1 hour later…
22:59
@Mgetz So, whats a good way manage dll deployment? Right now the hardware and features my code uses is controlled by a single header with #defines. DLLs are linked as needed with a pramga(link). But I just copy all the DLLs into the target build directory, independent if they are needed. Whats a good way to do deployment in a way that results in less DLLs being copied...
23:38
watch the directory and only update the dills that change
downside you will have two copies at any one time, but you are going to copy anyway.
you can use rsync, I have used that in the past. Or you can make your own, by taping into system hooks and copying over the files that changed in size.
or you can put the dills in the build directory and use symlinks
to link to the dills in the working directory
, no copying is done in this scenario, but that's assuming you don't need more than one copy
23:54
Every time I plug in Arduino in Raspberry Pi's USB slot, I can no longer log in the pi through SSH.

« first day (3269 days earlier)      last day (1904 days later) »