Language Selection

English French German Italian Portuguese Spanish

Programming: micro.sth, RProtoBuf, Perl and Python

Filed under
Development
  • Introducing micro.sth

    Many developers turn their noses up at PHP, but I have a soft spot for it. For me, it's the most approachable programming language by far. It feels intuitive in a way no other languages do, and it makes it possible to cobble together a working application with just a handful of lines of code. So whenever I can't find a tool for a specific job, I try to build one myself.

    The latest project of mine is a case in point. I was looking for a simple application for keeping a photographic diary, and I was sure that I'd be able to find an open-source tool for that. I searched high and low, but I came back empty-handed. Sure, there are plenty of static website generators, but I'd prefer something that doesn't require me to perform the write-generate-upload dance every time I want to post a quick update. And I need something that I can use not only to maintain a simple diary, but also store notes, manage tasks, and draft articles -- all this without getting bogged down by configuring templates, defining categories, and tweaking settings. And because I want most of my content to be private, I should be able to protect access to it with a password.

  • Dirk Eddelbuettel: RProtoBuf 0.4.17: Robustified

    A new release 0.4.17 of RProtoBuf is now on CRAN. RProtoBuf provides R with bindings for the Google Protocol Buffers (“ProtoBuf”) data encoding and serialization library used and released by Google, and deployed very widely in numerous projects as a language and operating-system agnostic protocol.

    This release contains small polishes related to the release 0.4.16 which added JSON support for messages, and switched to ByteSizeLong. This release now makes sure JSON functionality is only tested where available (on version 3 of the Protocol Buffers library), and that ByteSizeLong is only called where available (version 3.6.0 or later). Of course, older versions build as before and remain fully supported.

  • Perl Weekly Challenge 53: Rotate Matrix and Vowel Strings

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

  • Weekly Python StackOverflow Report: (ccxxi) stackoverflow python report
  • Python: Is And ==

    In Python, == compares the value of two variables and returns True as long as the values are equal.

More in Tux Machines

FSF Chasing Members and GNU Project Has a Dozen New Releases This Month

  • Don’t miss your chance to win fabulous prizes: Get your friends to join the FSF!

    As you may already know, every associate member is incredibly valuable to the Free Software Foundation (FSF). Since most of our funding comes from individual donations and memberships, associate members aren’t just a number. Each new membership magnifies our reach and our ability to effect social change, by demonstrating your commitment to the crucial cause of software freedom. Right now, FSF associate members have the opportunity to reap some fantastic rewards by participating in our virtual LibrePlanet membership drive. We still have the raffle prizes generously donated by Technoethical, Vikings, JMP.chat, and ThinkPenguin for this year’s LibrePlanet conference, which we held entirely online this year due to the COVID-19 pandemic. Now, we’re giving them away to those who go the extra mile to help us grow by referring new annual associate members to sign up!

  • May GNU Spotlight with Mike Gerwitz: 12 new releases!

    bison-3.6.2 denemo-2.4.0 emms-5.4 freeipmi-1.6.5 gcc-10.1.0 gdb-9.2 gnuastro-0.12 gnuhealth-3.6.4 mediagoblin-0.10.0 nano-4.9.3 nettle-3.6 parallel-20200522

Programming: SDL, QML, Python, Awk/Bash and More

  • Photoframe Hack

    Sometimes you just want to get something done. Something for yourself. You do not intend it to be reused, or even pretty. You build a tool. My tool was a photoframe with some basic overlays. I wanted the family calendar, some weather information (current temperature + forecast), time, and the next bus heading for the train station. [...] I also have a bunch of REST calls to my local home assistant server. Most of these reside in the HassButton class, but I also get the current temperature from there. These are hardcoded for my local network, so needs refactoring to be used outside of my LAN. All of these interfaces require API keys of one kind or another – be it a proper key, or a secret URL. These are pulled from environment variables in main.cpp and then exposed to QML. That way, you can reuse the components without having to share your secrets.

  • Writing the Ultimate Locking Check

    In theory a clever programmer could discover all the bugs in a piece of software just by examining it carefully, but in reality humans can't keep track of everything and they get distracted easily. A computer could use the same logic and find the bugs through static analysis. There are two main limitations for static analysis. The first is that it is hard to know the difference between a bug and feature. Here we're going to specify that holding a lock for certain returns is a bug. This rule is generally is true but occasionally the kernel programmers hold a lock deliberately. The second limitation is that to understand the code, sometimes you need to understand how the variables are related to each other. It's difficult to know in advance which variables are related and it's impossible to track all the relationships without running out of memory. This will become more clear later. Nevertheless, static analysis can find many bugs so it is a useful tool. Many static analysis tools have a check for locking bugs. Smatch has had one since 2002 but it wasn't exceptional. My first ten patches in the Linux kernel git history fixed locking bugs and I have written hundreds of these fixes in the years since. When Smatch gained the ability to do cross function analysis in 2010, I knew that I had to re-write the locking check to take advantage of the new cross function analysis feature. When you combine cross function analysis with top of the line flow analysis available and in depth knowledge of kernel locks then the result is the Ultimate Locking Check! Unfortunately, I have a tendency towards procrastination and it took me a decade to get around to it, but it is done now. This blog will step through how the locking analysis works.

  • Raising the ground

    To read this blog I recommend you to be familiar with C programming language and (not mandatory) basics about SDL2. The main goal of this blog is not to give you a copy and paste code, instead it will guide you along the way until you get results by your own merit, also if you find any issues/mistakes/room for improvement please leave a response, thanks for reading.

  • PyCoder’s Weekly: Issue #422 (May 26, 2020)
  • Real Python: A Beginner's Guide to Pip

    What is pip? pip is the standard package manager for Python. It allows you to install and manage additional packages that are not part of the Python standard library. This course is an introduction to pip for new Pythonistas.

  • Awk Cheatsheet And Examples

    Awk is a great utility for text parsing and maniupulation. All unix operating systems have Awk installed by default. If you are on Windows. Please check out at the bottom of this tutorial on how to install and enable awk on Windows.

  • Printing repeats within repeats, and splitting a list into columns

    Repeats within repeats. BASH printf is a complex piece of machinery. The man page says a printf command should look like printf FORMAT [ARGUMENT]..., which makes it seem the "argument" is the thing to be printed and the "format" describes how.

Devices/Embedded With Linux

  • Gemini Lake industrial mini-PCs are loaded with USB and COM ports

    GigaIPC latest QBiX Series industrial mini-PCs run Linux or Windows on Intel Gemini Lake and offer up to 8x USB and 5x COM ports plus dual displays, GbE, SATA III, M.2, and ruggedization features. Taiwanese computer vendor Gigabyte primarily produces consumer and enterprise desktop PC and server equipment, so we were surprised in 2017 when it launched an embedded 3.5-inch, Intel Apollo Lake GA-SBCAP3350 SBC. The following year in 2018, Gigabyte spun off GigaIPC as an embedded unit, and it has already generated a large catalog of Intel-based products including Micro-ATX, Mini-ITX, thin Mini-ITX, and 110 x 105mm “10×10” boards. There are 15 different 3.5-inch “QBi Pro” boards much like the GA-SBCAP3350, but also available with Whiskey Lake and Kaby Lake-U processors.

  • 19″ Rackmounts Support up to 12 Raspberry Pi SBCs

    Last time, we wrote about myelectronics.nl we covered their Tesla Cybertruck Case for Intel NUCs which housed the mini PC into a mini CyberTruck looking enclosure. The company has now come up with new housing solutions specifically designed for Raspberry Pi 1/2/3/4 Model B/B+ boards.

  • PoE-ready Ryzen V1000 SBC is all about camera control

    Axiomtek’s “MIRU130” SBC targets embedded vision applications with a Ryzen V1000 SoC, 4x USB 3.1 Gen2, HDMI and DP ports, cam triggers and lighting controls, 2x M.2, PCIe x16, and 4x GbE ports, 2x of which offer PoE. Axiomtek recently launched a CAPA13R, joineing Seco’s similarly 3.5-inch SBC-C90 as the only SBCs we have seen based on AMD’s Ryzen Embedded V100. Now Axiomtek has returned with a larger, V1000-based MIRU130 motherboard with a 244 x 170mm form factor that falls in between Mini-ITX and Micro-ATX.

  • IAR Systems Delivers Efficient Embedded Software Building on Linux

    Through the C/C++ compiler and debugger toolchain IAR Embedded Workbench®, IAR Systems provides its customers with the market's most diverse microcontroller support as well as adapted licensing options to fit different organizations' needs. This flexibility is now extended to the build environment as the well-known build tools in IAR Embedded Workbench now support Linux. The tools offer leading code quality, outstanding optimizations for size and speed, and fast build times. Supporting implementation in Linux-based frameworks for automated application build and test processes, the tools enable large-scale deployments of critical software building and testing and is suitable for installations ranging from a few licenses on a small build server, to massive installations with several hundreds of parallel builds active at the same time.

  • Librem 5 April 2020 Software Development Update

    This is another incarnation of the software development progress for the Librem 5. This time for April 2020 (weeks 14-18). Some items are covered in more detail in separate blog posts at https://puri.sm/news. The idea of this summaries is so you can have a closer look at the coding and design side of things. It also shows how much we’re standing on the shoulders of giants reusing existing software and how contributions are flowing back and forth. So these reports are usually rather link heavy pointing to individual merge requests on https://source.puri.sm/ or to the upstream side (like e.g. GNOME’s gitlab.)

Games: Burning Knight, Elder Scrolls, Cities: Skylines and PyGame

  • Burning Knight is a roguelike where you rob a dungeon, coming soon

    At least the setting is honest, you're totally robbing the dungeons in Burning Knight and then attempting to flee. Burning Knight is an action-packed procedurally generated roguelike, with fast-paced action and plenty of exploration across various floors in the Burning Knight's castle that you're stealing goods from. It can turn into a bullet-hell in some rooms, there's hundreds of items to find and they can be combined to "build your very own game-breaking combos" and it does sound awesome. The developer, Rexcellent Games, just announced on Twitter yesterday that it's now actually complete. They're waiting on Valve's approval, and it looks like it will hopefully release next month. SteamDB captured the date changing to June 5 but that might be a temporary date.

  • Stadia gets Elder Scrolls Online on June 16, 1440p in web and more

    A few bits of Stadia news for you as Google have announced the next set of additions coming to their game streaming service. For players who were a bit let down by resolution options, there's some good news. As some players already saw across the last few weeks and today being made properly official, 1440p is now an option when playing Stadia in a web browser.

  • Humble Cities: Skylines Bundle is up for some easy city building

    Cities: Skylines, one of the finest city builders ever is now available in a big Humble Bundle for you to grab the base game and lots of extra content. This is honestly a ridiculously good deal and probably the cheapest Cities: Skylines has ever been. For £1 you can get Cities: Skylines and the Deep Focus Radio DLC. Even if you only go for that, there's a lot to enjoy without any expansions.

  • Python Qt5 - PyQt5 and PyGame compatibility with source code.

    This tutorial tries to solve from the objectives related to solving and stabilizing compatibility errors between PyQt4 and PyQt5 and creating a common interface between PyQt5 and PyGame. There is always the same problem in programming when the developer for some reason has to change classes, methods and functions and reusing the old code is no longer valid. In this case, common or other errors occur, which leads to a waste of time.