Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/23/d577870663/htdocs/techcogs/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 77

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/23/d577870663/htdocs/techcogs/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 87
software – Tech Cogs

Ubuntu 17.04 Uses Swap File Instead of Partition

Traditionally, when you install Linux, one or more partitions are created for data, and another partition is created for the swap. This is generally more secure because programs can’t directly access the data that’s kept in the swap partition.

Starting with Ubuntu 17.04, fresh installs will use a swap file instead of a swap partition by default. While this technically might not be as secure as using a swap partition, swap files aren’t really a security concern, and it will also make a number of things easier.

Using a swap file will make partitioning much easier as no swap partition needs to be created, and it will also allow the swap to grow as necessary. Swap partitions are created with a fixed size and always remain at that size, while swap files can grow as needed.

Overall, I think this is a good path for Ubuntu to take. Often, keeping things simple is a better answer.

Lists are Slow in Vala

The other day I wrote a small program in Python. Part of the program involved reading a text file, parsing the information, then appending the information line-by-line to two lists inside a loop. It worked well and it worked pretty quickly but I decided I wanted to try rewriting the program in Vala, which is a programming language somewhat similar to Java and should be fairly familiar to Java developers. Vala cross-compiles its code into C before compiling the C code so I thought recreating the program in Vala would make it even faster.

All of the normal elements of the program, reading the file, parsing it, did work fairly quickly. But appending the data to the lists was incredibly slow. Whereas the Python program was able to do it almost instantly, the Vala program took a good 15 or 20 seconds to do the same thing. I tried a number of different things to make sure it was appending the data to the lists that was causing the program to be slow, and that is indeed what it was.

The only reason I can think of for this is because Vala converts the program into C and dynamic lists aren’t something C natively supports, Vala must have to do some sort of gymnastics to get the Vala lists to work in the translated C code.

Whatever the reason, I’ll just be sticking to Python for my projects.

Thoughts and Concerns about the Ubuntu Mir Server

As much as I enjoy Linux and technology in general, I also do a lot with games and gaming. I have a gaming channel on YouTube and enjoy creating game videos. That means I need to be able to record game footage using as few system resources as possible. Certainly an external recording box is an option, but for a variety of reasons I prefer to use a software solution.

On Windows this is easy. Because I have an nVidia graphics card Shadowplay is often the best option for recording games. It’s quick and uses almost no resources.

On Linux my options are currently SimpleScreenRecorder and OBS Studio. Both recording solutions rely on the X Window system, the current graphical server used by most Linux distributions. However soon some Linux distributions will begin to ship with the Wayland server… in fact Fedora 25 already does… and Ubuntu, which is both the most popular Linux distribution and the one I primarily use… will ship with Mir, its own graphical server.

While nVidia has said they’ll write graphics drivers that work with Mir, there still aren’t any screen recording solutions for Mir. It all makes me wonder how long before screen recording solutions for Mir will be created, especially ones that work with games, and once they are, how many resources they’ll use and quick they’ll be.

Copyright ©2020 Magic Kazoo Media