Language Selection

English French German Italian Portuguese Spanish

January 2020

Programming: IDEs, Libvirt, Lua, Rust and Python

Filed under
Development
  • Development corner: IDEs and tools that can make your coding more productive

    Every craft needs craftsmen, every craftsman needs tools. If you make a living developing code, you want a friendly ecosystem to help you achieve best results from your work. Good development software will allow you to achieve higher productivity and precision, leading to a product that is more effective and with fewer bugs. Finding the right tools is an important part of this equation. Let’s see if we can assist in the search.

  • Libvirt: adoption of GLib library to replace GNULIB & home grown code

    These problems are common to many applications / libraries that are written in C and thus there are a number of libraries that attempt to provide a high level “standard library”. The GLib library is one such effort from the GNOME project developers that has long been appealing. Some of libvirt’s internal APIs are inspired by those present in GLib, and it has been used by QEMU for a long time too. What prevented libvirt from using GLib in the past was the desire to catch, report and handle OOM errors. With the switch to aborting on OOM, the only blocker to use of GLib was eliminated.

    The decision was thus made for libvirt to adopt the GLib library in the latter part of 2019. From the POV of application developers nothing will change in libvirt. The usage of GLib is purely internal, and so doesn’t leak into public API exposed from libvirt.so, which is remains compatible with what came before. In the case of QEMU/KVM hosts at least, there is also no change in what must be installed on hosts, since GLib was already a dependency of QEMU for many years. This will ultimately be a net win, as using GLib will eliminate other code in libvirt, reducing the installation footprint on aggregate between libvirt and QEMU.

    With a large codebase such as libvirt’s, adopting GLib is a not as quick as flicking a switch. Some key pieces of libvirt functionality have been ported to use GLib APIs completely, while in other cases the work is going to be an incremental ongoing effort over a long time. This offers plenty of opportunities for new contributors to jump in and make useful changes which are fairly easily understood & straightforward to implement.

  • Excellent Free Tutorials to Learn Lua

    Lua is a lightweight, small, compact, and fast programming language designed as an embeddable scripting language. This cross-platform interpreted language has a simple syntax with powerful data description constructs. It has automatic memory management and incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping. Lua tries to help you solve problems with only hundreds of lines, or even less. To achieve this aim, Lua relies on extensibility.

    In the popularity stakes, Lua lags behind say Python, Perl, or Ruby for scripting purposes. As a barometer of its popularity, Lua is currently ranked in 41st place on the TIOBE Index (January 2020).

    Lua is not designed to develop standalone software. But Lua excels as a secondary language. Witness Lua cropping up in kernels, tools, and games. Lua was designed, from the beginning, to be integrated with software written in C and other conventional languages. But it’s also used as a standalone language.

    This language is free software distributed under the terms of the MIT license. Lua’s developers consist of a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil. The language has been in development for 26 years.

  • This Week In Rust: This Week in Rust 323

    Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. This is a weekly summary of its progress and community. Want something mentioned? Tweet us at @ThisWeekInRust or send us a pull request. Want to get involved? We love contributions.

  • Random Forests (and Extremely) in Python with scikit-learn

    In this guest post, you will learn by example how to do two popular machine learning techniques called random forest and extremely random forests. In fact, this post is an excerpt (adapted to the blog format) from the forthcoming Artificial Intelligence with Python – Second Edition: Your Complete Guide to Building Intelligent Apps using Python 3.x and TensorFlow 2. Now, before you will learn how to carry out random forests in Python with scikit-learn, you will find some brief information about the book.

  • Wing Python IDE 7.2.1 - January 29, 2020

    Wing 7.2.1 fixes debug process group termination, avoids failures seen when pasting some Python code, prevents crashing in vi browse mode when the first line of the file is blank, and fixes some other usability issues.

  • A tiny Python called Snek

    Keith Packard is no stranger to the linux.conf.au stage; he has spoken on a wide variety of topics since he started going to the conference in 2004 (which was held in Adelaide, where organizers apparently had a lot of ice cream for attendees). One of his talks at this year's conference was on an education-focused project that he has been working on for around a year: a version of Python called "Snek" targeting embedded processors. He gave a look at some of the history of his work with 10-12 year-old students that led to the development of Snek as well as some plans for the language—and hardware to run it on—moving forward.

Meet Zorin Grid: A Slick Linux Desktop Management Tool For Schools And Businesses

Filed under
Linux

If you’re a decision maker for a business, school or organization that’s been tempted to migrate your PCs to Linux now that free support has ended for Windows 7, you’ve probably identified some pain points. Desktop Linux distributions like Zorin OS are fast, secure and feature an attractive desktop that feels familiar. But you need a solution for centrally managing, securing and monitoring those PCs. You also need cross-platform software that fills the void when you make the switch permanent. That’s exactly where the newly announced Zorin Grid plans to enter the picture later this year.

Read more

Kernel: LWN Article (Outside Paywall Today) and Remembering the LAN (Way Before Wireguard)

Filed under
Linux
  • process_madvise(), pidfd capabilities, and the revenge of the PIDs

    Once upon a time, there were few ways for one process to operate upon another after its creation; sending signals and ptrace() were about it. In recent years, interest in providing ways for processes to control others has been on the increase, and the kernel's process-management API has been expanded accordingly. Along these lines, the process_madvise() system call has been proposed as a way for one process to influence how memory management is done in another. There is a new process_madvise() series which is interesting in its own right, but this series has also raised a couple of questions about how process management should be improved in general.
    The existing madvise() system call allows a process to make suggestions to the kernel about how its address space should be managed. The 5.4 kernel saw a couple of new types of advice that could be provided with madvise(): MADV_COLD and MADV_PAGEOUT. The former requests that the kernel place the indicated range of pages onto the inactive list, essentially saying that they have not been used in a long time. Those pages will thus be among the first considered for reclaim if the kernel needs memory for other purposes. MADV_PAGEOUT, instead, is a stronger statement that the indicated pages are no longer needed; it will cause them to be reclaimed immediately.

    These new requests are useful for processes that know what their future access patterns will be. But it seems that in certain environments — Android, in particular — processes lack that knowledge, but the management system does know when certain memory ranges are no longer needed. The bulk of a process's address space could be marked as MADV_COLD when that process is moved out of the foreground, for example. In such settings, letting one process call madvise() on behalf of another helps the system as a whole make the best use of its memory resources. That is the purpose behind the process_madvise() proposal.

  • KRSI and proprietary BPF programs

    The "kernel runtime security instrumentation" (or KRSI) patch set enables the attachment of BPF programs to every security hook in the kernel; LWN covered this work in December. That article focused on ABI issues, but it deferred another potential problem to our 2020 predictions: the possibility that vendors could start shipping proprietary BPF programs for use with frameworks like KRSI. Other developers did pick up on the possibility that KRSI could be abused this way, though, leading to a discussion on whether KRSI should continue to allow the loading of BPF programs that do not carry a GPL-compatible license.
    It may be surprising to some that the kernel, while allowing BPF programs to declare their license, is entirely happy to load programs that have a proprietary license. This behavior, though, is consistent with how the kernel handles loadable modules: any module can be loaded, but modules without a GPL-compatible license will not have access to many kernel symbols (any that are exported with EXPORT_SYMBOL_GPL()). BPF programs interact with the kernel through special "helper functions", each of which must be explicitly exported; these, too, can have a "GPL only" marking on them. In current kernels, about 25% of the defined helpers are restricted to GPL-licensed code.

  • Scheduling for the Android display pipeline

    The default CPU-frequency governor used by Android is schedutil, which relies on the CPU utilization of the runnable tasks to select the frequency of the CPU they execute on: the higher the utilization, the higher the frequency of the CPU when they are runnable. This governor fits so well with the needs of mobile Android devices that, in Android, it also takes care of the SCHED_RT tasks, which are normally run at the maximum frequency in mainline Linux kernels.

    Schedutil chooses the lowest frequency sufficient not to overload the system, based on the measurement of the system utilization. This solution works well when tasks are independent and are able to run in parallel. But, whenever there is a dependency — tasks that are blocked on the completion of others — the single-task utilization accounting mechanism is no longer sufficient to define the requirements of the whole task set.

    For example, in the scenario shown below, schedutil sees that RenderThread only requires 50% of a CPU's capacity, so it sets the CPU frequency to 50% of the maximum. But RenderThread cannot run until the UI thread has done its work — the two tasks cannot run in parallel — so it misses its deadline.

  • Control-flow integrity for the kernel

    Control-flow integrity (CFI) is a technique used to reduce the ability to redirect the execution of a program's code in attacker-specified ways. The Clang compiler has some features that can assist in maintaining control-flow integrity, which have been applied to the Android kernel. Kees Cook gave a talk about CFI for the Linux kernel at the recently concluded linux.conf.au in Gold Coast, Australia.

    Cook said that he thinks about CFI as a way to reduce the attack, or exploit, surface of the kernel. Most compromises of the kernel involve an attacker gaining execution control, typically using some kind of write flaw to change system memory. These write flaws come in many flavors, generally with some restrictions (e.g. can only write a single zero or only a set of fixed byte values), but in the worst case, they can be a "write anything anywhere at any time" flaw. The latter, thankfully, is relatively rare.

  • Remembering the LAN

    We can have the LAN-like experience of the 90's back again, and we can add the best parts of the 21st century internet. A safe small space of people we trust, where we can program away from the prying eyes of the multi-billion-person internet. Where the outright villainous will be kept at bay by good identity services and good crypto.

    The broader concept of virtualizing networks has existed forever: the Virtual Private Network. New protocols make VPNs better than before, Wireguard is pioneering easy and efficient tunneling between peers. Marry the VPN to identity, and make it work anywhere, and you can have a virtual 90s-style LAN made up of all your 21st century devices. Let the internet be the dumb pipe, let your endpoints determine who they will talk to based on the person at the other end.

Systemd-Homed Merged As A Fundamental Change To Linux Home Directories

Filed under
Linux

Systemd-homed has been merged as the latest (optional) fundamental change to Linux distributions in how home directories are handled.

Systemd-homed makes it easier to support migratable home directories, more self containment within home directories, better password and encryption handling, and other modern Linux home directory features.

Some of the design objectives for systemd-homed are outlined in the documentation with support for LUKS encrypted volumes, mounting home directories from a CIFS server, FSCRYPT encryption, Btrfs sub-volume handling, and making use of JSON-formatted user records.

Read more

Dino is a Decent XMPP Client for Linux Desktops

And it’s this service that Dino, a new desktop XMPP client for Linux desktops, makes use of.

A small, lightweight chat app, Dino is designed with security, privacy and openness at its core, all presented in a clean, straight-forward and user-friendly interface.

Dino is fully functional with other XMPP/Jabber clients and servers (i.e. you don’t need to be using the same app to chat) and it supports end-to-end encryption using OMEMO or OpenPGP.

Read more

FSFellowship releases sticker set 1.0 for download

Filed under
GNU
Google

FSFellowship is releasing our first stickers. These are licensed CC-BY for you to use as you see fit.

You can download an A4 PDF with four stickers to a page and then print it onto A4 label paper in your printer.

These stickers were produced with free software using LibreOffice. You can download the LibreOffice document here.

Read more

Games: Raspberry Pi, Dead Cells, ULTRAKILL, System Shock, Battle Axe, Iron Danger

Filed under
Gaming
  • Build your own first-person shooter in Unity

    Raspberry Pi Press is back with a new publication: this time, it’s Wireframe’s time to shine, with Build Your Own First-Person Shooter in Unity.

  • The Bad Seed DLC releases for Dead Cells on February 11

    One of my absolute favourite action platformers, the "RogueVania" game Dead Cells is getting a first DLC with The Bad Seed and it now has a release date of February 11.

    The Bad Seed should keep runs feeling fresh, with two new early-game biomes mixed with a bunch of new enemies and weapons plus "some unseen mechanics and a giant boss". Sounds like everything the game needs once you've played multiple tens of hours in it.

  • ULTRAKILL - a fast-paced and rather violent FPS has a Steam page up and new demo coming soon

    Retro first-person shooters as a genre and theme are very much back in action, I am super happy about this and ULTRAKILL is one that needs to be in your sights.

    Fusing together elements from the classic like Quake, with modern touches from newer games and fast-paced character action from the likes of Devil May Cry it's definitely got a unique feel to it.

    It currently has an older demo up on itch.io which we briefly covered before. Now, it has a Steam page up as it moves closer to a wider Early Access release and they've announced that a new demo will be coming soon.

  • Nightdive Studios have released some extended System Shock footage

    Excited for the System Shock remake? I certainly am! Nightdive Studios recently sent a special demo to backers but to keep the hype going for everyone else they've also doing a long new video.

    This is not the same as the demo recently released to the public, this is a bigger version that Nightdive will continue to update and backers keep hold of it until the game releases. You might want a coffee ready and the video is over an hour long but it's a good look into what to expect from this hotly anticipated System Shock reboot.

  • Battle Axe has some awesome pixel-art with gameplay inspired by Gauntlet and Golden Axe

    Currently crowdfunding on Kickstarter, Battle Axe looks impressive. A retro-themed pixel-art action adventure taking inspiration from the likes of Golden Axe, Dungeons & Dragons: Shadow over Mystara, and Knights Of The Round.

    It will be launching with Linux support, as clearly confirmed on the campaign page.

  • Tactical combat with time manipulation arrives with Iron Danger on March 25

    Today, Daedalic Entertainment and Action Squad Studios announced that their tactical combat game Iron Danger will release on March 25.

    An exciting sounding game with time manipulation mechanics and it looks pretty darn good visually too. The setting sounds equally delightful, with a mixture of nordic mythology, steampunk and tech noir. We covered this briefly back in September last year, where the developer confirmed Linux would happen. With the announcement today, Daedalic confirmed very clearly on Twitter that Linux support is in.

exGENT 2020 Linux Distro Makes Gentoo Fun to Use with the LXQt Desktop

Filed under
Linux
Gentoo

Arne Exton’s exGENT GNU/Linux distribution aims to continue the tradition of Gentoo-based live distros with a new release that puts the latest LXQt 0.14.1 desktop environment in the spotlight.

We all know by now that Gentoo is one of the hardest Linux-based operating systems to install due to packages needing to be compiled from sources locally. But the good thing about Gentoo is that it doesn’t uses a one-size fits all approach, which mens that it can be fully optimized for specific hardware.

Newcomers who want to try Gentoo Linux on their personal computer have a hard time due to the lack of Gentoo-based live distributions. Here’s where exGENT Linux comes into play, promising to offer users an up-to-date Gentoo-based live system that can be installed in a few minutes.

Read more

More in Tux Machines

LXer: Laptop Dual Boot Project Part 2

I know some of you are wondering why go through all of this when I could just install a Linux distro along side of windows and be done with it? One reason was I had to pay it off. A financed $550 laptop takes a little while to pay off. I didn't want to change the machine any while I owed money on it. And the idea of messing with a bone stock laptop using Linux sounded fun. The good thing now is that I have paid it off so it's all mine to do whatever I want with. So, for me it came down to PCLOS, Mint, SUSE or Ubuntu to install to my laptop. I tried them all 'live' from USB drives and a couple of them using VirtualBox. They are all good distros and there are many articles on why one or the other is good or better for you but for me, it came down to PCLinuxOS or Mint. Having come from Windows originally I am most comfortable with a "Windows like" environment. I think both PCLOS and Mint are two versions of that I like best. I like Mint mire but what has drawn me to PCLOS is that it is the only Linux I have tried in that the backlight on my keyboard works. It may sound dumb but it makes it easier for me being able to see the keys no matter the lighting situation I'm in. I tried to install PCLinuxOS onto my laptop and I got a "can't call method on first_usable_sector unblessed reference" error at the very beginning of the install process. I couldn't get around it and aborted the install. Time to do some research. Come to find out I have a AHCI-RAID problem. I got into the BIOS and changed the SATA configuration from RAID to AHCI but in rebooting, it wouldn't boot. So I went back into my BIOS and wrote down the configuration in the SATA settings. It says I am running the "Intel RST Premium with Intel Optane System Acceleration". I have been looking that up but haven't found much...much I understand that is. More Googling is required. I got back into the boot menu and changed the SATA config back to Intel's RAID setting and it re-booted just fine. It seems that for the moment I am able to run Linux from USB 'live' and under VirtualBox but I am unable to install it to the HD. For those who don't know the big difference AHCI and Raid , it is how they store the data to the hard drive. I'll use a sink with water filling it for the metaphor. RAID 1 offers redundancy through mirroring, i.e., data is written identically to two drives. Think of two sinks with the same water in them. RAID 0 offers no redundancy and instead uses striping, i.e., data is split across all the drives. think of two sinks with the water split between them. Half of the data goes into one drive and the other half into another drive. This means RAID 0 offers no fault tolerance; if the drives fails, the RAID unit fails. Read more

Help the FSF tech team maintain email services in freedom

The Free Software Foundation's (FSF) tech team is a small but dedicated team of three staff. With your support, and with the help of volunteers and interns, we run hundreds of services on a few dozen physical machines in four data centers. We are very excited about some of the initiatives we are working on, like deploying our upcoming forge site and other new systems, expanding our physical server deployments, and a further refresh of fsf.org. In parallel, the tech team is always working to better maintain, understand, and document our existing systems. Mastering those keeps vital systems running smoothly and lays the groundwork for future improvements. Email is a key service we provide. Besides it being one of the FSF campaigns and licensing teams' most important ways of communicating, we also support thousands of mailing lists for other free software projects, which send millions of emails per year. Free software is extremely capable in all aspects of email, and there continue to be innovative advancements in free software email programs that we are excited to explore and adopt. Read more

Android Leftovers

What Is OpenBSD? Everything You Need to Know

OpenBSD is no doubt one of the most secure operating systems on the internet. Here's what you need to know about it. Linux fans love to tout their system's security, but for one group of BSD developers, it doesn't go far enough. One version of BSD, OpenBSD, claims to be one of the most secure operating systems around. Does it live up to the hype? Let's find out. Read more