Language Selection

English French German Italian Portuguese Spanish

Login

Enter your Tux Machines username.
Enter the password that accompanies your username.

More in Tux Machines

Programming With Dtrace, Python and LLVM Founder Picks RISC-V

  • On The Benefits of Static Trace Points

    Years ago IBM coined the term First Failure Data Capture (FFDC). Capture enough data about a failure, just as it occurs the first time, so that reproducing the failure is all but unnecessary. An observability framework is a set of tools that enable system administrators to monitor and troubleshoot systems running in production, without interfering with efficient operation. In other words, it captures enough data about any failure that occurs so that a failure can be root-caused and possibly even fixed without the need to reproduce the failure in vitro. Of course, FFDC is an aspirational goal. There will always be a practical limit to how much data can be collected, managed, and analyzed without impacting normal operation. The key is to identify important exceptional events and place hooks in those areas to record those events as they happen. These exceptional events are hopefully rare enough that the captured data is manageable. And the hooks themselves must introduce little or no overhead to a running system. The trace point facility The trace point facility, also known as ftrace, has existed in the Linux kernel for over a decade. Each static trace point is an individually-enabled call out that records a set of data as a structured record into a circular buffer. An area expert determines where each trace point is placed, what data is stored in the structured record, and how the stored record should be displayed (i.e., a print format specifier string). The format of the structured record acts as a kernel API. It is much simpler to parse than string output by printk. User space tools can filter trace data based on values contained in the fields (e.g., show me just trace events where "status != 0"). Each trace point is always available to use, as it is built into the code. When triggered, a trace point can do more than capture the values of a few variables. It also records a timestamp and whether interrupts are enabled, and which CPU, which PID, and which executable is running. It is also able to enable or disable other trace points, or provide a stack trace. Dtrace and eBPF scripts can attach to a trace point, and hist triggers are also possible. Trace point buffers are allocated per CPU to eliminate memory contention and lock waiting when a trace event is triggered. There is a default set of buffers ready from system boot onward. However, trace point events can be directed into separate buffers. This permits several different tracing operations to occur concurrently without interfering with each other. These buffers can be recorded into files, transmitted over the network, or read from a pipe. If a system crash should occur, captured trace records still reside in these buffers and can be examined using crash dump analysis tools.

  • Announcing Mu version 1.0.3

    We didn’t intend to cut this release but changes in the way the latest OSX works meant that code highlighting didn’t work correctly. We also managed to apply a fix to an annoying bug relating to where Mu set the current working directory for scripts run in Python3 mode. OSX Catalina has posed a number of problems, from the incorrect rendering mentioned above, to the way the application should be installed and problems with permissions when flashing a BBC micro:bit. The simple answer to the installation story is, once you’ve installed Mu in your Applications folder, you should first open it with CTRL-click (not a double click) and select the “Open” button in the resulting pop-up. Subsequent runs of Mu can be started in the usual “double click” way. If you don’t do the “CTRL-click” trick you’ll see a pop-up complaining about Mu not being checked for malicious software.

  • Mike Driscoll: PyDev of the Week: Thomas Wouters

    I’m a self-taught programmer, a high school dropout, a core CPython developer, and a former PSF Board Director from Amsterdam, The Netherlands. I’ve been playing with computers for a long time, starting when my parents got a Commodore 64 with a couple books on BASIC, when I was 6 or 7. I learned a lot by just playing around on it. Then in 1994 I discovered the internet, while I was still in high school. This was before the days of the World Wide Web or (most) graphics, but I was sucked in by a programmable MUD, a text-based “adventure” environment, called LambdaMOO. LambdaMOO lets you create your own part of the world by making rooms and objects, and programming their behaviour, in a programming language that was similar to Python (albeit unrelated to it). One thing led to another and I dropped out of high school and got a job at a Dutch ISP (XS4ALL), doing tech support for customers. A year later I moved to the Sysadmin department, where I worked for ten years. I gradually moved from system administration to programming, even before I learned about Python. Besides working with computers I also like playing computer games of all kinds, and non-computer games like board games or card games. I do kickboxing, and I have a bunch of lovely cats, about whom I sometimes tweet. I’m pretty active on IRC as well, and I’m a channel owner of #python on Freenode. I also keep ending up in administration-adjacent situations, like the PSF Board of Directors and the Python Steering Council, not so much because I like it but because I don’t mind doing it, I’m apparently not bad at it, and it’s important stuff that needs to be done well.

  • Dividing Deep Into Enhancing Photos With Python

    Python is the most reliable and renowned content management system for websites of any kind to create dynamically attractive web resources for their uses. Python has got everything that developers can ask for to provide reliable user experience to end consumers and develop the business online. For any website, maintaining the quality of the images becomes challenging because the high-quality image would result in the slow loading speed of the landing pages, which might result in poor user experience. There are many tools available online that can compress the images and makes them uploadable on the website. However, the resulted images would often lose all the visual appeal after they are compressed through an online tool.

  • Text Translation with Google Translate API in Python

    Unless you have been hiding under a rock, you have probably used Google Translate on many occasions in your life. Whenever you try to translate a word or a sentence from a certain language to another, it is the Google Translate API which brings you the desired results in the background. Though you can translate anything by simply going to the Google Translate web page, you can also integrate Google Translate API into your web applications or desktop programs. The best thing about the API is that it is extremely easy to set up and use. You can actually do a lot of things with the help of the Google Translate API ranging from detecting languages to simple text translation, setting source and destination languages, and translating entire lists of text phrases. In this article, you will see how to work with the Google Translate API in the Python programming language.

  • Python Community Interview With Kelly and Sean of Teaching Python

    This week I’m joined by Kelly Paredes and Sean Tibor, the hosts of the Teaching Python podcast. Join us as we discuss the benefits of learning Python outside of the code itself, and what it’s like to learn Python when you’re not planning to become a professional developer. So, without further ado, let’s meet Kelly and Sean!

  • With SiFive, We Can Change the World

    My quest is to build beautiful things that help change the world, and I’ve been fortunate to spend the last 15 years in Silicon Valley, working with some of the major players shaping all sorts of technology. Today, I’m super excited to join SiFive - the company I believe is best positioned to transform the silicon industry, to lead the Platform Engineering team. With experience building and leading large-scale production systems that power our industry, I’m looking forward to making the dream of customized chips a reality with SiFive’s amazing team of engineers. The end of Moore’s Law is a profound time, leading to new accelerators, new demand for custom ASICs, and new opportunities - and I believe that it is time for the semiconductor industry to change its approach to innovation. This industry has been defined by proprietary technologies that are difficult to use, don’t interoperate well, and have poor user experience. I believe that open tooling, world class engineering, and a focus on end-to-end user experience can transform the industry. Similarly, the RISC-V architecture pro-vides unique opportunities for SoC customization at every level. This is only possible with SiFive’s ambi-tious design methodology, which is unmatched in the industry. My background includes experience creating and leading a number of large-scale technologies, including compiler technologies like the LLVM Compiler Infrastructure project, the Clang C and C++ compiler, the MLIR machine learning infrastructure, and others. I also spearheaded the creation of Swift - a program-ming language that powers Apple’s ecosystem - and led a team at Tesla that applies a wide range of tech in the autonomous driving space. Most recently, I built and managed an array of AI-related compiler, runtime, and programing language teams for Google Brain and TensorFlow.

  • LLVM Founder Chris Lattner Joins SiFive To Lead Platform Engineering

    This move for Chris comes after serving at Apple more than a decade where he led their LLVM-based toolchain efforts as well as developing the Swift programming language, a brief stint at Tesla focusing on their Autopilot software, and then for the past two and a half years has been at Google. At Google is where he was working on TensorFlow and the Machine Learning IR and other compiler-related efforts.

Leftovers: IBM, MicroK8s and Devices

  • Broadridge Signs With IBM For Greater Cloud Capabilities

    Red Hat, which IBM acquired in 2018 is the most pervasive container solution on the planet today, said Schlesinger. “It allows us to containerize our apps and then allows us to run them on any cloud unchanged, whether our private cloud, Azure, AWS or IBM.”

  • IBM Power-based cloud instances available… from Google

    IBM and Google may be competitors in the cloud platform business, but that doesn't prevent them from working together. Google is partnering with IBM to offer "Power Systems as a service" on its Google Cloud platform. IBM’s Power processor line is the last man standing in the RISC/Unix war, surviving Sun Microsystems’ SPARC and HP’s PA-RISC. Along with mainframes it’s the last server hardware business IBM has, having divested its x86 server line in 2014. IBM already sells cloud instances of Power to its IBM Cloud customers, so this is just an expansion of existing offerings to a competitor with a considerable data center footprint. Google said that customers can run Power-based workloads on GCP on all of its operating systems save mainframes — AIX, IBM i, and Linux on IBM Power.

  • An intro to MicroK8s

    MicroK8s is the smallest, fastest multi-node Kubernetes. Single-package fully conformant lightweight Kubernetes that works on 42 flavours of Linux as well as Mac and Windows using Multipass. Perfect for: Developer workstations, IoT, Edge, CI/CD. Anyone who’s tried to work with Kubernetes knows the pain of having to deal with getting setup and running with the deployment. There are minimalist solutions in the market that reduce time-to-deployment and complexity but the light weight solutions come at the expense of critical extensibility and missing add-ons.

  • QNAP Launches Two Bay TS-251D NAS: Gemini Lake, HDMI, PCIe Expandability

    QNAP has announced its new budget-friendly two-bay NAS aimed at home users and supporting hardware-accelerated media playback. The TS-251D can store up to 32 TB of data using today’s hard drives and can be further expanded with a PCIe card to add SSD caching or other options. The QNAP TS-251D NAS is based on Intel’s dual-core Celeron J4005 processor with UHD 600 Graphics core and hardware decoding for multiple modern video codecs. The SoC is accompanied by 2 GB or 4 GB of DDR4 memory that can be expanded by the end user. The NAS has two bays that can support 2.5-inch or 3.5-inch HDDs or SSDs with a SATA 6 Gbps interface, though RAID modes are not supported. The unit has one GbE port, one HDMI 2.0 output, two USB 3.0 ports, three USB 2.0 connectors, and an IR sensor for an optional remote.

  • Coffee Lake module boasts extended temp operation

    Axiomtek’s Linux-friendly “CEM520” is a COM Express Basic Type 6 module with an Intel 8th Gen “Coffee Lake” Core or Xeon CPU, 4x SATA, PCIe x16, 8x PCIe x1, and support for -20 to 70°C and triple independent displays. Axiomtek has released the Intel 8th Gen based CEM520, which follows its earlier 6th Gen Skylake Core and Xeon E3 based CEM500 COM Express Basic Type 6 module. Other Coffee Lake driven Basic Type 6 modules include Avalue’s recent ESM-CFH.

Android Leftovers

Programming and Security Patches

  • A little hidden gem: QStringIterator

    The code above is broken.

    It falls into the same trap of endless other similar code: it doesn’t take into account that QString does not contain characters/code points, but rather UTF-16 code units.

    All operations on a QString (getting the length, splitting, iterating, etc.) always work in terms of UTF-16 code units, not code points. The reality is: QString is Unicode-aware only in some of its algorithms; certainly not in its storage.

    For instance, if a string contains simply the character “A” — that is, MATHEMATICAL BOLD CAPITAL A (U+1D400) — then its QString storage would actually contain 2 “characters” reported by size() (again, really, not characters in the sense of code points but two UTF-16 code units): 0xD835 and 0xDC00.

    The naïve iteration done above would then check whether those two code units are uppercase, and guess what, they’re not; and therefore conclude that the string is not uppercase, while instead it is. (Those two code units are “special” and used to encode a character outside the BMP; they’re called a surrogate pair. When taken alone, they’re invalid.)

  • How to get started with test-driven development

    I am often approached by software developers who are on board with the switch to test-driven development (TDD). They understand that describing expectations first and then writing code to meet those expectations is the best way to write software. And they agree that writing tests first does not introduce any overhead since they must write tests anyway. Still, they find themselves stuck, not being clear on what to test, when to test it, and how to test it. This article will answer those questions.

    [...]

    One way to the test custom-made car battery would be to hire a testing crew, ship the car with the battery to Portland, and then get the testing crew to drive the car from Portland to Seattle. If the car arrives in Seattle, you can confirm that, yes, the car battery functions as expected.

    Another way to test the custom-made car battery would be to install it in the car and see if the engine turns over. If the engine starts, you can confirm that, yes, the car battery functions as expected.

    Still another way would be to use a voltmeter and connect the positive (+) and the negative (-) terminals to see if the voltmeter registers voltage output in the range of 12.6 to 14.7 volts. If it does, you can confirm that, yes, the car battery functions as expected.

  • Perl Weekly Challenge 44: Only 100, Please, and Make it $200

    These are some answers to the Week 44 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

    [...]

    For solving this task, we first use a recursive combine subroutine that generates all possible strings by inserting between the digits of the “123456789” string the + plus addition, the - subtraction operator, or the '' empty string (i.e. no operator). We then use the evaluate subroutine with each string to perform the various arithmetic operations and compute whether the total is 100.

    [...]

    You have only $1 left at the start of the week. You have been given an opportunity to make it $200. The rule is simple with every move you can either double what you have or add another $1. Write a script to help you get $200 with the smallest number of moves.

    Obviously, doubling your asset is a faster way to go high values than just adding 1. But, if you only double your asset, you get powers of 2, leading you to 128, and then you have to go all the way from 128 to 200, which is most probably not the fastest way to get to 200. In fact, if you first go to three (for example by adding 1 twice), then multiplying by 2 six times, you get to 192, which is much closer to 200. That’s 16 moves, which seems not bad at all. But there may be a yet faster way, let’s see.

  • Wine Debugger Improvements Are On The Way, Start Of LLVM LLDB Support

    With Wine 5.0 having released and the Git tree back open for feature work, we're quite looking forward to see what new material will land following this feature freeze that was in effect the past two months.

    One of the new patch series out by CodeWeavers' Rémi Bernon is improving Winedbg, the Wine debugger. Winedbg is used for debugging Windows applications and among its many debug capabilities is a proxy mode for interacting with the GNU Debugger (GDB). It's that GDB integration that is being improved upon while also starting to support LLVM's Debugger (LLDB).

  • Security updates for Monday

    Security updates have been issued by Debian (jsoup and slirp), Fedora (community-mysql, elog, fontforge, libuv, libvpx, mingw-podofo, nodejs, opensc, podofo, thunderbird-enigmail, transfig, and xfig), openSUSE (arc, libssh, and libvpx), Red Hat (git, java-1.8.0-openjdk, java-11-openjdk, python-reportlab, and sqlite), Slackware (thunderbird), and SUSE (java-1_8_0-openjdk, python, and samba).