Language Selection

English French German Italian Portuguese Spanish


Programming Leftovers

Filed under

GitUI 0.17 Adds The Ability To Compare Commits, New Options Popup (Terminal UI For Git Written In Rust)

Filed under

GitUI, a fast terminal user interface for Git written in Rust, available for Linux, macOS and Windows, had a new release yesterday which adds new features like the ability to compare commits, new options popup, and more.

GitUI allows viewing Git repositories and performing actions on it from your terminal. It features a scalable terminal UI layout, which you control using intuitive keyboard shortcuts. There's no need to memorize the hot keys, as GitUI shows a context-based help which makes it easy to use.

Read more

GNU Parallel 20210822 ('Kabul') released

Filed under

GNU Parallel 20210822 ('Kabul') has been released. It is available for download...


If you like GNU Parallel record a video testimonial: Say who you are, what you use GNU Parallel for, how it helps you, and what you like most about it. Include a command that uses GNU Parallel if you feel like it.

Read more

Programming Leftovers

Filed under
  • Find Max Value in List Python

    None of us can dispute that Python is one of the most popular and useful programming languages. It offers a wide range of data types that are useful in a wide range of applications.

    One of the fundamental and versatile data types in Python is a list. A Python list is a collection of ordered items separated by commas. A python list is mutable, and you can change list items.

    This tutorial will show you how to create a python list and offer various ways to locate the maximum value inside a list.

  • How do I iterate through a string array in Python?

    In this article, we are going to see different methods for the string list iterations.

  • Get Value from Dictionary Python

    A dictionary is one of Python’s most fundamental data types. A Python dictionary is a collection of data values expressed in the form of key-value pairs.

    This tutorial will discuss using the get() function to get a value in a Python dictionary.

  • irk Eddelbuettel: RcppFastFloat 0.0.3: Maintenance

    The third release of RcppFastFloat arrived on CRAN. The package wraps fastfloat, another nice library by Daniel Lemire. For details, see the recent arXiv paper showing that one can convert character representations of ‘numbers’ into floating point at rates at or exceeding one gigabyte per second.

  • Exception Handling in Ruby

    Exception handling refers to the process of predicting and defining ways to handle errors raised in a program during execution. An error, in most cases, refers to an unexpected event or occurrence during the execution of the program. For example, an error may occur while reading a file either due to the file not existing or the user not having the right permission to read or write to the file.

    This tutorial will show you how to implement exception handling in Ruby using the raise and rescue blocks.

  • For Loops in Ruby

    Loops are a fundamental concept in any programming language. They allow us to execute a specific action continuously as long as a specified condition is true.

    Ruby also offers the concept of loops that can perform similar actions. However, each loop method takes a different approach, and the purpose of the loop dictates its efficiency.

    This quick guide will walk you through Ruby’s most common types of loops, including the while loop, for loop, and do while loop.

  • How to Create Classes and Objects in Ruby

    Ruby is a powerful programming language that offers modern features and tools. One such feature is support for object-oriented programming, including encapsulation polymorphism, abstraction, inheritance, and more.

    This tutorial will discuss a key concept in object-oriented programming: object and classes.

  • Ruby File I/O

    Working with files is practically a requirement for any developer. In most instances, if you are not saving data to a database, you are probably saving it to a file.

    This guide will show you how to use Ruby I/O methods to open, read, write, and create new files.

  • Ranges in Ruby

    Ranges are everywhere in our daily life. For example, it could be how long it will take to read this article, the distance between Moscow and London, the number of days between now and Christmas, etc.

    Although ranges may be implemented differently in a programming language, the core concept does not differ.

    In this tutorial, we will learn how to use ranges in the Ruby programming language.

  • SixtyFPS: Toolkit from Berlin for graphical UIs with Rust, C ++ and JavaScript [Ed: This article is an automate translation]

    The developers of SixtyFPS have released the toolkit for creating graphical user interfaces in version 0.1. According to the related blog entry, the release marks the transition from “lab mode”, i.e. the experimental laboratory mode, to the phase in which the toolkit can be used appropriately for development from the team’s point of view.

  • MySQL Filter Query Between Date Range

    MySQL is a popular and easy-to-use Database Management System that comes packaged with many features and flexibility to fit a wide range of use cases. One such feature is the MySQL date data type that is used to generate and store date values.

    In this guide, we will walk you through the MySQL date data type and show you how you can filter from a range of date.

  • Godot Engine - Agile input processing is here for smoother, more responsive gameplay

    Since it's not very usual I post here, let me remind you who I am. I'm Pedro, a.k.a. RandomShaper in the Godot community. I've been contributing to the engine since 2016, when I discovered it –version 2.1 was the newest– and decided to use it to create my game Hellrule. Precisely while testing this project on different models of Android phones, I found the need to make the improvements I'm explaining in this post.


    However, depending on the demands of the game and the hardware it's running on at a given time, that may not be possible. If the device running the game is not powerful enough to keep everything at 60 FPS, the engine will run at a lower effective FPS rate. Rendering and idle processing will then occur less than 60 times per second, but the engine will do its best to have the gameplay-physics running at the target rate, by executing more than one of those physics steps per visible frame.

    If you look again at the game loop above, you'll understand that a consequence of the engine looping at a lower frequency is that, user input is also pumped and handled less frequently, which leads to having a lower responsiveness in addition to a less smooth update of the display.

  • C Switch Case Statements

    A switch statement—or simply a case statement—is a control flow mechanism that determines the execution of a program based on the value of a variable or an expression.

    Using a switch statement allows you to test multiple conditions and only execute a specific block if the condition is true. Although it works similarly to an if…else if….else statement, the syntax is simpler and easier to read and manage.

    This tutorial focuses on showing you how to create and work with switch statements in C programming.

  • Create and Use Array of Pointers in C

    Arrays and pointers are among the most fundamental data structures in the C language. They allow us to create flexible and easy-to-manage programs with only a few lines of code.

    Most of us are familiar with creating arrays with data types such as integers, characters, or floats. This guide will show you how to create an array of pointers and use it to store data.

  • Fgets Function in C

    The fgets function is defined in the C standard library (stdio.h) and used to read up to n characters from a specified stream such as standard input stream or file stream) to a string pointed with str.

    The C fgets function reads characters until it encounters an End-Of-File (EOF), a newline character, or when n-1 characters are read.

    This quick tutorial will discuss how to use the fgets function in C programs.

Programming Leftovers

Filed under
  • Fun with regular expressions: part I

    Some years ago, when i struggled to understand regular expressions, I found these experiments useful. The following is like my student's notes. I hope, someone will find it useful too.

    TL;DR: Regular expressions usually used for finding patterns in a string/text and also simple parsing tasks.

  • Fun with regular expressions: part II

    Important note: using the standard RE, it's impossible to match only DD-MM-YYYY or DDMMYYYY strings without matching DD-MMYYYY or DDMM-YYYY, because it's impossible to represent this in DFA form.

  • Fun with regular expressions: part III

    Like I stated before, RE often used for parsing. Here are more practical examples

  • Fun with regular expressions and verification using CBMC: part IV

    This is the most practically useful example in this series of blog posts. It can be used to parse config files in form option=number, but whitespaces are also handled -- around input string and around the 'equal' sign.

  • Object::Pad review Yuki Kimoto's 2021-08-21 - Constructor argument

    I start to review Paul Evans's Object::Pad from my personal thinking.

    Latest years, Perl core teams positively try to implement Object-Oriented feature to Perl core. I hope my review helps a little.

  • SixtyFPS 0.1 Released As A Rust-Focused Graphical Toolkit

    For passionate Phoronix readers around the Rust programming language, SixtyFPS is a new graphical toolkit offering focused on Rust but also supporting C++ and JavaScript.

    SixtyFPS has seen prior development releases but the first time we've been pointed out to it and the v0.1 milestone happens to mark the project's graduation from "lab mode" to something that can be "reasonably used to start development of a product."

Programming Leftovers

Filed under

Emmanuele Bassi: The GTK Documentation

Filed under

As you may have noticed, there have been various changes in the GNOME developer documentation website, as of late. These changes also affected the API references for GTK and its core dependencies.

What has changed

The main change is that GTK moved to a new documentation tool for its API reference and ancillary documentation, called gi-docgen. Unlike the previous documentation tool, gtk-doc, gi-docgen uses the introspection data that is generated by GObject-based libraries to build the API reference.

Read more

Also: Porting GNOME Design tools to GTK 4

Programming and Standards/Consortia

Filed under
  • Steinar H. Gunderson: plocate 1.1.9 released

    I've just released version 1.1.9 of plocate. It adds support for the -e (--existing) option from mlocate, since I needed it and it's nice to be complete.

  • Perl & Raku: Best frenemies

    Although the two lan­guages aren’t source-​compatible, the Inline::Perl5 mod­ule does enable Raku devel­op­ers to run Perl code and use Perl mod­ules with­in Raku, You can even sub­class Perl class­es in Raku and call Raku meth­ods from Perl code. I hadn’t real­ized until recent­ly that the Perl sup­port was so strong in Raku despite them being so dif­fer­ent, and so I thought I’d take the oppor­tu­ni­ty to write some sam­ple code in both lan­guages to bet­ter under­stand the Raku way of doing things.

    Rather than a sim­ple ​“Hello World” pro­gram, I decid­ed to write a sim­ple syn­di­cat­ed news read­er. The Raku mod­ules direc­to­ry didn’t appear to have any­thing com­pa­ra­ble to Perl’s WWW::Mechanize and XML::RSS mod­ules, so this seemed like a great way to test Perl-​Raku interoperability.

  • It's Time to Retire the CSV

    Another big drawback of CSV is its almost complete lack of metadata. While a human can often intuit what a file contains by looking at it, it’s much harder for software to do that without being given a lot of hints.

    Some variants of CSV (including RFC-4180) allow for the first row to be optionally used as a header, but few variants explicitly identify headers, leaving the parser either to be told there are headers or to try to make an educated guess.

    A column’s data type is even more difficult to determine automatically. Values in CSVs are just sequences of characters. They might represent more complex types, but there’s no way for a parser to know that type information just from looking at the file.

  • Vulkan SC 1.0 Coming For "Safety Critical" Graphics / Compute

    It's been over two years since The Khronos Group acknowledged they were working on safety critical Vulkan and now finally the 1.0 release is approaching for this graphics/compute interface suitable for safety critical systems.

    Khronos had maintained OpenGL SC as a safety critical subset of the OpenGL API for use in avionics, military equipment, medical devices, and other environments demanding stringent standards around safety. OpenGL SC though was last updated five years ago when OpenGL SC 2.0 was released. Moving forward, Vulkan SC is coming for next-generation safety critical systems for not only graphics but also compute.

Jamie McClelland: Anyone still using gitweb?

Filed under

It seems like the self-hosting git world has all moved to gitlab or gitea.

For a number of reasons not worth enumerating, I’m still running gitolite and recently decided I wanted to checkout my code via https using gitweb.

I got through most of the installation and configuration without trouble (I could browse via the web and see all my repositories). But, when I tried to git clone using the https address I got a fatal “not found” error.

It seems that gitweb, out of the box, allows for easy web-browsing of git repositories but needs some extra work if you want to clone over https. Specifically, you need to use git-http-backend.

Read more

Programming Leftovers

Filed under

  • John Goerzen: Distributed, Asynchronous Git Syncing with NNCP

    I have a directory that I use with org-mode and org-roam. I want it to be synced across multiple machines. I also want to keep the history with git. And, I want to use end-to-end encryption (no storing a plain git repo on a remote server), have a serverless setup, not require any two machines to be up simultaneously, and be resilient in the face of races and conflicts.

  • Top 10 Best Programming Languages to Learn in 2021 (Most In-Demand)

    Unlock your career opportunities to learn most in-demand Programming languages. In this article we have discuss top 10 best Programming languages to learn in 2021. Traditional programming languages become outdated over time, whereas the latest programming languages are introduced but never acquire momentum.

  • Making Taint support optional in Perl

    One of the changes to Perl that we're considering on p5p (the perl5-porters mailing list) is the removal of taint support. The first step towards that is to add a Configure option that lets you build a Perl without taint support.

    In this post I'll explain what we're considering, and why. The purpose of this post is to let everyone beyond p5p know about this, and give you a chance to comment.

  • A dream realized

    Have you heard that they are finally putting together a proposal to add a clean modern OO system into the core of Perl?

    If you haven’t, I strongly encourage you to look over the RFC for Corrina, or at least watch Ovid’s excellent presentation on the project.

    It’s reassuring that the list of contributors to the proposed design includes some of the most highly respected names in the Perl community, many of whom have previously taken one (or more!) tilts at this particular object-oriented windmill.

    Indeed, over the past two decades I too have repeatedly attempted to design and prototype richer and more robust OO systems for Perl, starting way back in the previous millennium with a brief stint as the maintainer of Class::Struct, and continuing on though the release of modules such as Class::Std, Class::Delegation, and most recently: Dios.

  • Python Iterators And Generators

    In this notebook, we would explore the difference between iterators and generators, how to use them and also the best use cases for each of them.

  • How to Graph in Python

    This article was contributed by Juni Learning, a learning platform for students ages 7-18 that offers 1:1 classes in computer science, math, and English. The article originally appeared on the Juni Learning website and is reposted here with permission.

    Hi, my name is Ritika and I’m a senior instructor at Juni Learning! Welcome to this basic Python data science tutorial.

    Today we’ll talk about how we can gather data and graph it in Python. Specifically, today we'll be working with survey data that we get beforehand from friends or family by asking what their favorite food is.

    We’ll learn how to create bar graphs specifically using dataframes and the Seaborn package.

  • Build a JAR file with fastjar and gjar |

    One of the many advantages of Java, in my experience, is its ability to deliver applications in a neat and tidy package (called a JAR, or Java archive.) JAR files make it easy for users to download and launch an application they want to try, easy to transfer that application from one computer to another (and Java is cross-platform, so sharing liberally can be encouraged), and easy to understand for new programmers to look inside a JAR to find out what makes a Java app run.

Syndicate content