News for hackers. Stuff that matters.
Re:Review: Purism Librem13 laptop by 0xcde4c3db on Sunday April 22, 2018 @10:27AM (#16896298)
> What exactly are all of you people doing with your laptops?

C/C++ project builds. Losing two cores just about doubles build times, and template-heavy C++ code makes the compiler want gigs of RAM all to itself. In principle I should do this on a desktop or server, but IT isn't on board with that.

Re:Review: Purism Librem13 laptop by nookoking on Sunday April 22, 2018 @10:35AM (#16896327)
I have to agree with the other poster on this. I only full compile once in the beginning and once at the end. Every other time, I just recompile the changed part and rebuild it with the unchanged object files.

But if you're talking about packages from source, then I agree. It's the one thing that sometimes makes me question whether or not I should upgrade. But, after a full night of compiling Qt5 from source, that lingering doubt usually vanishes.

Re:Review: Purism Librem13 laptop by gkya on Sunday April 22, 2018 @10:32AM (#16896319)
Do you do full recompilations all the time? Don't you use incremental builds? If yes, the compilation time should only rarely be a problem. But reading people's comments I feel like there are many projects out there using a shell script like "gcc -c a.cpp; gcc -c b.cpp; ...; gcc -o prog *.o" out there.
Re:Review: Purism Librem13 laptop by nine_k on Sunday April 22, 2018 @10:51AM (#16896398)
Changing something closer to the root of a large dependency tree triggers a lot of recompilation. The lack of real modules and reliance of `#include` in C++ makes dependency graphs larger than they could be.
Re:Review: Purism Librem13 laptop by gkya on Sunday April 22, 2018 @05:33PM (#16898723)
Not necessarily. Say I'm editing "bob.cc", and in the mean time edited "common.h" #included by many many files. While I'm editing "bob.cc", there is no need for me to rebuild the entire project until I want to see how it links to everything else (which can be postponed quite a bit if you have some tests); so I either run "make bob.cc" or "make test_bob.cc && ./test_bob". I don't know much C++ and all this is theoretical, but I think this is the ideal workflow with C/C++ development, and this is why incremental builds are useful, especially if the code is nicely separated into testable units.
Re:Review: Purism Librem13 laptop by 0xcde4c3db on Sunday April 22, 2018 @10:53AM (#16896405)
Not full recompilations, but when we're working on a feature release, switching git branches routinely requires a lot of files to be rebuilt due to header changes.
Re:Review: Purism Librem13 laptop by craftyguy on Sunday April 22, 2018 @02:06PM (#16897504)
ccache is your friend.
Re:Review: Purism Librem13 laptop by munin on Sunday April 22, 2018 @11:21AM (#16896534)
When you use templates, recompiling a single file can take ten minutes.
Re:Review: Purism Librem13 laptop by gkya on Sunday April 22, 2018 @11:36AM (#16896593)
Is there an open source project where I can test this? I don't know much about C++ (I know some C), and would like to see this for myself.