Language Selection

English French German Italian Portuguese Spanish

Development

Programming Leftovers

Filed under
Development
  • Understanding jq's SQL style operators JOIN and INDEX

    In this post I explore a couple of new (to me) operators in jq's arsenal: JOIN and INDEX, based on an answer to a question that I came across on Stack Overflow.

    The answer was in response to a question (JQ: How to join arrays by key?) about how to merge two arrays of related information. I found it interesting and it also introduced me to a couple of operators in jq that I'd hitherto not come across. There's a section in the manual titled SQL-Style Operators that describe them.

  • Migrating Rails cookies to the new JSON serializer

    How to move from Marshal to the new Rails 7 default JSON serializer.

    I was recently upgrading Phrase to Rails 7. Big upgrades like that are usually being done with the most minimal changes, and this one wasn’t an exception. However, every major and minor version of Rails brings some new defaults that can accumulate over time, leaving you with some debt to pay.

  • gfldex: Sinking Errors

    I was looking for a way to output debug messages that can also carry additional values, when not output to the screen. That is easy. The tricky part is golfing the interface. After quite a bit of struggle. I ended up with the following.

  • Friday is an Open-source Virtual Assistant

    Virtual assistant technology defines as an application program that uses semantic and deep learning. It can also call an AI assistant or digital assistant. It helps users or enterprises to assist people or automate tasks.

GNOME Devs Bring New List View to Nautilus File Manager

Filed under
Development
GNOME

Switching from GtkTreeView (which remains available in GTK4) to this new version is said to offer a number of advantages, and offer ‘full feature parity’ with two (temporary) exceptions (that are being worked on in separate branches).

But putting that to one side, what benefits does this switch provide (besides a codebase that’s more malleable and modern)?

Well, say hello to rubber banding — at long last you can now select multiple files/folders in list view simply by dragging out with your mouse, just like you can in the icon view...

Read more

Programming Leftovers

Filed under
Development
  • 15 Open-source Physics Simulation Engine

    A physics simulation engine is a custom software engine that grants developers add visual effetcs, simulate and tweak objects and enviroments accroding to the law of physics in 2D, 3D or both.

    With physics engine software, developers and artists apply real-world physical properties, such as gravity and momentum, to their 2D and 3D objects rather than designing them from scratch.

  • FLOSS 2.0 Has Been Released [Ed: The acronym "FLOSS" is being hijacked]

    When you have to deal with malware in your day job, for research purposes, or just for fun, one of the key points is to have a lab ready to be launched. Your sandbox must be properly protected and isolated to detonate your samples in a safe way but it must also be fulfilled with tools, and scripts. This toolbox is yours and will be based on your preferred tools but starting from zero is hard, that's why there are specific Linux distributions built for this purpose. The one that I use in FOR610 and for my daily investigations is REMnux[1], created and maintained by Lenny Zeltser[2]. This environment offers tons of tools that help to perform all the malware analysis steps from static analysis up to code reversing and debugging.

  • How to Use SSL in a Create-React-App Application

    HTTPS is a must for modern applications, especially those that deal with user data. Set up HTTPS for React in just a couple of steps.

  • Innovation Center Visits SparkFun - News - SparkFun Electronics

    The Innovation Center of St. Vrain Valley Schools seeks to transcend the traditional classroom and provides experiential opportunities that are developing today’s students into tomorrow’s leaders, innovators, and change-makers. As a part of these efforts, the Innovation Center hosts dozens of “project teams” across several focus areas that seek to complete real projects for real people alongside industry partners who provide incredible mentorship opportunities for students.

  • AMD Xilinx Makes Machine Vision AI Development Quick, Easy And Affordable

    A host of software tools, code samples, an app store, and pre-configured Linux images make getting started surprisingly simple.

  • Matthias Kirschner's Web log - fsfe: Recent Readings of Ada & Zangemann [Ed: "At this reading, I also for the first time met the people from O'Reilly"... so FSFE, which uses "FSF" in the name in violation of an agreement with FSF, liaises with O'Reilly, which helped attack Free software with the "Open Source" canard]

Motion Detection with PIR and Raspberry PI: HC-SR501 wiring and Python Code

Filed under
Development
Hardware

Projects involving motion detection actions require a reliable way to run their code when an object movement happens. One of the most common solutions to accomplish this task is by the HC-SR501 PIR sensor with Raspberry PI.

In this tutorial, I’m going to show you how to connect and use a PIR with Raspberry PI computer boards using Python.

What is a PIR

A PIR (Passive InfraRed, sometimes named “PID” as “Passive Infrared Detector”) sensor is an electronic device able to measure the infrared (IR) light radiating from objects. The term passive means that the PIR module doesn’t radiate energy for detection purposes: it only detects infrared radiation emitted by or reflected from objects.

It can make your project aware if a generic movement happened in its range of view, but it can’t give more information (like, for example, who, where and how many the object moved).

You can find a more detailed description of how the PIR works from the following Glolab PIR page.

Read more

Programming Leftovers

Filed under
Development
  • Release day - Hubert Figuière

    It's release day, sorta. Both libopenraw and Exempi got a new release within two days. Here is what's up.

  • More detail on software requirements

    My talk at AppDevCon discussed the Requirements Trifecta but turned it into a Quadrinella: you need leadership vision, market feedback, and technical reality to all line up as listed in the trifecta, but I’ve since added a fourth component. You also need to be able to tell the people who might be interested in paying for this thing that you have it and it might be worth paying for. If you don’t have that then, if anybody has heard of you at all, it will be as a company that went out of business with a product “five years ahead of its time”: you were able to build it, it did something people could benefit from, in an innovative way, but nobody realised that they needed it.

  • Sequencing

    Sequencing is doing things in the right order. At a macro level, it's about inflection points – Uber couldn't have existed without Google Maps and consumer GPS. But the tougher to solve and more interesting type of sequencing is when the goal is obvious, but the path unknown.

    It's difficult because you can't always mimic past successes – an olympian's workout plan might be optimal, but not for someone just starting out. It's also difficult because you can't even copy the order – the temporal aspect of "the right time" means that the "right order" is always changing.

    Some examples of sequencing across different disciplines.

  • Managing risk in blockchain deployments

    Blockchains have significantly different constraints, security properties, and resource requirements than traditional data storage alternatives. The diversity of blockchain types and features can make it challenging to decide whether a blockchain is an appropriate technical solution for a given problem and, if so, which type of blockchain to use. To help readers make such decisions, the report contains written and graphical resources, including a decision tree, comparison tables, and a risk/impact matrix.

  • Charting Kaggle’s growth to 10 million users | R-bloggers

    A few days ago, the Kaggle community crossed the amazing milestone of 10 million registered users! In celebration, I’ve put together a forum post that visualises the accelerated growth over the years. Here I show the R code behind those plots and talk a bit about my visualisation choices.

  • Visualizing the Invasion of the Soviet Union with Luftwaffe Locations

    On June 22 1941 (81 years ago) Nazi Germany invaded the Soviet Union with the largest military force assembled in history. Behind the ground troops the Luftwaffe (German Air Force) quickly setup forward bases to support the campaign. Using data from http://ww2.dk I put together an infographic visualizing the monthly movements of the Luftwaffe during this time (map borders are current not the ones that existed in 1941).

    One can see planes flying into Poland from the west (Denmark, Norway, France, Belgium, and The Netherlands were conquered the previous year) and Greece (conquered the previous month) right before the campaign. As the Germans advanced along the Northern, Central, and Southern fronts one can also see the indecisive plan of attack. First they locate more planes to the North to attack Leningrad and then shift focus to the attack on Moscow.

  • Style scoping versus shadow DOM: which is fastest?

    My new benchmark largely confirmed my previous research, and shadow DOM comes out as the most consistently performant option. Class-based style scoping slightly beats shadow DOM in some scenarios, but in others it’s much less performant. Firefox, thanks to its multi-threaded style engine, is much faster than Chrome or Safari.

  • Shell vs R Fundamentals – From Syntax to Control Structures with Zsh & BASH

    This walkthrough of the fundamentals of shell programming with Z shell (Zsh) and Bourne Again SHell (BASH) includes a comparison of similar components and features in R and RStudio. An alternate perspective from R is provided for you to leverage while learning the fundamentals of shell programming.

    It is important to be aware of the similarities and differences between Zsh and BASH when working with shell programming, particularly considering that Zsh is the default shell for Mac systems as of macOS Catalina, while BASH is the default shell of most distributions of Linux operating systems (OS). BASH is also included in the infrastructure of many remote servers.

Programming Leftovers

Filed under
Development

  • The Poisson distribution: From basic probability theory to regression models

    Brief introduction to the Poisson distribution for modeling count data using the distributions3 package. The distribution is illustrated using the number of goals scored at the 2018 FIFA World Cup, suitable for self-study or as a classroom exercise.

  • Webscraping in R with Rvest

    Web scraping has become an incredibly important tool in data science, as an easy way to generate new data. The main advantage is the automation of some pretty repetitive tasks. Web scrapping can also be a good way of keeping up with new data on a website, assuming it doesn’t have a big change in its HTML structure.

  • Clang Static Analyzer and the Z3 constraint solver | Frederic Cambus

    Notes on using the Z3 constraint solver with the Clang Static Analyzer
    As far as static analyzers are concerned, one of the most important point to consider is filtering out false positives as much as possible, in order for the reports to be actionable.

    This is an area on which Coverity did an excellent job, and likely a major reason why they got so popular within the open source community, despite being a closed-source product.

    LLVM has the LLVM_ENABLE_Z3_SOLVER build option, which allows building LLVM against the Z3 constraint solver.

  • Least Common Denominator APIs

    Often, our instinct is to build for optionality. What if we change databases? What if we change clouds? We target the Least Common Denominator (LCD) interface to avoid vendor lock-in and make sure our software is portable – after all, Optimization is Fragile. LCD interfaces look like targeting the S3 API, a generic PubSub implementation, or vanilla ANSI SQL.

    LCD interfaces are good enough most of the time, but when we need to run a specialized workload, sometimes they don't perform how we'd like. We could solve our problem quickly by narrowing the API – coupling it to a specific cloud or managed service, but that destroys our optionality. Here, you should probably fight your instinct to stick with the pure implementation and weigh the trade-offs – how many developer-hours and pain can you save by narrowing the interface?

    Optimization and optionality are inherent trade-offs. There's a way to architecture services to be efficient and generic but also practical.

  • Quantum computer programming for dummies

    For would-be quantum programmers scratching their heads over how to jump into the game as quantum computers proliferate and become publicly accessible, a new beginner’s guide provides a thorough introduction to quantum algorithms and their implementation on existing hardware.

    “Writing quantum algorithms is radically different from writing classical computing programs and requires some understanding of quantum principles and the mathematics behind them,” said Andrey Y. Lokhov, a scientist at Los Alamos National Laboratory and lead author of the recently published guide in ACM Transactions on Quantum Computing. “Our guide helps quantum programmers get started in the field, which is bound to grow as more and more quantum computers with more and more qubits become commonplace.”

  • Create new variables from existing variables in R

    Create new variables from existing variables in R?. To create new variables from existing variables, use the case when() function from the dplyr package in R.

  • Construct a Perfect Binary Tree with given Height

    Given an integer N, the task is to generate a perfect binary tree with height N such that each node has a value that is the same as its depth. Return the inorder traversal of the generated binary tree.

  • Announcing urllib3's bounty program

    We’ve recognized that one of the biggest challenges to shipping v2.0 is not having enough time to devote to contributions. Our bounty program is hoping to spur interest from the community in the urllib3 project and fairly pay contributors for their time and experience.

    The bounty program works by marking issues with bounty amounts we’re willing to pay for anyone to complete an issue. Don't worry if you're not an existing contributor — new contributors are welcome and encouraged!

  • Learning from Failure – Nitinol Fracture Mechanics in R | R-bloggers

    Despite our best efforts, nitinol implants fracture and fail. Sometimes we want them to fail (on the bench, to learn).

  • Every Sufficiently Advanced Configuration Language is Wrong

    Every sufficiently advanced configuration language is the wrong tool for the job.

    [...]

    The logical extreme is becoming more evident – advanced configuration in general-purpose programming languages. You can see this in the emergence of Typescript for Infrastructure-as-Code. For the most basic (and human 0x777) configuration needs, there will always be simple formats – YAML, JSON, INI, etc.).

  • Another Exercise In Encoding Reversing | Didier Stevens

    In this blog post, I will show how to decode a payload encoded in a variation of hexadecimal encoding, by performing statistical analysis and guessing some of the “plaintext”.

    I do have the decoder too now (a .NET assembly), but here I’m going to show how you can try to decode a payload like this without having the decoder.

  • Examples Of Encoding Reversing | Didier Stevens

    I recently created 2 blog posts with corresponding videos for the reversing of encodings.

    The first one is on the ISC diary: “Decoding Obfuscated BASE64 Statistically“. The payload is encoded with a variation of BASE64, and I show how to analyze the encoded payload to figure out how to decode it.

  • An Introduction to Python: A Language for the Ages – The New Stack

    For anyone just getting into software programming, one of your best friends will be Python. Why? Python is very simple to learn and easy to implement. Even better, what you can do with this language grows as you learn more. You can start with very simple text-based applications and migrate to GUI applications and much more. And because Python is supported by most major operating systems (Linux, macOS, and Windows), you can begin your journey, regardless of platform.

    Python includes support for features such as lists, tuples, functions, variables, JSON, and ranges. But where did Python come from and why is it still so important today? Let’s dig in and find out. To follow our series of introductory tutorials, start here.

  • How To Write Comments In Python

    The way you think is reflected in programming in order to convey the individual steps that you took to solve an issue utilizing a computer. Commenting your code helps clarify your thinking process, which in turn makes it easier for you and other people to comprehend the purpose of your code in the future. Because of this, you will have an easier time locating bugs, fixing them, enhancing the code at a later time, and reusing it in other applications as well.

    The act of commenting is essential to the completion of any and all tasks, regardless of how little, medium, or fairly enormous they may be. It should be considered standard procedure for software engineers since it is an important component of your workflow. Without comments, things have the potential to get quite complicated very quickly. In this post, we will cover the many techniques of commenting that Python offers, as well as how it may be utilized to automatically produce documentation for your code via the use of the so-called module-level docstrings.

Where to Find Free Schematic Drawing Software for Arduino, Raspberry Pi, and Other SBCs

Filed under
Development
Hardware

Circuit diagrams play a vital role in the design process for any electronics project. They give you the chance to plan your circuit before you make it and can save a lot of time and effort. But how can you make circuit diagrams to improve your designs?

We have gathered some of the web's most popular free schematic drawing software options for Arduino, Raspberry Pi, and other SBCs to make your choice easier.

Read more

Also: Summer of Jetson Nano! Great Resources & Activities for Jetson Nano Users - News - SparkFun Electronics

Programming Leftovers

Filed under
Development
  • [RFC] Zstandard as a second compression method to LLVM

    The LLVM project currently has support for zlib as a compression algorithm. Usage of it varies from compression of ELF debug sections, to serialization of performance stats and AST data structures.

    We would like to add Zstandard (A.K.A. Zstd) as an alternative to zlib, which tends to achieve higher compression rates while being faster across the board. Using those for internal tooling could lead to speed improvements in places where we compress AST’s etc, without sacrificing the compressed size of them.

  • Porting KCM modules from QtWidgets to QtQuick/Kirigami for GSOC 2022

    I’ve been selected for GSOC this year. My task is to redesign and port the KCMs currently in Qt Widgets to QtQuick/Kirigami

    Thanks, Nate and David for agreeing to mentor me.

  • Rant: One day either JavaScript or AutoComplete will start ww3
  • Takedown Notice Wipes Game Boy Advance Emulator From GitHub

    A popular browser-based Game Boy Advance emulator with nearly 100 working games was removed from GitHub this week. The takedown request was sent by the ESA, which acts on behalf of Nintendo and other game companies. The problem hasn't been sorted out completely, however, as nostalgic games can easily find alternatives, even on GitHub.

  • Russia’s Conti working on exploits for Intel ME BMC AMT IPMI – Intel ME the biggest security fuck up in computing history – sue Intel

    “The biggest network security threat today is a remote code execution exploit for Intel’s Management Engine.”

    “Every computer with an Intel chipset produced in the last decade would be vulnerable to this exploit, and RCE would give an attacker full control over every aspect of a system.

    If you want a metaphor, we are dinosaurs and an Intel ME exploit is an asteroid hurtling towards the Yucatán peninsula.” (https://hackaday.com/tag/intel-me/)

    Intel might have installed – over the course of at least a decade (to this day?) a closed source backdoor in your computer’s firmware, that might never receive updates and is hard to remove.
    Once this backdoor is fully cracked, everyone (Russia, China and North Korea) can use it.
    Having remote control over a server down to the BIOS is a neat feature.

    [...]

    another dramatic way to put it:

    “The biggest network security threat today is a remote code execution exploit for Intel’s Management Engine.”

    “Every computer with an Intel chipset produced in the last decade would be vulnerable to this exploit, and RCE would give an attacker full control over every aspect of a system.

Builder GTK 4 Porting, Part VII

Filed under
Development
GNOME

It’s been another couple weeks of porting, along with various distractions.

The big work this time around has been deep surgery to Builder’s “Foundry”. This is the sub-system that is responsible for build-systems, pipelines, external-devices, SDKs, toolchains, deployments-strategies and more. The sub-system was starting to show it’s age as it was one of the first bits of Builder to organically emerge.

One of the things that become so difficult over the years is dealing with all the container layers we have to poke holes through. Running a command is never just running a command. We have to setup PTYs (and make sure the TTY setup ioctl()s happen in the right place), pass environment variables (but to only the right descendant process), and generally a lot more headaches.

What kicked off this work was my desire to remove a bunch of poorly abstracted bits and we’re almost there. What has helped considerably is creating a couple new objects to help manage the process.

The first is an IdeRunContext. It is sort of like a GSubprocessLauncher but allows you to create layers. At the end you can convert those layers into a subprocess launcher but only after each layer is allowed to rewrite the state as you pop back to the root. In practice this has been working quite well. I finally have control without crazy amounts of argument rewriting and guesswork.

Read more

5 Top Free and Open Source Erlang Web Frameworks

Filed under
Development
Web

One of the types of software that’s important for a web developer is the web framework. A framework “is a code library that makes a developer’s life easier when building reliable, scalable, and maintainable web applications” by providing reusable code or extensions for common operations. By saving development time, developers can concentrate on application logic rather than mundane elements.

A web framework offers the developer a choice about how to solve a specific problem. By using a framework, a developer lets the framework control portions of their application. While it’s perfectly possible to code a web application without using a framework, it’s more practical to use one.

Erlang is a general-purpose, concurrent, declarative, functional programming language and runtime environment developed by Ericsson, a Swedish multinational provider of communications technology and services. Erlang is dynamically typed and has a pattern matching syntax. The language solves difficult problems inherent in parallel, concurrent environments. It uses sets of parallel supervised processes, not a single sequential process as found in most programming languages.

Let’s explore the 5 Erlang web frameworks. For each program we have compiled its own portal page, a full description with an in-depth analysis of its features, together with links to relevant resources.

Read more

Also: finding binary differences « codeblog

Syndicate content

More in Tux Machines

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.

Red Hat Hires a Blind Software Engineer to Improve Accessibility on Linux Desktop

Accessibility on a Linux desktop is not one of the strongest points to highlight. However, GNOME, one of the best desktop environments, has managed to do better comparatively (I think). In a blog post by Christian Fredrik Schaller (Director for Desktop/Graphics, Red Hat), he mentions that they are making serious efforts to improve accessibility. Starting with Red Hat hiring Lukas Tyrychtr, who is a blind software engineer to lead the effort in improving Red Hat Enterprise Linux, and Fedora Workstation in terms of accessibility. Read more

Today in Techrights

Android Leftovers