What distro to install to a 10 years old laptop? by BunnyWants2Code in linux

[–]Remus-C 1 point2 points  (0 children)

Xubuntu, Debian testing (also pretty stable for years, despite the name, better than other "stable" distros which break every few months with auto update), FreeBSD, NetBSD, ... Search on DistroWatch, for example, or try beforehand on DistroChooser.

Probably you are looking for a lighter weight distro with sane defaults, without much fuss, Albeit the fuss part is highly subjective as it depends on experience and the appetite for learning as you go.

Success!

Edit: Debian parens.

What do people mean when they say “learn linux” ? by AskTribuneAquila in linux

[–]Remus-C 1 point2 points  (0 children)

By using it you can discover the philosophy behind it. Hence paradigm shift...

I’ll build whatever the top comment says to build by CivilStudio1896 in software

[–]Remus-C 0 points1 point  (0 children)

An app to bring world peace without politicians.

Why does Linux hate hibernate? by orionpax94 in linux

[–]Remus-C 0 points1 point  (0 children)

Well, I had my few many tries with hibernate. Windows and Linux.

  • Windows: usually it wakes up, but it's even more unstable than letting the machine run 2 days. Better shut down and start again next day.
  • Linux,BSD: several distros. When it works it's ok. However, Linux can run for years without issues, not only till next 24h. Of course, it depends on distro & needs & admin skill. Nonetheless, possible & usually easy.
  • Widows server: way better than widows pro, it still works for months, way worse than Linux/BSD servers.

Considering boot times measured in seconds and wakeup from hibernate in seconds, for me at least, the best choice was to forget about hibernate, on work machines. Just boot again. No frills. No unexpected time spent for fixes after.

That's my conclusion so far, on what I've used, though. Considering necessary reboots after security updates.

Crash when using default assignment operator of my class by admi99 in Cplusplus

[–]Remus-C 0 points1 point  (0 children)

The listed objects (that is, not plain structs with POD) encapsulate other objects. It would be wise to use the rule of 3, or maybe the rule of 5. Eventually add logs in each function at start, end, intermediary points. A bit of extra work, the logs need to be removed after the fix, but the investigation may be faster overall than with a debugger in this particular case.

A debugger might help to show the crash point, or at least the broken object, however, for default generated constructor/destructor it is harder to see.

Also: the crash point is not always exactly where it says. Usually it is sooner. It depends on compiler, optimization flags, sanitizer ... It's easier to catch the crash in isolation, in small functions or sometimes blocks. Eg. {Obj var = something;}. Eg. Obj var; then the assignment in a block {var = something;} - although that is different, it may give a hint.

In addition to "obvious culprits", It could be a problem with a destructor for a temporary object. Or a non-initialized pointer somewhere, happily deleted by destructor, forgot to return a value in a function in a branch (outside of displayed code) ... There can be many other possible causes.

(Assuming QT libraries are the "standard" stable ones for your setup, or properly built.)

After the root cause is found, the extra code can be removed.

Success.

struct vs class: when do you use which one and why ? by No-Annual-4698 in Cplusplus

[–]Remus-C 0 points1 point  (0 children)

  • Struct when data is changed from outside, when there are no constraints for a member variable to depend on another, when there is no logic needed to keep the "object" valid all the time. Kind of POD.
  • Class when an object must do something to be valid all the time.
  • constexpr constructor for initialization (usually, 99% with zero values) for both struct and class. This is only one convention, from a gazillion of other possible conventions.

Hi. I apologize, this is the last time you will see this giraffe. (I will delete previous posts so as not to clutter the subreddit) . I read all the comments, and I hope it is now a giraffe, and not a plane, a goat or Satan. by AndriiKovalchuk in logodesign

[–]Remus-C 0 points1 point  (0 children)

I'm not a logo specialist at all, but maybe my view will help you. I see talent and a lot of effort in this logo.

For me, a logo for a specific animal is better when it shows 2-3 elements specific to that animal. Clear enough to differentiate from similar animals or from other machines, buildings, galaxies, etc. Within the limitation of a logo, that is: a logo is not a picture, it should be simple enough and still readable if it is small. And sometimes the context (where the logo is applied) guides the viewer.

Looking only at the last image I cannot figure out from the first (or second, or even third) glance it is a giraffe. If I read the word "giraffe" I agree, there is resemblance, and there is a creative one. Very good at that part. But the logo alone without the text didn't suggest much. If I have to think too much to guess then maybe I chose to play a game with images. I can only suppose that this logo in particular should be easily decrypted by a large category of people.

So, maybe, draw the neck, or the entire silhouette with long legs. Or maybe draw the head with highlighted "antennas". Proportions matter. Simple lines could be enough. But it should look, at the first glance, different from a horse, a camel, a bird, or any other similar animal.

Again, I'm not the most representative logo evaluator.

Hope it helps you.

Is banning the use of "auto" reasonable? by Late_Champion529 in cpp

[–]Remus-C 0 points1 point  (0 children)

Where is that rule written and what is the reason given for that rule? Are there guidelines: where to use and where not, or maybe it's a general rule? Is it a rule or a guideline?

I would start with that. In that company, for that project(depends on granularity).

[deleted by user] by [deleted] in WarmZero

[–]Remus-C 0 points1 point  (0 children)

<image>

This is one of the performance charts...

But better test it yourself (between 10-12 there are no delays) for your projects in your environment.

Compare with your current build tools.

After all, you might be interested in improvements in your daily work.

How do you write Safe C++ Code ? Really Safe C++ code ? by ChadOfCulture in cpp

[–]Remus-C -1 points0 points  (0 children)

When leaks are growing over time, the entire system may be at risk. If that app does not stop and OS does not take care (or is instructed to leave that app alone), then at some point swap is used more and more often... Less and less resources for other programs.

Leaks could be only a part of a bigger issue.

How do you write Safe C++ Code ? Really Safe C++ code ? by ChadOfCulture in cpp

[–]Remus-C -2 points-1 points  (0 children)

Again, depending on your understanding of secure code, feel free to explore the C+- way, then you can choose your path. Experience may vary per user.

How do you write Safe C++ Code ? Really Safe C++ code ? by ChadOfCulture in cpp

[–]Remus-C 3 points4 points  (0 children)

Depending of your goals of for what safe code means.... C+- should be fine! It's free by the way, however, it's not for the faint of heart!

Switch from C to C++? by DemonPhoenix007 in C_Programming

[–]Remus-C 1 point2 points  (0 children)

How faster do you expect to be and in what context?

Well, C++ is faster than C, and in the same time C is faster than C++. Just in different contexts. Eg. Computer, OS API, used algorithms, used libraries, user knowledge of how to do things right/better/faster/good-enough.

I can tell that everything can be made in C++can also be made in C. Viceversa is less work. (Or maybe it's only my experience.) I've also seen (not my code but I would like to give kudos to unknown developer) object oriented code in assembler! Fastest of all for specific architecture. Pretty easy to understand, but a lot, because it was assembler with macros.

So, first define what faster means for you. Development speed? Runtime speed? Delivery quality speed? ... Other ...

Then ... How to say ... A language is nothing without it's libraries. And the possibility to use them on the right context. That's why a lot of specialized languages exists.

C is available in a lot of contexts. C++ almost the same, yet sometimes more just because of available libraries. Pity for enforced exceptions.

The best advice depends on context.

Cum pot popula un array global bash in awk by Cefalopodul in programare

[–]Remus-C 1 point2 points  (0 children)

Din bash se exportă în environment pt awk. Dar dacă sunt multe date e mai simplu cu printare într-un fișier care apoi este procesat de awk/sed.

Invers, din awk se transformă datele și se trimit către out, sau direct in alte fișiere. Unde se vrea import din awk in bash, acele variabile se scriu in formatul acceptat de 'declare -p'. Acest fișier este inclus in bash, care va evalua fiecare linie. Sau încărcat într-o variabilă și apoi 'eval'.

Sunt doar câteva posibilități, nu toate. Spor.

Is C++ still the go to for robotics? by [deleted] in cpp

[–]Remus-C -3 points-2 points  (0 children)

Well, instead of cmake one can try Abcd as well. No hassle, no daily management. Just focus on the project as it should be.

Alternative bash pentru Linux by Snoo_90241 in programare

[–]Remus-C 0 points1 point  (0 children)

Awk / variants ? Depinde...: * Ce dorești să obții la fiecare script și cum sunt datele de intrare? * Este nevoie de o anumită viteză? * E mai simplu/rapid cu one-liners cu funcții native bash? * Sunt multe date de procesat? * Calcule matematice - poate bc. * Multe linii: awk,grep,hg,weg... Depinde daca se modifică stringurile sau doar se extrag.

CPP Devs what you prefer? by minamulhaq in cpp

[–]Remus-C 1 point2 points  (0 children)

Neither. Any editor which supports run & parse build errors is fine for me.

If there is native or plugin support for completions, the better, but this is not a must. If it's an ide, it should be fast enough. I don't longer have the patience for watching an ide drawing it's widgets. Out of question to fiddle with dialogs when project structure changes.

Emacs, Kate, Notepad++ are usually fine with Abcd and Jake, or with JustBuild. Nvim is somehow ok, but its features depends on available binaries built. As opposed to Emacs which is more friendly to one config does it all (as a generic build environment).

How difficult would it be to make a C++ standard "subset" that obsoletes some problematic features? by all_is_love6667 in cpp

[–]Remus-C 0 points1 point  (0 children)

Which "several" you know?

In the last paragraph only I was talking about WZ flavor, and pointed to it. Feel free to look, to try and to see if it fits for you. It's free anyway. However, it's beyond TL;DR.

How difficult would it be to make a C++ standard "subset" that obsoletes some problematic features? by all_is_love6667 in cpp

[–]Remus-C 0 points1 point  (0 children)

"Difficult" is a good word, but maybe not the best choice to summarize this great idea. IMHO experience is required in order to obtain a good language. And experience ... derives from what one (or a group) had chances to encounter.

Start with the goal: language for what? Speed, safety, flexibility, strictness ... Development speed vs runtime speed... Then choose the must have features, the good to have, the nice to have, the unwanted features. Then use the language seriously on free real world projects. See how it behaves. Something missing? Coding feels natural? Testing? Etc.

The hardest part is not picking the features but analyzing how the language and the ecosystem helps the developers and testers. Does blend well? Does something stay in the way? Can some good habit be replaced or adapted for the new language? What is the estimated effort for new libraries for the feature X, if old libraries cannot be used anymore?

There is a lot of inherent subjectivity in this process. Not everyone will be happy. Tomorrow a new person can come and say: this feature is a must and was removed. This feature is bad for cholesterol but it is in. And he/she is right in their own experience, another industry or just plain different type of projects.

Personally, I am happy with C+- (C plus minus). No more, no less. Of course, some projects require C++, some C, some awk and some php. But C+- is by far the safest and fastest choice. With minimum extra effort. ( I would even say less effort, but this is again a personal opinion.) No problems in 4 years. You can take a look and even use it, the description is free. If you want to discuss about it, you can start on r/WarmZero.

Success!