Language Selection

English French German Italian Portuguese Spanish

Programming: WebAssembly, Mozilla GFX, Qt and Python

Filed under
Development
  • WebAssembly for speed and code reuse

    Imagine translating a non-web application, written in a high-level language, into a binary module ready for the web. This translation could be done without any change whatsoever to the non-web application's source code. A browser can download the newly translated module efficiently and execute the module in the sandbox. The executing web module can interact seamlessly with other web technologies—with JavaScript (JS) in particular. Welcome to WebAssembly.

    As befits a language with assembly in the name, WebAssembly is low-level. But this low-level character encourages optimization: the just-in-time (JIT) compiler of the browser's virtual machine can translate portable WebAssembly code into fast, platform-specific machine code. A WebAssembly module thereby becomes an executable suited for compute-bound tasks such as number crunching.

    Which high-level languages compile into WebAssembly? The list is growing, but the original candidates were C, C++, and Rust. Let's call these three the systems languages, as they are meant for systems programming and high-performance applications programming. The systems languages share two features that suit them for compilation into WebAssembly. The next section gets into the details, which sets up full code examples (in C and TypeScript) together with samples from WebAssembly's own text format language.

  • Mozilla GFX: moz://gfx newsletter #47

    Hi there! Time for another mozilla graphics newsletter. In the comments section of the previous newsletter, Michael asked about the relation between WebRender and WebGL, I’ll try give a short answer here.

    Both WebRender and WebGL need access to the GPU to do their work. At the moment both of them use the OpenGL API, either directly or through ANGLE which emulates OpenGL on top of D3D11. They, however, each work with their own OpenGL context. Frames produced with WebGL are sent to WebRender as texture handles. WebRender, at the API level, has a single entry point for images, video frames, canvases, in short for every grid of pixels in some flavor of RGB format, be them CPU-side buffers or already in GPU memory as is normally the case for WebGL. In order to share textures between separate OpenGL contexts we rely on platform-specific APIs such as EGLImage and DXGI.

    Beyond that there isn’t any fancy interaction between WebGL and WebRender. The latter sees the former as a image producer just like 2D canvases, video decoders and plain static images.

  • The Titler Revamp: QML Producer in the making

    At the beginning of this month, I started testing out the new producer as I had a good, rough structure for the producer code, and was only facing a few minor problems. Initially, I was unclear about how exactly the producer is going to be used by the titler so I took a small step back and spent some time figuring out how kdenlivetitle worked, which is the producer in use.

    Initially, I faced integration problems (which are the ones you’d normally expect) when I tried to make use of the QmlRenderer library for rendering and loading QML templates – and most of them were resolved by a simple refactoring of the QmlRenderer library source code. To give an example, the producer traditionally stores the QML template in global variables which is taken as a character pointer argument (which is, again, traditional C) The QmlRenderer lib takes a QUrl as its parameters for loading the Qml file, so to solve this problem all I had to do was to overload the loadQml() method with one which could accommodate the producer’s needs – which worked perfectly fine. As a consequence, I also had to compartmentalise (further) the rendering process so now we have 3 methods which go sequentially when we want to render something using the library ( initialiseRenderParams( ) -> prepareRenderer( ) -> renderQml( ) )

    [...]

    The problem was resolved (thank you JB) finally and it was not due to OpenGL but it was simply because I hadn’t created an QApplication for the producer (which is necessary for qt producers). The whole month’s been a steep curve, definitely not easy, but, I enjoyed it!

    Right now, I have a producer which is, now, almost complete and with a little more tweaking, will be put to use, hopefully. I’m still facing a few minor issues which I hope to resolve soon and get a working producer. Once we get that, I can start work on the Kdenlive side. Let’s hope for the best!

  • How to Make a Discord Bot in Python

    In a world where video games are so important to so many people, communication and community around games are vital. Discord offers both of those and more in one well-designed package. In this tutorial, you’ll learn how to make a Discord bot in Python so that you can make the most of this fantastic platform.

  • Qt Visual Studio Tools 2.4 RC Released

    The Visual Studio Project System is widely used as the build system of choice for C++ projects in VS. Under the hood, MSBuild provides the project file format and build framework. The Qt VS Tools make use of the extensibility of MSBuild to provide design-time and build-time integration of Qt in VS projects — toward the end of the post we have a closer look at how that integration works and what changed in the new release.

    Up to this point, the Qt VS Tools extension managed its own project settings in an isolated manner. This approach prevented the integration of Qt in Visual Studio to fully benefit from the features of VS projects and MSBuild. Significantly, it was not possible to have Qt settings vary according to the build configuration (e.g. having a different list of selected Qt modules for different configurations), including Qt itself: only one version/build of Qt could be selected and would apply to all configurations, a significant drawback in the case of multi-platform projects.

    Another important limitation that users of the Qt VS Tools have reported is the lack of support for importing Qt-related settings from shared property sheet files. This feature allows settings in VS projects to be shared within a team or organization, thus providing a single source for that information. Up to now, this was not possible to do with settings managed by the Qt VS Tools.

More in Tux Machines

today's howtos

GNU/Linux in Hardware, Arduino for Amazon Surveillance

  • Jetson Nano based system can be powered over Ethernet

    Aaeon’s compact, $475 “Boxer-8222AI” embedded box runs Linux on a Jetson Nano along with 4x USB 3.1 Gen2, HDMI 2.0, RS-232, M.2, mini-PCIe, 40-pin GPIO, and 2x GbE ports, one with PoE/PD. In April, Aaeon unveiled two compact systems: the Nvidia Jetson Xavier NX-based Boxer-8251AI and similar Jetson Nano based Boxer-8221AI. At the time, the company mentioned an upcoming Boxer-8222AI, but without offering details. It has now launched the system, which runs the Ubuntu 18.04 based ACLinux 4.9 on the Jetson Nano.

  •  
  • Run the Linux command line on your iPad

    Run a virtualized system using Alpine Linux with iSH, which is open source, but must be installed using Apple's proprietary TestFlight app

  • Light[s]well is a voice-controlled custom lighting installation

    Designed by Brian Harms of NSTRMNT, Light[s]well is a beautifully crafted 4’x8′ light installation for a triple-height living room that’s voice-responsive thanks to the Arduino Alexa skill. Light[s]well is constructed out of 80/20 extrusions and fasteners, with individually addressable LED strips embedded in the channels of the structure. 74 sheets of laser-cut cardstock make up the undulating light-diffusing wave pattern. According to Harms, 30 LEDs per meter strips were used to give each gap in the cardstock two LEDs per structural metal beam, for a total of six LEDs per gap. The LEDs are controlled by a MKR1000 (via a logic level shifter) along with the Arduino IoT Cloud.

IBM/Red Hat/Fedora Leftovers

  • Red Hat Runtimes update delivers new features for Open Hybrid Cloud

    It’s that time again: the time we announce the latest updates and new features in Red Hat Runtimes. The latest release, now available, builds on the work we have done over the past year to create cloud-native, modern applications, with a focus on our work in advancing Java. Red Hat Runtimes is a part of the Red Hat Application Services portfolio and is a set of products, tools and components for developing and maintaining cloud-native applications that offers lightweight runtimes and frameworks for highly-distributed cloud architectures, such as microservices or serverless applications. We make updates on a regular basis to meet changing customer demands while providing them with the technology necessary to make business-critical decisions while remaining innovative, competitive and flexible. Check out the rest of the post to learn more about the most recent updates to Red Hat Runtimes.

  • Red Hat adopts ROLIE protocol for automated exchange of security compliance assets

    This is a primer on the implementation of the ROLIE protocol. The purpose of this report is to recommend automated processes for information exchange of various security compliance and vulnerability management assets using the ROLIE protocol and its open source implementation, Golie. [...] The ROLIE standard helps to discover and consume security content in a standard and automated way. A ROLIE implementation like the golie tool can be used by security vendors or regular users to consume vendor provided CVE content. It can be used as a way to submit checklists to benchmark validation organizations, or it can be used to host subscription-model services around security content. Have ideas on where else the ROLIE standard or the golie tool can be used or enhanced? Want to get involved in the project? Please provide your input and ideas at the GitHub project. It is very important to note that the vision of the project and tooling is to be multi-platform and multi-vendor. Contributions in any way are always and very welcomed! Note: The ROLIE standard is still in its early stages of development, and the format may change should the standard change.

  • Looking back to the future: Red Hat Enterprise Linux 7 as the OS trendsetter

    It’s hard to believe that we introduced Red Hat Enterprise Linux 7 (RHEL 7) into the market more than six years ago. RHEL 7 balanced the enterprise need for stability and compatibility with that of tangible innovation. At general availability, we believe that we dispelled the myth that the operating system is "just a commodity" and redefined the Linux operating system.

  • Discover how to build intelligent, self-correcting supply chains

    The IBM Sterling suite offers solutions for supply chain and B2B collaboration. For complete product documentation, including information on how to extend the solutions, check out the following product Knowledge Centers.

  • JupyterLab, Elyra, and quantum at JupyterCon 2020

    For this year’s JupyterCon, which is held online October 5-17, we are excited to have the opportunity to share our experience with the Jupyter ecosystem and showcase some of the contributions IBM has made during the past year.

  • Fedora 32 : Can be better? part 014.

    The GTK documentation for C # is not very up to date, I tried to use a button to change a label and I failed first time. The Fedora team could improve this to develop the development side. Here's what I've managed to do so far with GTK.

  • Marcin 'hrw' Juszkiewicz: Upgraded to Fedora 33

    I am running Fedora on my desktop since started working for Red Hat. Kind of ‘eat your own dogfood’ style despite fact that I am not active in Fedora development for some time. Fedora 33 reached Beta status so it was time to upgrade.

  • RPM 4.16.0 Release Notes
  • RPM 4.16.0 released

    Version 4.16.0 of the RPM package manager has been released.

  • AI software stack inspection with Thoth and TensorFlow

    Project Thoth develops open source tools that enhance the day-to-day life of developers and data scientists. Thoth uses machine-generated knowledge to boost the performance, security, and quality of your applications using artificial intelligence (AI) through reinforcement learning (RL). This machine-learning approach is implemented in Thoth adviser (if you want to know more, click here) and it is used by Thoth integrations to provide the software stack based on user inputs. In this article, I introduce a case study—a recent inspection of a runtime issue when importing TensorFlow 2.1.0—to demonstrate the human-machine interaction between the Thoth team and Thoth components. By following the case study from start to finish, you will learn how Thoth gathers and analyzes some of the data to provide advice to its users, including bots such as Kebechet, AI-backed continuous integration pipelines, and developers using GitHub apps.

  • Fedora 33 Beta

    Today we are looking at Fedora 33 Beta. It comes fully packed with Gnome 3.38, Linux Kernel 5.68, and uses about 1.3-1.6GB ram when idling. It comes with Wayland and Btrfs File Manager by default and is a great Beta release. As seen in the video, it is not perfect yet, but I am sure that it will be fixed! Enjoy!

  • Fedora 33 Beta Run Through

    In this video, we are looking at Fedora 33 Beta. Enjoy!

Audiocasts/Shows: Destination Linux, FLOSS Weekly, Full Circle Weekly, LINUX Unplugged, mintCast and More

  • Destination Linux 193: Lenovo Giving Linux Some Love!

    This week the DL Triforce discuss the great news of more Linux hardware from Lenovo but is there a twist to this discussion? Microsoft is bringing Edge to Linux! Is this the death of Firefox as we know it? In the Gaming section, Amazon has decided to join the Cloud Gaming Space. Is this a good move for Amazon or is Cloud Gaming ahead of its time? Later in the show we’ll give you our popular tips/tricks and software picks. Plus so much more, coming up right now on Destination Linux.

  • FLOSS Weekly 598: DemocracyLab - Tech For Good

    DemocracyLab connects tech for good projects with skilled volunteers. This non-profit sets out to empower people who use technology to advance the common good. Doc Searls and Jonathan Bennett talk with Mark Frischmuth, the founder and Executive Director of DemocracyLab. They discuss how DemocracyLab is open to not just software developers but also designers, marketers, and financial analysts, which allows projects to get made and adapted by users. The talk about the importance of technologists stepping up and using their cognitive surplus to create a better world.

  • Full Circle Weekly News #183
  • Your New Tools | LINUX Unplugged 373

    We embrace new tools to upgrade your backup game, securely move files around the network, and debunk the idea that Windows will ever be based on Linux.

  • mintCast 344.5 – “Working” from Home

    In our Innards section, we go over the working from home slash home-office setups we have.

  • Will Vifm Be My New Terminal File Manager? Maybe!

    I've been using Lf for quite a while now but I've always had Vifm just out of sight and I thought I should finally give it a shot, now it's obviously not perfect and there are some things to get used to compared to switching from ranger to lf but I think ultimately this terminal file manager deserves the praise that it gets.

  • Make BTRFS The Default Filesystem On EVERY Linux Distro

    The Fedora 33 Beta is out, and the BTRFS filesystem is the new default. Schykle thinks it's the way forward for ALL Linux distributions.