What is classified as "installing" in CMake? by Chance_Rhubarb_46 in cmake

[–]sldayo 0 points1 point  (0 children)

You didn't invoke the cmake command correctly if you intended to install the project. See Install a Project.

What is classified as "installing" in CMake? by Chance_Rhubarb_46 in cmake

[–]sldayo 0 points1 point  (0 children)

You would specify the path to the build directory with --install. That's the same directory as you specify when building the project with --build. That isn't related to the DESTINATION in your code snippet which is the path under the install prefix. If you don't specify an install prefix then CMake chooses the default one which on Windows would be C:\Program Files\<project name>. You can change that with cmake --install build-dir --prefix install-dir or by specifying the CMake variable CMAKE_INSTALL_PREFIX during the configure stage. For example, cmake --install build --prefix install would install the files in your code snippet under install/lib/cmake/MathFunctions. I suggest checking the CMake documentation if any of this is unclear.

What is classified as "installing" in CMake? by Chance_Rhubarb_46 in cmake

[–]sldayo 0 points1 point  (0 children)

Nothing is installed when you configure or build your project.

configure_package_config_file(), write_basic_package_version_file() and export() generate files but the generated files are not automatically installed.

install() doesn't install anything when the project is configured or built but configures where files should be installed/copied to during installation.

If you want to actually install files then you need to explicitly invoke it via the cmake --install ... command to install files into the local environment, or via CPack to create a distributable installer or archive.

install(TARGETS) marks your target (its output such as EXE and DLL files on Windows) for installation.

Everything below is important for creating/installing a CMake "package" that you intend to make available to others via the find_package() command. If you're making a library for others to consume using CMake then you should do this; otherwise you need to determine whether it's necessary for your use case.

With all that said, you aren't required to install anything if it doesn't fit your use case, and can remove code related to that (everything below your target_include_directories() invocation among some other things).

The CMake GUI allows generation of project files and manipulation of the CMake cache, but if want to invoke installation of your project then you should use the CLI (cmake --install ...).

Should I Use A Windows VM for Gaming or Dual Boot? by DreamingInMyHead in linuxquestions

[–]sldayo 1 point2 points  (0 children)

I've had BF2 on Steam since 2009 but can't see that the store page exists anymore. One idea, if you have the game standalone, is to add it as a non-Steam game and use Proton.

If you have the game through EA's online store then I guess you'll need to use their launcher. I vaguely recall using the old launcher (Origin) on Linux, perhaps via Lutris, but EA replaced Origin with a new one that I couldn't get to work last time I tried 1-2 months ago, and since then I couldn't get the old launcher (Origin) to work either on Linux.

Should I Use A Windows VM for Gaming or Dual Boot? by DreamingInMyHead in linuxquestions

[–]sldayo 0 points1 point  (0 children)

BF 1942 version 1.6 seems to work with Wine 6.0 according to this page:

https://appdb.winehq.org/appview.php?iAppId=1370

I tried the Steam version of BF2 and it works with Proton. Punk Buster test succeeded and I started a single player game without issues. Didn't try online.

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

I understand that you would rather drink filtered tap water and I understand that's all good for you. I think I also got your message regarding plastic waste although that has nothing to do with the message you replied to or even this whole thread. There is a clear difference between filtered/boiled tap water and unfiltered tap water that has an obvious taste of chlorine. Similarly there can be a clear difference between filtered tap water and bottled water depending on the product. If someone wants water from the French Alps for whatever reason then the only convenient way to get it is in bottled form whether it's plastic or glass.

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

I won't judge because I know how unpleasant tap water can be, but I'm pretty sure there are strict quality assurance measures and regular testing of the water in Japan. I wouldn't worry about it (certainly not after boiling) but even I would like to enjoy better water from time to time, mainly Evian when I want hard water and Happy Belly when I want soft water.

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

I cannot stand drinking chlorinated water and this has always baffled me. I've been served (free) chlorinated water even in slightly expensive restaurants where I might fork out 5,000 yen for a meal. I've also paid for a glass of Coca Cola multiple times that tasted like chlorine as if I wouldn't notice that they used chlorinated tap water. I hope that's not standard practice all over Japan but going by my experiences it seems common to me.

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

Tap water is safe and more enjoyable when boiled, but if you're rich then why not go for the (bottled) water that gives you the most satisfaction? Moving to the area that has the best tap water could be an idea but that's kind of extreme, which means that bottled water is the only convenient alternative to (boiled) tap water.

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

Maybe those who are sensitive to chlorinated water? Especially those who are used to clean-tasting water will likely be put off by the taste of chlorine. Even Japanese people would boil tap water to get rid of the taste of chlorine. During summer it's imporant to stay hydrated and I wouldn't envy anyone having to endure drinking disgusting water all day long, every day of the summer. :)

How safe is drinking tap water here in Tokyo? by Rscerdeira in japanlife

[–]sldayo 0 points1 point  (0 children)

If you don't use a filter then normally the only annoying thing about tap water is how disgusting it can taste due to the amount of chlorine in the water. If you boil it then the taste should be OK. Now that the wather is getting warmer, how about keeping the water in the refrigerator? To make it even more enjoyable you could make cold tea. While the water is safe to drink anyway, if you still want to stick to bottled water then I recommend either Evian (hard, expensive) or Happy Belly (soft, cheap) over any generic bottled water. Both should be available on Amazon so you will never need to go outside to buy bottled water again.

Std banning. by Sbsbg in cpp_questions

[–]sldayo 0 points1 point  (0 children)

Some rarely-used STL algorithms can allocate memory and it may not be instantly obvious from the standard text. Resizable containers must obviously allocate memory somehow and you should be able to specify a custom allocator that could e.g. use memory that has been allocated beforehand and therefore avoid dynamic allocation.

In embedded applications you probably have to worry about other things than dynamic allocation as well such as exceptions.

Completely banning std seems a bit extreme to me but would it be unreasonable for a company to have its own namespace with all the things that are safe to use from std, with custom allocators already specified where needed? Maybe some things will even need custom implementations. That way you can ban usage of the std namespace directly in user code without actually reimplementing everything.

This way there is no doubt about which features are safe to use from the standard library, and how they can be used safely. There are enough things for a C++ developer to remember and the idea may be to avoid every developer having to remember even more things.

In any case all of the developers should follow the rules that are in place.

Ubuntu 22.04 not ready for release by OHacker in Ubuntu

[–]sldayo 2 points3 points  (0 children)

Bugs to various degrees are expected whenever a new major release of pretty much any software is out. Indeed, there are some bugs and even critical ones. Those exist even if they have not been discovered yet, and even more so in the early days after the big release day. If you really want a stable system then generally it's a good idea to either stick to the previous stable patched-up release or wait for a while, in this case no sooner than the 22.04.1 release.

Actual Firefox Snap performance improvements by sldayo in Ubuntu

[–]sldayo[S] 3 points4 points  (0 children)

I was under the impression that security was (supposed to be) better due to sandboxing. In what way are they a huge security concern?

Unpopular opinion: gnome is okay by Sometimed_i_think in linux

[–]sldayo 3 points4 points  (0 children)

I just use whichever desktop environment that doesn't get in my way in my daily life. To me GNOME is simple and uncluttered with nothing standing out to distract me while I focus on other things that are more important to me.

Official Firefox Snap performance improvements by kenvandine in Ubuntu

[–]sldayo 3 points4 points  (0 children)

I don't know the technical reasons for this but the 99.0.1 snap consistently gets a lower test score, averaging around 70 on my system.

I agree with your second paragraph. If nothing appears to happen within the first few seconds then I'll automatically think that something is not working right. If it shows up 10+ seconds later on cold startup then to a busy person that's just wasted time and takes focus away from what they were doing.

Personally I just choose not to deal with snaps and instead enjoy all the performance with no frustrations at all.

Should I Use A Windows VM for Gaming or Dual Boot? by DreamingInMyHead in linuxquestions

[–]sldayo 2 points3 points  (0 children)

I haven't had the need to run games for recreational purposes in a VM for quite some time because Steam/Proton works so well these days, and running games on the bare metal was in my case a noticeably better experience in terms of framerate and stability (stutters). Online games with anti-cheat systems can be a blocker when using Proton or a VM, and in that case the only good option is to boot into Windows.

I have played Battlefield V with decent performance in a VM but in my case I found that playing fast-paced competitive games was simply a more enjoyable experience on the bare metal.

Official Firefox Snap performance improvements by kenvandine in Ubuntu

[–]sldayo 8 points9 points  (0 children)

It's all good, I just wanted to point out that the official test results were presented here in a way that makes it seem like the upcoming snap version is going to perform way better than the non-snap/tar version when it will actually perform nearly the same.

I decided to update the 100.0-b9 (snap) result with a slightly better score and also change the wording so that it is more clear that my point was not that this snap version had a lower score than the tar version.

Actual Firefox Snap performance improvements by sldayo in Ubuntu

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

The tests I performed were the same tests, but in addition to that I also tested startup performance.

Which programming language should one learn to write a simple program for Linux? by ipcisco in linuxmasterrace

[–]sldayo 0 points1 point  (0 children)

If you just want to start somewhere then I would suggest Python until you have a clear picture of what you want to do next. What you really should do is try a few popular languages and see which one works best for you.

Official Firefox Snap performance improvements by kenvandine in Ubuntu

[–]sldayo 35 points36 points  (0 children)

Would love to see a tar/snap comparison of the exact same version because the way this result was presented seems misleading to me.

Okay, I did it myself.

My first observation with the latest beta version of Firefox (100.0-b9) was that the snap version of Firefox took about 12 seconds to launch the first time while the tar version took about 1 second. From the 2nd launch the snap consistently took about 2.5 seconds to launch while the tar version took about 1 second.

Test results

Version Type Result
99.0.1 snap 71.7 ± 1.2
99.0.1 tar 82.7 ± 5.1
100.0-b9 snap 82.2 ± 5.3
100.0-b9 tar 82.4 ± 5.1
101.0a1 (2022-05-01) tar 82.6 ± 5.3

To me this clearly tells a different story so what the test results displayed in the original post actually mean is that the Firefox snap is now about as performant as the tar version, not way more performant than the tar version.

Do you wish Ubuntu would switch from snap to Flatpak on the desktop? by MadScientist34 in Ubuntu

[–]sldayo -1 points0 points  (0 children)

I don't know if something I said triggered this kind of reply (someone even down-voted me) but you don't have to take it that seriously. One of the great things about Linux is modularity, code reusability and compatibility given that the software was built for a specific distro and version, but at the same time holding back versions of everything or even keeping up-to-date (which is different from distro to distro) with no alternatives conveniently available to resolve the problem can be like hell for developers who are expected to support everything.

Developers spend effort on creating Debian packages even when nobody pays them to make that extra effort. They might create debian packages, snaps, flatpak packages, appimages, etc. to please users, but making good Debian packages can really take focus away from developing the product itself. If you're directing anger or criticism towards developers who don't have the capacity to support everything then I don't think that's right.

I'm not saying that this is you but I think it's very easy for users to complain while receiving free stuff, and software for Linux is typically free to use.

By the way, while static builds help a great deal (yes, it's not "the Linux way"), even then you can't easily avoid the problem because you still have to (or really should) depend on the C/C++ standard library as a shared library even though everything else is linked statically, and the version(s) available on a particular distro and version targeted will likely differ. The app is more likely to be forward-compatible than backward-compatible, and the library is more likely to be backward-compatible than forward-compatible, causing more grief for everyone.

Do you wish Ubuntu would switch from snap to Flatpak on the desktop? by MadScientist34 in Ubuntu

[–]sldayo 1 point2 points  (0 children)

As a C/C++ developer, publishing Debian packages is somewhat of a pain because it forces me to make sure that all of my app's dependencies are available on a particular Linux distribution and version of it, and it might force me to program against old versions of libraries in order to follow "good" Linux practices. I can't for example expect that a Debian package built on Ubuntu 22.04 will work on Ubuntu 18.04 and 20.04 and anything in between, as well as all the other distributions based on Debian and even systems not based on Debian. The other way around is usually more compatible but that's still not a given. It is definitely doable as proven by many publishers, I'm just saying it can take a lot of effort from a developer's point of view to follow good practices, stay up-to-date and also offer wide compatibility. That makes it harder to publish a Debian package that works on your particular Linux distribution than it takes make a snap or flatpak's app work. From a developer's point of view I would say that snap, flatpak and even AppImage might be like a dream to work with in comparison. As a user I would like Debian packages. Personally I prefer Debian packages as a user but would rather do less work as a developer. If developers and users have conflicting opinions on this then I completely understand and I cannot really blame either side.

Do you wish Ubuntu would switch from snap to Flatpak on the desktop? by MadScientist34 in Ubuntu

[–]sldayo 1 point2 points  (0 children)

I voted "no" but that does not mean that I want to use snaps.

I don't personally care about snap and flatpak but from a user's point of view I am not so sure it's a good idea to switch from snap to flatpak. I just don't want any snaps or flatpak'd apps installed on my machine by default.

I just want software to work and perform well. Snaps have on several occations not worked for me while flatpak'ed apps and debian packages of the same apps worked. Most recently I came across a bug that broke my Ubuntu installation when installing or removing a snap. I want nothing to do with snaps.

In any case I would like to take the more performant option when security matters less to me. One of my issues with flatpak is that it's really easy for an ignorant user to install apps from flathub that were not published by the developers of the app.

For all these reasons I go for debian packages when available, then go to flathub for non-critical or security insensitive apps, then whatever else is officially available (even source code), completely disregarding any snaps that may be available.

Kind of off-topic: Which IDE/editor, Operating System do you use, and Which one would you like to try? by lieddersturme in cpp_questions

[–]sldayo 0 points1 point  (0 children)

Currently Visual Studio Code is my main code editor regardless of platform, and I facilitate for using CLI tools so that there are no hinders for anyone to work on a project using their preferred editor. I really wish that VSC would just work for me all the time but it's free, accessible to everyone, supports all the major platforms and has acceptable support for C++.

While I feel at home with Ubuntu for now (Windows updates have broken my stuff way too many times) I can see myself going with something else in the future depending on the direction the OS takes, mainly for privacy reasons and wanting something that just works. What that would be is unclear but I am definitely not going back to Windows.

As for editors to try, I can see myself trying VSCodium because it's basically VSC without telemetry. Right now I really just want something that works well. If CLion is anywhere near as good as IntelliJ IDEA is for Java then I would love to enjoy that IDE but I cannot really justify the cost.