Language Selection

English French German Italian Portuguese Spanish

Development

Programming Leftovers

Filed under
Development
  • How to test PHP code using PHPUnit - Anto ./ Online

    PHPUnit automatically executable tests that verify your application’s behavior. Thus – you can ensure that your changes don’t break existing functionality. This post will show you how to test your PHP code using PHPUnit.

  • Latency Numbers Every Team Should Know

    We design systems around the size of delays that are expected. You may have seen the popular table “latency numbers every programmer should know” which lists some delays that are significant in technology systems we build.

    Teams are systems too. Delays in operations that teams need to perform regularly are significant to their effectiveness. We should know what they are.

    Ssh to a server on the other side of the world and you will feel frustration; delay in the feedback loop from keypress to that character displayed on the screen.

    Here’s some important feedback loops for a team, with feasible delays. I’d consider these delays tolerable by a team doing their best work (in contexts I’ve worked in). Some teams can do better, lots do worse.

    [...]

    In recent times you may have experienced the challenge of having conversations over video links with significant delays. This is even harder when the delay is variable. It’s hard to avoid talking over each other.

    Similarly, it’s pretty bad if we know it’s going to take all day to deploy a change to production. But it’s so worse if we think we can do it in 10 minutes, when it actually ends up taking all day. Flaky deployment checks, environment problems, change conflicts create unpredictable delays.

    It’s hard to get anything done when we don’t know what to expect. Like trying to hold a video conversation with someone on a train that’s passing through the occasional tunnel.

  • How I programmed a virtual gift exchange

    Every year, my wife's book club has a book exchange during the holidays. Due to the need to maintain physical distance in 2020, I created an online gift exchange for them to use during a book club videoconference. Apparently, the virtual book exchange worked out (at least, I received kind compliments from the book club members), so I decided to share this simple little hack.

  • Dirk Eddelbuettel: prrd 0.0.4: More tweaks

    The key idea of prrd is simple, and described in some more detail on its webpage and its GitHub repo. Reverse dependency checks are an important part of package development that is easily done in a (serial) loop. But these checks are also generally embarassingly parallel as there is no or little interdependency between them (besides maybe shared build depedencies). See the (dated) screenshot (running six parallel workers, arranged in split byobu session).

    This release brings several smaller tweaks and improvements to the summary report that had accumulated in my use since the last release last April. We also updated the CI runners as one does these days.

  • vrurg: A New Release Of Cro::RPC::JSON

    I don’t usually announce regular releases of my modules. But not this time. I start this new year with the new v0.1 branch of Cro::RPC::JSON. Version 0.1.1 is currently available on CPAN (will likely be replaced with fez as soon as it is ready). The release is a result of so extensive changes in the module that I had to bump its :api version to 2.

  • gfldex: Anonymous slurpers

    I have a script where I’m only interested in the last two lines of its output.

Python Programming

Filed under
Development
  • How to Create a Database in MongoDB Using Python

    There’s no doubt that Python is a powerful—and popular—programming language capable of handling any project we throw its way. It is very flexible and can adjust to suit various development environments like penetration testing to web development and machine learning.
    When coupled to large applications such as those that require databases, Python adds more functionality and can be hard to work with, especially for beginners.

    Python knows this add provides us with better ways to add databases to our projects without compromising our workflow using a simple and intuitive NoSQL database. Using Python and a popular NoSQL database, MongoDB, development becomes more comfortable and, all in all, fun.

    This article will go over various MongoDB database concepts to give you a firm understanding of what it entails. After that, we will cover how to install MongoDB on Linux and show you how to use Python to interact with MongoDB.

  • Python Script to Monitor Network Connection

    The need to have our devices always connected to the internet is becoming more of a basic need than an added privilege.

    Having applications and devices that need to log, send, and receive data to the outside world is critical. Thus, having a tool that allows you to monitor when your network goes down can help you troubleshoot the network or stop the applications before sending a bunch of log errors.

    In today’s tutorial, we will build a simple network monitor that continually monitors your internet connectivity by sending ping requests to an external resource. The script we shall create shall also keep logs of when the internet is down and the duration of the downtime:

  • How to Build a Web Traffic Monitor with Python, Flask, SQLite, and Pusher

    If you have a web application running out there on the internet, you will need to know where your visitors are coming from, the systems they’re using, and other such things.
    Although you can use services such as Google Analytics, Monster Insights, etc., it’s more fun to build a monitoring system using Python, SQL database, and Pusher for real-time data updates.

    In today’s tutorial, we’ll go over how to create such a tool using Python, Flask, and Pusher. The tutorial is a highly-customized spin-off from a tutorial published on Pusher’s official page.

Programming Leftovers

Filed under
Development
  • Eclipse OpenJ9 0.24 Released With A Ton Of Improvements - Phoronix

    In addition to Oracle's GraalVM 21.0 being released this week, the Eclipse Foundation has released OpenJ9 v0.24 as the newest feature release for their high performance JVM.

  • The 10 most popular programming languages, according to Microsoft-owned GitHub [Ed: Why do some sites still reinforce the bogus idea that only projects that Microsoft controls using an oppressive and proprietary monopoly count or exist?]
  • Carlos Garnacho: Threaded input adventures

    Mutter wasn’t always a self-contained compositor toolkit, in the past it used to rely on Clutter and Cogl libraries for all the benefits usually brought by toolkits: Being able to draw things on screen, and being able to receive input.

    In the rise of Wayland, that reliance on an external toolkit drove many of the design decisions around input management, usually involving adding support in the toolkit, and the necessary hooks so Mutter could use or modify the behavior. It was unavoidable that both sides were involved.

    Later on, Mutter merged its own copies of Clutter and Cogl, but the API barrier stayed essentially the same at first. Slowly over time, and still ongoing, we’ve been refactoring Mutter so all the code that talks to the underlying layers of your OS lives together in src/backends, taking this code away from Clutter and Cogl.

  • Partially-Formed @ Meeting C++ 2021 talk is now online

    We will also show how developers that feel uneasy about the partially-formed state can avoid them at little to no cost, neither in code readability, nor performance, and use these examples to propose a new (or old) paradigm for API design: safe and unsafe functions (in the Sean Parent sense).

  • How to implement a DevOps toolchain

    Organizations from all industries and of all sizes strive to deliver quality software solutions faster. This guarantees not only their survival but also success in the global marketplace. DevOps can help them chart an optimal course.

    DevOps is a system where different processes are supported by tools that work in a connected chain to deliver projects on time and at a lower cost.

Programming Leftovers

Filed under
Development
  • GNU Parallel 20210122 ('Capitol Riots') released

    GNU Parallel 20210122 ('Capitol Riots') has been released. It is available for download at: http://ftpmirror.gnu.org/parallel/
    Please help spreading GNU Parallel by making a testimonial video like Juan Sierra Pons: http://www.elsotanillo.net/wp-content/uploads/GnuParallel_JuanSierraPons.mp4
    It does not have to be as detailed as Juan's. It is perfectly fine if you just say your name, and what field you are using GNU Parallel for.

  • Maximizing Developer Effectiveness

    Technology is constantly becoming smarter and more powerful. I often observe that as these technologies are introduced an organization’s productivity instead of improving has reduced. This is because the technology has increased complexities and cognitive overhead to the developer, reducing their effectiveness. In this article, the first of a series, I introduce a framework for maximizing developer effectiveness. Through research I have identified key developer feedback loops, including micro-feedback loops that developers do 200 times a day. These should be optimized so they are quick, simple and impactful for developers. I will examine how some organizations have used these feedback loops to improve overall effectiveness and productivity.

  • Open-source Downloads Working Again

    Open-source downloads are working again. Users can install open-source versions of Qt framework and tools via the online installer or download the offline packages.

    Earlier this week our service provider for two important servers related to the open-source downloads had a severe hardware failure in their disk system causing a problem with open-source downloads of Qt. The problem has now been resolved and download systems are working again. Note that there are more than usual delays in using the system due to the load caused by ongoing restoring of other affected systems of the same service provider as well as the load caused by Qt users.

  • Remi Collet: PHP version 7.4.15RC2 and 8.0.2RC1 [Ed: Fedora and Enterprise Linux (RHEL / CentOS)]

    RPM of PHP version 8.0.2RC1 are available as SCL in remi-test repository and as base packages in the remi-php80-test repository for Fedora 31-33 and Enterprise Linux.

    RPM of PHP version 7.4.15RC2 are available as SCL in remi-test repository and as base packages in the remi-test repository for Fedora 32-33 or remi-php74-test repository for Fedora 31 and Enterprise Linux.

  • OASIS Open Establishes European Foundation to Advance Open Collaboration Opportunities

    OASIS Open, the international open source and open standards consortium, is pleased to announce the launch of the OASIS Open Europe Foundation (https://www.oasis-open.eu). The foundation provides a strong and dedicated European focus in setting standards for open collaboration, and allows OASIS to provide long-term sustainability for European Union research projects.

  • International Consortium Bolsters European Focus on Open Source and Open Standards Development

    OASIS Open, the international open source and open standards consortium, is pleased to announce the launch of the OASIS Open Europe Foundation (https://www.oasis-open.eu). The foundation provides a strong and dedicated European focus in setting standards for open collaboration, and allows OASIS to provide long-term sustainability for European Union research projects.

    [...]

    The OASIS Open Europe Foundation’s Board of Directors will include:

  • Laetitia Cailleteau of Accenture (France)
  • Martin Chapman of Oracle (Ireland)
  • Eva Coscia of R2M Solution (Italy)
  • Gershon Janssen, Independent Consultant (Netherlands)
  • Janna Lingenfelder of IBM (Germany)
  • Guy Martin of OASIS Open (United States)
  • Andriana Prentza of the University of Piraeus (Greece)
  • Get Started with MicroPython on Raspberry Pi Pico

    In Get Started with MicroPython on Raspberry Pi Pico, you will learn how to use the beginner-friendly language MicroPython to write programs and connect hardware to make your Raspberry Pi Pico interact with the world around it. Using these skills, you can create your own electro‑mechanical projects, whether for fun or to make your life easier.

  • Perl Weekly Challenge 96: Reverse Words and Edit Distance (and Decorators in Perl)
  • Perl weekly challenge 96
  • Mood Lighting

    The lighting in my bedroom uses Philips Hue bulbs — specifically, the coloured ones. Last night, I decided it would be nice to set the three lights in my bedroom to cycle slowly through a set of warm colours using a script.

    I didn't want harsh transitions from one colour to the next, but for the lighting to fade from one colour to the next in a smooth gradient. Also, I didn't want the three bulbs to all be the exact same colour, but wanted each bulb to be at different stage in the cycle, like they're "chasing" each other through the colours.

    So I whipped up a quick script. It requires the command-line tool hueadm to be installed and set up before we start. You can run hueadm lights to get a list of available lights, and in particular, their ID numbers.

  • This Week in Rust 374

Programming Leftovers

Filed under
Development
  • What is your favorite Linux scripting or programming language? | Enable Sysadmin

    Of all the scripting and programming language options available to you on the Linux platform, which one is your favorite?

  • When costs are nonlinear, keep it small.

    It shows Preventive Maintenance as a series of small costs. Minor repairs are a series of bigger costs, and major repairs are much bigger than that. Every maintenance delayed escalates into a minor repair and then a major repair — costs increase nonlinearly with time delay.

  • Old compilers and old bugs

    The kernel project goes out of its way to facilitate building with older toolchains. Building a kernel on a new system can be enough of a challenge as it is; being forced to install a custom toolchain first would not improve the situation. So the kernel developers try to keep it possible to build the kernel with the toolchains shipped by most distributors. There are costs to this policy though, including an inability to use newer compiler features. But, as was seen in a recent episode, building with old compilers can subject developers to old compiler bugs too.

    On January 5, Russell King reported on a problem he had been chasing for a long time. Some of his 64-bit Arm systems running 5.4 or later kernels would, on rare occasion, report a checksum failure on the ext4 root filesystem. It could take up to three months of uptime for the problem to manifest itself, making it, as King described it, "unrealistic to bisect". He had, however, found a way to more reliably reproduce the failure, making the task of finding out when the problem was introduced plausible, at least.

    Starting with King's findings, a number of developers working in the Arm subsystem looked into the issue; their efforts seemed to point out this commit as the culprit. That change, applied in 2019, relaxed the memory barriers used around I/O accessors, optimizing accesses to I/O memory. Reverting this patch made the problem go away.

  • Callback Function in C++ – Linux Hint

    A callback function is a function, which is an argument, not a parameter, in another function. The other function can be called the principal function. So two functions are involved: the principal function and the callback function itself. In the parameter list of the principal function, the declaration of the callback function without its definition is present, just as object declarations without assignment are present. The principal function is called with arguments (in main()). One of the arguments in the principal function call is the effective definition of the callback function. In C++, this argument is a reference to the definition of the callback function; it is not the actual definition. The callback function itself is actually called within the definition of the principal function.

    The basic callback function in C++ does not guarantee asynchronous behavior in a program. Asynchronous behavior is the real benefit of the callback function scheme. In the asynchronous callback function scheme, the result of the principal function should be obtained for the program before the result of the callback function is obtained. It is possible to do this in C++; however, C++ has a library called future to guarantee the behavior of the asynchronous callback function scheme.

  • Regarding the closure of rt.cpan.

    Let me preface this short post with this, I don't have the solution to this problem. Perhaps there is someone in the wider Perl space who is well placed to pick this up, but there seems to be little going on in terms of community engagement.

    In the first week of 2021 I noticed a link to this sunset message for rt.cpan behind displayed on the rt.cpan homepage. Firstly I believe the notification on the page could be highlighted better, grey on grey, on a page with lots of grey isn't exactly eye catching.

    At the time the linked article didn't contain much information, besides a date. It has since been updated with links to resources to migrate tickets elsewhere.

    A reply to my post in the perlmonks news section was concerning to me, I shortly found the infrastructure working group post on topicbox (which I find no link to on any of the perl websites, or release documentation). This thread was concerning in so much as a single volunteer has decided to step back, which is of course fine, but it doesn't seem like the option of asking the wider community if anyone would be willing to step up and take it over has been explored. It doesn't even seem to be being openly discussed.

  • Perl weekly challenge 096 - Raku
  • GNU Linux Bash – script for troubleshoot long term test testing network internet connection connectivity

    this script is intended for long term testing of reliability of network connection/connectivity

Python Programming

Filed under
Development
  • Python Deque – Linux Hint

    A deque means double-ended-queue with the addition of elements from any end; users can also remove elements from any end. This module comes from the collections library and is implemented using this module. It is generally preferable over the list where we need to have a faster method to append operations. The additions and removal can be done from both container ends. Users can add the values in the deque or remove them from both sides. They can even reverse the entire deque. The tutorial will cover all possible use cases along with elaborate examples for the ease of the users.

    We ideally use the latest version of Python for implementation that is Python x3.8, but if anyone does not have the latest version, even then they can implement it on their versions. It will generate similar results.

  • Python Eclipse and PyDev Installation – Linux Hint

    Eclipse is a framework for interactive development that is being used in software development. It comprises a base platform and an optimized environment customization plug-in framework. On the other hand, PyDev is a third-party module or plug-in, which is used in Eclipse. It is an optimized development platform that facilitates code refactoring, graphic debug, code inspection, and other functions for Python coding. If you are searching for a guide to install and configure both the tools, then you are in the right place.

  • Python Enumerate Function Tutorial – Linux Hint

    Enumerate is a Python built-in method. Enumerate() takes a set (e.g. a tuple) and returns it like an entity of enumeration. In a small statement, its significance can not be described. Although it is unfamiliar to most beginners, as well as some proficient programmers. It enables one to loop and provide an auto-counter about something. A counter is inserted by the enumerate() method as the enumerate object key.

  • Python Map() Function Tutorial – Linux Hint

    Often you may face cases where you need to execute the same procedure on all the objects of an iterable input to generate a new iterable. Python’s map() is an integrated method that enables all the objects to be interpreted and translated into an iterable instead of an explicit loop, usually referred to as mapping. Using a Python for loop is the simplest but using the map, you can also solve this issue without the need for an explicit loop(). When you’re about to implement a transformation method to each object in an iterable, map() helps translate them into a fresh iterable. One of the methods which are promoting a functional programming type in Python is a map(). In this guide, you will learn about how the map() method works with different object types.

  • What is Pony ORM and How to Get Started?

    Pony ORM is a Python programming language directory that enables people to work comfortably with objects kept as tuples in a relational database system. It enables you to deal with the information of the databank, in the form of substances/objects. In the database, there are tables having tuples of data. Conversely, when it is possible to view the data obtained from the databank in object form, it is far more useful when writing the code in an advanced-level object-oriented semantic. If you wish to work with Pony ORM, you have to go through the below-appended steps thoroughly.

Programming Leftovers

Filed under
Development
  • Spreadsheet annoyance no. 3: quotes have priority

    In an earlier post I complained about spreadsheet programs: Excel, LibreOffice Calc and Gnumeric. All of them confuse non-dates with dates, and automatically interpret certain number strings with 2 colons as [h]:mm:ss. Grrr.

  • Building your own Network Monitor with PyShark – Linux Hint

    Many tools for network analysis have existed for quite some time. Under Linux, for example, these are Wireshark, tcpdump, nload, iftop, iptraf, nethogs, bmon, tcptrack as well as speedometer and ettercap. For a detailed description of them, you may have a look at Silver Moon’s comparison [1].

    So, why not use an existing tool, and write your own one, instead? Reasons I see are a better understanding of TCP/IP network protocols, learning how to code properly, or implementing just the specific feature you need for your use case because the existing tools do not give you what you actually need. Furthermore, speed and load improvements to your application/system can also play a role that motivates you to move more in this direction.

    In the wild, there exist quite several Python libraries for network processing and analysis. For low-level programming, the socket library [2] is the key. High-level protocol-based libraries are httplib, ftplib, imaplib, and smtplib. In order to monitor network ports and the packet stream competitive candidates, are python-nmap [3], dpkt [4], and PyShark [5] are used. For both monitoring and changing the packet stream, the scapy library [6] is widely in use.

    In this article, we will have a look at the PyShark library and monitor which packages arrive at a specific network interface. As you will see below, working with PyShark is straightforward. The documentation on the project website will help you for the first steps — with it, you will achieve a usable result very quickly. However, when it comes to the nitty-gritty, more knowledge is necessary.

    PyShark can do a lot more than it seems at first sight, and unfortunately, at the time of this writing, the existing documentation does not cover that in full. This makes it unnecessarily difficult and provides a good reason to look deeper under the bonnet.

  • Roles, h'uh, what are they good for? | Jesse Shy

    What is a role? Put simply, roles are a form of code reuse. Often, the term shared behavior is used. Roles are said to be consumed and the methods ( including attribute accessors ) are flattened into the consuming class.

    One of the major benefits of roles is they attempt to solve the diamond problem encountered in multi-inheritance by requiring developers to resolve name collisions manually that arise in multi-inheritance. Don't be fooled however, roles are a form of multi-inheritance.

    I often see roles being used in ways they shouldn’t be. Let’s look at the mis-use of roles, then see an example of shared behavior.

    I’m using that word inheritance a lot for a reason, one of the two ways I see roles most often misused is to hide an inheritance nightmare.

    "Look ma, no multi-inheritance support, no problem. I’ll just throw stuff in roles and glum them on wherever I really want to use inheritance. It all sounds fancy, but I am just lumping stuff into a class cause I don’t really understand OO principals."

  • What Is a Software Developer?

    Software developers are highly sought-after tech professionals, and the demand for their skills is continually increasing. In this Life in Tech article, we’ll provide a general look at the various duties and requirements associated with the role of software developer.

    Let’s start with a basic description before getting into the nuances and specifics. Briefly, then, software developers conceive, design, and build computer programs, says ComputerScience.org. To accomplish this, they identify user needs, write and test new software, and maintain and improve it as needed. Software developers occupy crucial roles in a variety of industries, including tech, entertainment, manufacturing, finance, and government.

  • Steinar H. Gunderson: How others program

    How do others program? I realized today that I've never actually seen it; in more than 30 years of coding, I've never really watched someone else write nontrivial code over a long period of time. I only see people's finished patches—and I know that the patches I send out for review sure doesn't look much like the code I initially wrote. (There are exceptions for small bugfixes and the likes, of course.)

  • Sensible integer scale for Gonum Plot

    Over the years, I found myself multiple times using Gonum Plot. I do find it as a very good and easy to use plotting tool for Go.

    The problem I found myself, over and over, dealing with is the tickers scale. If you know before-hand the values that can be expected to be created by the application, it is very straightforward, but the majority of times, this is not the case. I often find myself creating a plotting application on data that track events that have not yet happened and cannot predict their range.

    To solve the issue, I create a package that has a struct that implements the Ticker interface and provides tickers that are usually sensible. Since this struct only works for integer scales, I called it sit, which stands for “Sensible Int Ticks”.

  • Learn JavaScript by writing a guessing game | Opensource.com

    It's pretty safe to say that most of the modern web would not exist without JavaScript. It's one of the three standard web technologies (along with HTML and CSS) and allows anyone to create much of the interactive, dynamic content we have come to expect in our experiences with the World Wide Web. From frameworks like React to data visualization libraries like D3, it's hard to imagine the web without it.

    There's a lot to learn, and a great way to begin learning this popular language is by writing a simple application to become familiar with some concepts. Recently, some Opensource.com correspondents have written about how to learn their favorite language by writing a simple guessing game, so that's a great place to start!

  • Getting your 3D ready for Qt 6

    As was previously discussed, since the 6.0.0 release of Qt, Qt 3D no longer ships as a pre-compiled module. If you need to use it on your projects, try out the new features, or just see your existing application is ready for the next chapter of Qt’s life, you need to compile Qt 3D from source.

    In order to do this, you can do it the traditional way ([cq]make ...; make; make install) or use the Conan-based system that is being pioneered with the latest version of the MaintenanceTool.

  • Qt Open-Source Downloads Temporarily Offline Due To Severe Hardware Failure

    Several readers have expressed concerned that Qt open-source downloads have disappeared but The Qt Company has now commented it's only a temporary issue due to a "severe hardware failure" in the cloud.

    Qt's open-source online installer and offline packages are not currently working for the open-source options but the commercial downloads are working. While that may raise concerns given Qt's increasing commercial focus, The Qt Company posted to their blog that this interruption around open-source package downloads is due to a reported major hardware problem at their cloud provider.

  • Efficient custom shapes in QtQuick with Rust

    Fortunally, the Qt API provides multiple ways to implement custom shapes, that depending on the needs might be enough.

    There is the Canvas API using the same API as the canvas API on the web but in QML. It’s easy to use but very slow and I wouldn’t recommend it.

    Instead of the Canvas API, from the QML side, there is the QtQuick Shapes module. This module allows creating more complex shapes directly from the QML with a straightforward declarative API. In many cases, this is good enough for the application developer but this module doesn’t offer a public C++ API.

    If you need more controls, using C++ will be required to implement custom QQuickItem. Unfortunately drawing on the GPU using QQuickItem is more complex than the QPainter API. You can’t just use commands like drawRect, but will need to convert all your shapes in triangles first. This involves a lot of maths like it can be seen in the example from the official documentation or from the KDAB tutorial (Efficient custom shapes in Qt Quick).

    A QPainer way is also available with QQuickPaintedItem, but it is slow because it renders your shape in a textured rectangle in the Scene Graph.

  • Changes to the Rustdoc team

    Recently, there have been a lot of improvements in rustdoc. It was possible thanks to our new contributors. In light of these recent contributions, a few changes were made in the rustdoc team.

  • Rustdoc performance improvements

    @jyn514 noticed a while ago that most of the work in Rustdoc is duplicated: there are actually three different abstract syntax trees (ASTs)! One for doctree, one for clean, and one is the original HIR used by the compiler. Rustdoc was spending quite a lot of time converting between them. Most of the speed improvements have come from getting rid of parts of the AST altogether.

  • Why and How to Use Optional in Java |

    The Optional object type in Java was introduced with version 8 of Java. It is used when we want to express that a value might not be known (yet) or it’s not applicable at this moment. Before Java 8 developers might have been tempted to return a null value in this case.

  • GraalVM 21.0 Released With Experimental JVM On Truffle - Phoronix

    Oracle on Tuesday released GraalVM 21.0 as the latest version of their Java VM/JDK that also supports other languages and modes of execution.

    One of the notable additions with GraalVM 21.0 is supporting Java on Truffle, as an example JVM implementation using the Truffle interpreter. GraalVM's Truffle framework is an open-source library for writing programming language interpreters. With Java on Truffle, it's of the same nature as the likes of JavaScript, Ruby, Python, and R within the GraalVM ecosystem. Java on Truffle allows for improved isolation from the host JVM, run Java bytecode in a separate context from the JVM, running in the context of a native image but with dynamically loaded bytecode allowed, and other Truffle framework features. More details about the Java on Truffle implementation via the GraalVM manual.

Programming Leftovers

Filed under
Development

  • Traps to Avoid When Reviewing Code Changes

    Reviewing code changes is an underappreciated art. It is part of most software engineers’ daily routine, but as an industry we do little towards developing it as a skill, even though it contributes directly to the quality of the software we produce.

  • How to use C++ Priority_queue? – Linux Hint

    In C++, a queue is a list data structure where the first element to be put in the list is the first element to be removed, when removal is to take place. A priority queue in C++ is similar, but has some ordering; it is the element with the greatest value that is removed first. The priority queue can still be configured so that it is the element with the least value that is removed first. Any queue must have at least the push() function and the pop() function. The push() function adds a new element at the back. For the normal queue, the pop() function removes the first element ever pushed in. For the priority queue, the pop() function removes the element with the highest priority, which could be the biggest or smallest, depending on the ordering scheme.

  • IAR Build Tools for Linux now supported by Parasoft C/C++test

    Parasoft announced its C/C++test update to support IAR Systems‘ build tools for Linux for Arm. IAR Build Tools for Linux inspired the update of Parasoft’s unified testing solution for C/C++test software development.

    With these tools combined, software developers gain the ability to configure fast and scalable CI/CD pipelines on Linux servers and automate the testing process.

  • Evaluate Spinnaker vs. Jenkins for CI/CD

    CI/CD tools like Jenkins and Spinnaker add value to application delivery pipelines. And while they share some functionality, they also have plenty of differences.

    Before diving into each tool and how they compare, it is important to grasp the various stages involved in delivering an application. Below are some of the practices that organizations employ to build and deploy applications.

  • faq: zef ecosystem

    Fez is the tool used for uploading your dists to the zef ecosystem.  Subquestion: why the name fez?  Surely it does the opposite of zef and should be named as such.

  • fez|zef - a raku ecosystem and auth

    fez is a utility for interacting with the zef ecosystem.  you can think of it as the opposite of zef. zef downloads distributions and installs them and fez uploads making them available to zef.

Programming: PureScript, C++, Lua, and Raku

Filed under
Development

  • Excellent Free Tutorials to Learn PureScript - LinuxLinks

    PureScript is a small strongly, statically typed programming language with expressive types, written in and inspired by Haskell, and compiling to Javascript. It can be used to develop web applications, server side apps, and also desktop applications with use of Electron.

  • C++ Operator Overloading – Linux Hint

    This article provides a guide to operator overloading in C++. Operator overloading is a useful and powerful feature of the C++ programming language. C++ allows overloading of most built-in operators. In this tutorial, we will use several examples to demonstrate the operator overloading mechanism.

    [...]

    The C++ language allows programmers to give special meanings to operators. This means that you can redefine the operator for user-defined data types in C++. For example, “+” is used to add built-in data types, such as int, float, etc. To add two types of user-defined data, it is necessary to overload the “+” operator.

  • Lua, a misunderstood language

    Lua is one of my favourite programming languages. I’ve used it to build a CMS for my old educational website, for creating cool IoT hardware projects, for building little games, and experimenting with network decentralisation. Still, I don’t consider myself an expert on it at all, I am at most a somewhat competent user. This is to say that I have had exposure to it in various contexts and through many years but I am not deep into its implementation or ecosystem. Because of that, it kinda pains me when I read blog posts and articles about Lua that appear to completely miss the objective and context of the language. Usually these posts read like a rant or a list of demands. Most recently, I saw a post about Lua’s Lack of Batteries on LWN and a discussion about that post on Hacker News that made me want to write back. In this post I’ll address some of the comments I’ve seen on that original article and on Hacker News.

  • A Complete Course of the Raku programming language

    This course covers all the main aspects of the language that you need to use in your daily practice. The course consists of five parts that explain the theory and offer many practical assignments. It is assumed that you try solving the tasks yourself before looking to the solution.

    If you’re only starting to learn Raku, you are advised to go through all the parts in the order they are listed in the table of contents. If you have some practice and you want to have some specific training, you are welcome to start with the desired section.

Python Programming

Filed under
Development
  • Indexing and Slicing in Python Tutorial – Linux Hint

    List is considered to be a useful feature of Python. It is handy and can be accessed using the index value of the list. Moreover, it is written inside the squared brackets. In this article, we will illustrate and check these methods of slicing and indexing in Python using Python 3.8 version.

  • Python xrange vs. range – Linux Hint

    Till the Python version 2.x, there were a total of two underlying methods used in this language to generate the list of integers within a provided range. The two methods are listed below:
    range ()
    xrange ()

    Moving forward, with the latest version of Python (3 onwards), range () was withdrawn, and xrange () was then changed into range (). Now in Python 3, there is only one function for this method, i.e., range (). In Python 3, the range () function is just another way of implementing the older version of xrange() of python 2.x. Here, we will relate the two.

  • Python File Handling – Linux Hint

    In Python, a file is a location on disk used to store information, which some names are associated with it. It is used to store data permanently in a non-volatile (non-volatile means retains data even if power loss) memory (Ex: hard disk).

  • Python Traceback Tutorial
  • Python Closures Tutorial
  • Python Descriptors Tutorial
Syndicate content

More in Tux Machines

GNU: GNU Binutils 2.36, GCC 11, and GTK 4.0

  • GNU Binutils 2.36 Released With Support For Intel AMX, AVX VNNI, Key Locker - Phoronix

    GNU Binutils 2.36 is out today as the latest version of this collection of binary utilities for Linux/open-source systems. As usual the x86_64 space for today's Binutils update is fairly eventful around supporting new CPU instructions. There is now support for AVX VNNI, HRESET, UINTR, TDX, AMX and Intel Key Locker instructions. All these additions are fairly notable for new and upcoming CPUs, especially the likes of the Advanced Matrix Extensions (AMX) and AVX (non-AVX-512) VNNI. Intel's open-source developers continue doing a good job on ensuring timely support for new CPU features in the Linux space.

  • gcc 11: libgccjit is no longer 'alpha'
  • GCC's JIT Library Is No Longer Considered "Alpha" Quality - Phoronix

    With the upcoming GCC 11 compiler release the GNU compiler's just-in-time (JIT) library is no longer considered to be of alpha quality. Libgccjit is considered production quality with GCC 11. GCC 5 was released nearly six years ago already and with that release came the introduction of this GCC JIT library initially developed by Red Hat's compiler experts. It was initially written as an embed-friendly library, to be used by bytecode interpreters and other potential use-cases with there even having been an experimental Python compiler.

  • GTK4 Toolkit Seeing More Improvements To Its OpenGL Renderer - Phoronix

    While GTK 4.0 has been released, there still is major work to look forward to with future GTK4 releases. One area seeing recent and ongoing improvements is with the toolkit's OpenGL renderer. Even though GTK4 has a Vulkan renderer, the OpenGL renderer is still of interest for cross-platform support particularly for macOS where Vulkan doesn't exist unless employing MoltenVK. There is also still legacy and other cases like the Nouveau driver stack where Vulkan isn't available, thus in 2021 working on the OpenGL renderer still pays off.

openSUSE Tumbleweed – Review of the week 2021/03

Dear Tumbleweed users and hackers, Shame on me for giving you the information about the changes in Tumbleweed during this week only now, but at least technically this is still the review of Week 03. Since the last weekly review, there have been 6 snapshots published (0114, 0115, 0118, 0119, 0120, and 0121). Read more

Intel Has A New Driver For Linux 5.12: Reporting Your Laptop's Hinge/Keyboard Angle

Intel's latest open-source Linux driver contribution is a hinge driver that is set to debut with Linux 5.12. The "hid-sensor-custom-intel-hinge" driver is for supporting a hinge sensor found in many modern Intel laptops. This sensor is able to calculate the angle of the laptop's hinge, the screen angle, and the keyboard angle relative to the horizon/ground. I hadn't realized this sensor was all that common these days but apparently so and enough interest to Intel that they have now provided a Linux driver for exposing this hinge / keyboard / screen angle data. Read more Also: Learn To Get Involved In Linux Kernel Development This Spring

Android Leftovers