Language Selection

English French German Italian Portuguese Spanish

Development

Programming/Development Leftovers

Filed under
Development
  • LibreOffice and Google Summer of Code 2021: The results

    This year, LibreOffice was once again a mentoring organization in the Google Summer of Code (GSoC), a global program focused on bringing more student developers into free and open source software development. Seven projects were finished successfully. Students and mentors enjoyed the time, and here we present some of the achievements, which should make their way into LibreOffice 7.3 in early February 2022!

  • I try match syntax using Syntax::Keyword::Match | Yuki Kimoto Perl Blog [blogs.perl.org]

    Syntax::Keyword::Match is a module to enable match syntax in the current Perl by Paul Evans who is one of the current Perl Steering Councils. See perlgov about the Perl Steering Council.

  • Crystal 1.2 programming language Released - itsfoss.net

    The release of the programming language Crystal 1.2 has been published , the developers of which are trying to combine the convenience of development in the Ruby language with the high application performance inherent in the C language. Crystal syntax is close to Ruby, but not fully compatible with it, despite the fact that some Ruby programs are executed without modification. The compiler code is written in Crystal and is licensed under the Apache 2.0 license.

    The language uses static type checking, implemented without the need to explicitly specify the types of variables and method arguments in the code. Crystal programs are compiled into executable files, with macro evaluation and code generation at compile time. In programs in the Crystal language, it is allowed to connect bindings written in the C language. Parallelization of code execution is carried out using the “spawn” keyword, which allows you to start a background task asynchronously without blocking the main thread, in the form of lightweight threads called fibers (Fiber).

  • Why Mark Text is my favorite markdown editor

    I got introduced to the markdown format a few years ago when I began to explore Jupyter Notebooks. Many of the other writers at Opensource.com knew markdown, but it was a skill that was unfamiliar to me.

    Markdown is a standard way of writing text, in which you use minimal notation to markup how you want the text styled. For instance, instead of clicking a button to make a word bold, you surround the word with two asterisks (**word**).

  • DeepMind Announces MuJoCo Physical Process Simulator - itsfoss.net

    The code is written in C / C ++ and will be published under the Apache 2.0 license. Linux, Windows and macOS platforms are supported. The work on the opening of all the source codes associated with the project is planned to be completed in 2022, after which MuJoCo will switch to an open development model, which implies the possibility of participation in the development of community representatives.

  • GNU dbm - News: Version 1.22

    Version 1.22 is available for download. This version includes several bugfixes and improves the documentation.

  • Excellent Free Tutorials to Learn Octave

    Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and non-linear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It is drop-in compatible with many Matlab scripts. It may also be used as a batch-oriented language.

    Octave has extensive tools for solving common numerical linear algebra problems, finding the roots of nonlinear equations, integrating ordinary functions, manipulating polynomials, and integrating ordinary differential and differential-algebraic equations. It is easily extensible and customizable via user-defined functions written in Octave’s own language, or using dynamically loaded modules written in C++, C, Fortran, or other languages.

Release candidate: Godot 3.4 RC 1

Filed under
Development
Gaming

The upcoming Godot 3.4 release will provide a number of new features which have been backported from the 4.0 development branch (see our release policy for details on the various Godot versions). With this first Release Candidate, we completely freezes feature development, and comes after a long series of beta builds to fix a number of bugs reported against previous builds (as well as against previous stable branches).

If you already reviewed the changelog for beta 6, you can skip right to the differences between beta 6 and RC 1. Notable changes are in-editor class reference translations (so far Chinese (Simplified), Spanish, and some French), some new rendering features (high quality glow mode, 3D point light attenuation option), and a number of C# marshalling fixes.

Read more

GitUI: A Blazing Fast Terminal Client for Git Written in Rust

Filed under
Development

The basic Git commands are good enough for the usual clone, add, commit push.

But if you are working on a large project with multiple contributors, you may need to visualize things. A GUI tool gives a better view on the diff, stash and blame.

But then, if you are a terminal dweller, who wants the comfort of GUI with Git, I have got a good tool for you.

It is called GitUI and it provides user experience and comfort similar to a git GUI but right in your terminal. It is portable, fast, free and open source.

Read more

Programming Leftovers

Filed under
Development
  • Use KPNG to Write Specialized kube-proxiers

    The post will show you how to create a specialized service kube-proxy style network proxier using Kubernetes Proxy NG kpng without interfering with the existing kube-proxy. The kpng project aims at renewing the the default Kubernetes Service implementation, the "kube-proxy". An important feature of kpng is that it can be used as a library to create proxiers outside K8s. While this is useful for CNI-plugins that replaces the kube-proxy it also opens the possibility for anyone to create a proxier for a special purpose.

  • Dirk Eddelbuettel: dang 0.0.14: Several Updates

    A new release of the dang package arrived at CRAN a couple of hours ago, exactly eight months after the previous release. The dang package regroups a few functions of mine that had no other home as for example lsos() from a StackOverflow question from 2009 (!!), the overbought/oversold price band plotter from an older blog post, the market monitor from the last release as well the checkCRANStatus() function recently tweeted about by Tim Taylor.

    This release regroups a few small edits to several functions, adds a sample function for character encoding reading and conversion using a library already used by R (hence “look Ma, no new depends”), adds a weekday helper, and a sample usage (computing rolling min/max values) of a new simple vector class added to tidyCpp (and the function and class need to get another blog post or study …), and an experimental git sha1sum and date marker (as I am not the fan of autogenerated binaries from repos as opposed to marked released meaning: we may see different binary release with the same version number).

  • Rakudo Weekly News: 2021.42 Learning With

    Daniel Sockwell was inspired by a blog post a few weeks ago about a bouncing balls demo. The result is a new framework for learning Raku, but this time with some nice graphics: Learn Raku With: HTML Balls. Apart from the technical points, it’s also a great way (for people without much programming experience) to get involved with Raku while creating graphics and animations, rather than textual output. Check it out!

  • Russ Allbery: rra-c-util 10.0

    It's been a while since I pushed out a release of my collection of utility libraries and test suite programs, so I've accumulated quite a lot of chanages. Here's a summary; for more, see the NEWS file.

  • 1.56.0 pre-release testing | Inside Rust Blog

    The 1.56.0 pre-release is ready for testing. The release is scheduled for this Thursday, October 21th. Release notes can be found here.

  • Apple Announces The M1 Pro / M1 Max, Asahi Linux Starts Eyeing Their Bring-Up

    Apple today announced the M1 Pro and M1 Max as their most powerful SoCs ever built by the company. The new chips feature up to a 10-core processor, 32-core GPU, and up to 64GB of unified memory.

    While the Apple M1 was already well regarded for its speed, the M1 Pro and M1 Max are said to deliver up to 70% faster CPU performance than last year's M1. Meanwhile the GPU within the M1 Pro is up to 2x faster than the M1 while the M1 Max's GPU is said to be 4x faster.

Programming Leftovers

Filed under
Development
  • Sin function in C

    In mathematics, the sine function is among three primary functions, others comprising cosine and tan. Techniques for executing basic mathematical operations, like the elementary exponential, logarithmic, square root, and mathematical operations, are included in the <math.h> header. You must include the header file <math.h> to utilize these functions. The sin function accepts an angle in radians and gives its sine value, which can be confirmed using a sine curve.

    You may use the law of sine to find any arbitrary angle in a triangle, as well as the length of a certain triangle side. This is a fundamental trigonometric notion. The sin function is used in the ANSI/ISO 9899-1990 versions of the C language. Sin () returns a result that is between 1 and -1.

    Now, let us start with a few examples of sin() function in the C programming language.

  • Dirk Eddelbuettel: RcppQuantuccia 0.0.4 on CRAN: Updated Calendar

    A new release of RcppQuantuccia arrived on CRAN earlier today. RcppQuantuccia brings the Quantuccia header-only subset / variant of QuantLib to R. At the current stage, it mostly offers date and calendaring functions.

    This release is the first in two years and brings a few internal updates (such as a swift to continuous integration to the trusted r-ci setup) along with a first update of the United States calendar. Which, just like RQuantLib, now knows about two new calendars LiborUpdate and FederalReserve.

  • System/Linux/DevOps Engineer Interview - Invidious

    An interview with a fellow Linux Engineer / System Engineer / DevOps Engineer / Programmer / Tech Person -- Craig has an interesting background, and some amazing advice for those of you breaking into the tech industry right now.

  • ninja Build system, and renamed files

    I've been hearing about ninja, I had looked at it some time in the past, and did some local basic benchmarking (using time), and didn't find a huge difference in build times, both from scratch and incrementally. I tried ninja again recently and found one feature that sells it pretty well to me, it can show the build progress on one line in the terminal.

  • The Return of the Unix Shell

    With about half a century of life, the Unix shell is pervasive and entrenched in our computing infrastructure—with recent virtualization and containerization trends only propelling its use. A fresh surge of academic research highlights show potential for tackling long-standing open problems that are central to the shell and enable further progress. A recent panel discussion at HotOS ’21 concluded that improvements and research on the shell can be impactful and identified several such research directions. Maybe it’s time for your research to be applied to the shell too?

  • Python CGI example

    CGI is abbreviated as Common Gateway Interface in Python, which is a block of benchmarks to explain the exchange of data among the web server and a script. A CGI program is written by an HTTP server as the user input is entered through the HTML . In other words, it is a collection of procedures that are used to build a dynamic interaction between the client and the server application. When a client uses any element or sends a request to the web browser, that CGI executes a particular request, and the result or the output is sent back to the webserver.

  • How do I check if a string contains another substring in Python

    Sometimes we need to find out whether a particular string is present in another string or not. So to know that there are some already pre-defined methods available in Python programming.

  • How to disable scrolling on a webpage with JavaScript

    JavaScript is a web language used for creating dynamic web pages and making them interactive for users. Through JavaScript we can perform various functions, change CSS of HTML elements, perform actions on each click and many more.JavaScript makes the page of our website more interactive and adds dynamic behaviors to it, we can create various menus, drop down menus, scroll bars etc. We can even enable and disable the behaviour of each of these components using JavaScript. In this article we’ll see how to disable scrolling on a webpage using JavaScript.

  • How to check if an array is empty in JavaScript

    Knowing how to check for an empty array is an important coding skill which can often come in handy. It can be helpful in a situation where you have to show or hide something on a web page depending on whether the array is empty or not.

    Similarly, there are many other places where you will find this skill helpful. The purpose of this post is to explain the code, the concept behind the code and the most common use cases of checking for empty arrays in JavaScript code.

  • OpenCL 3.0.9 Specification Released - Phoronix

    The Khronos Group's OpenCL working group did a quiet Friday evening tagging of OpenCL 3.0.9.

    Most notable with OpenCL 3.0.9 as this routine specification update are the specification sources now being included for the provisional extensions adding semaphores and external memory support to OpenCL. Those extensions were originally announced this spring as part of OpenCL 3.0.7 but the specification ASCII doc sources were not included until now.

  • Computer scientists at University of Edinburgh contemplate courses without 'Alice' and 'Bob' [Ed: This isn't the way to promote equality but to garner animosity towards those who claim to be promoting this cause]

    A working group in the School of Informatics at the University of Edinburgh in Scotland has proposed a series of steps to "decolonize" the Informatics curriculum, which includes trying "to avoid using predominantly Western names such as Alice/Bob (as is common in the computer security literature)."

    The names Alice and Bob were used to represent two users of a public key cryptography system, described in a 1978 paper by Ronald Rivest, Adi Shamir, and Leonard Adleman, "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems." And since then, a variety of other mostly Western names like Eve – playing an eavesdropper intercepting communications – have been employed to illustrate computer security scenarios in related academic papers.

    The School of Informatics' working group reflects the University of Edinburgh's commitment to diversity, equity, and inclusion and to meet specific obligations spelled out in Scottish regulations like the Equality Act 2010 and the Public Sector Equalities Duty.

    The naming recommendation was reported last month by The Telegraph, which cited internal university documents. The Register filed a Freedom of Information Request with the University to obtain the documents, which were added to the University's website following the Telegraph report.

    [...]

    Examples cited in the document include "to avoid using master/slave to represent computing agents and instead use coordinator or workers" – a decision taken by numerous open source projects and companies in recent years – and to avoid using off-putting stereotypes during instruction.

Software developers have stopped caring about reliability

Filed under
Development

Of all the principles of software engineering which has fallen by the wayside in the modern “move fast and break things” mentality of assholes modern software developers, reliability is perhaps the most neglected, along with its cousin, robustness. Almost all software that users encounter in $CURRENTYEAR is straight-up broken, and often badly.

Honestly, it’s pretty embarassing. Consider all of the stupid little things you’ve learned how to do in order to work around broken software. Often something as simple as refreshing the page or rebooting the program to knock some sense back into it — most users can handle that. There are much stupider problems, however, and they are everywhere. Every morning, I boot, then immediately hard-reboot, my workstation, because it seems to jigger my monitors into waking up properly to do their job. On many occasions, I have used the browser dev tools to inspect a broken web page to figure out how to make it do the thing I want to do,1 usually something complicated like submitting a form properly (a solved problem since 1993).

When the average person (i.e. a non-nerd) says they “don’t get computers”, I believe them. It’s not because they’re too lazy to learn, or because they’re backwards and outdated, or can’t keep with the times. It’s because computers are hard to understand. They are enegmatic and unreliable. I know that when my phone suddenly stops delivering SMS messages mid-conversation, it’s not because I’ve been abandoned by my friend, but because I need to toggle airplane mode to reboot the modem. I know that when I middle click a link and “javascript:;” opens in a new tab, an asshole a developer wants me to left click it instead. Most people don’t understand this! You and I, dear reader, have built up an incredible amount of institutional knowledge about how to deal with broken computers. We’ve effectively had to reverse engineer half the software we’ve encountered to figure out just where to prod it to make it do the thing you asked. If you don’t have this background, then computers are a nightmare.

Read more

C/C++ Programming/Development

Filed under
Development
  • How to pass a struct to a function in C

    A structure has been widely used as a user-defined data type in the C language. The purpose of using structures in C is to create a single data type that would be used further to group various data type variables or elements into one type. The structure has been used as a global variable so all the functions can access it easily. This means it can’t be declared in the main method so that we can use it anywhere.

  • C++ String Reverse

    If the string, “vwxyz“, is reproduced in the new order as, “zyxwv“.

    Then the string has been reversed. Unfortunately, such direct reversibility is not possible in C++. However, there is a classical workaround for reversing a string in C++. Keep reading this article to know-how.

    A string can be created in two main ways in C++. A string can be created as a constant pointer to a sequence of characters. A string can also be created by instantiating a string object from the string class. This article deals with string objects instantiated from the string class. This means the string library has to be included in order to execute the code samples in this article.

    A string object is a data structure where the string literal is a list. Each character is of one element in the list. And so, a literal string can be handled like an array of elements.

    This article explains the classical workaround to reverse a string in C++. This essentially iterates the string literal, backward. Having a summary knowledge of forward iteration enables the reader to understand reverse iteration better. This article deals with string objects instantiated from the string class.

  • C++ String starts with

    There comes a time when the programmer has to know what a string starts with. This knowledge can be used to choose or eliminate items in a list of characters. So, a programmer may want to know if a string starts with a particular character or with a particular sub-string. A programmer can write code that will check the initial characters of a string, one-by-one, and compare that with a prefix sub-string. However, all the strategies involved have already been done by the C++ string library.

    The C++ string class of the string library has the member function, starts_with(). This does the work for the programmer, but the programmer needs to know how to use the function. And that is why this tutorial is being produced. There are three variants of the string starts_with() member function. Variants of the same function are called overloaded functions.

    The basic approach for the start_with() member function is to compare a short independent sub-string with the first short segment of the string in question. If they are the same, then the function returns true. If they are different, the function returns false.

  • Function Overloading in C

    Function overloading is a very well-known concept used in object-oriented languages having many functions with the same name and different parameters in a single code. The object-oriented programming languages which support function overloading include Java and C++. As the C compiler doesn’t allow it to be used in the code hence, it isn’t easy to implement function overloading in C. Yet; we can still achieve the same thing with some technique. Let’s start this article with the opening of the shell terminal of Ubuntu 20.04 LTS.

Emmanuele Bassi: GWeather next

Filed under
Development
GNOME

Libgweather, the small GNOME library that queries weather services, is getting a major version bump to allow applications using it to be ported to GTK4.

In the beginning, there was a weather applet in the GNOME panel. It had a bunch of code that poked at a couple of websites to get the weather information for a given airport or weather observation stations, and shipped with a list of locations and their nearest METAR code.

In 2007, the relevant code was moved to its own separate repository, so that other applications and system settings could reuse the same code as the panel applet: the libgweather library was born. Aside from the basic weather information and location objects, libgweather also had a couple of widgets: one for selecting a location (with autocompletion), and one for selecting a timezone using a location.

Since libgweather was still very much an ad hoc library for a handful of applications, there was no explicit API and ABI stability guarantee made by its maintainers; in fact, in order to use it, you had to “opt in” with a specific C pre-processor symbol.

Time passed, and a few more applications appeared during the initial GNOME 3 cycles—like Weather, followed by Clocks a month later. Most of the consumers of libgweather were actually going through a language binding, which meant they were not really “opting into” the API through the explicit pre-processor symbol; it also meant that changes in the API and ABI could end up being found only after a libgweather release, instead of during a development cycle. Of course, back then, we only had a single CI/CD pipeline for the whole project, with far too little granularity and far too wide scope. Still, the GWeather consumers were few and far between, and the API was not stabilised.

Read more

Also GNOME: Alexander Larsson: Quadlet, an easier way to run system containers

Programming Leftovers

Filed under
Development
  • How the Integrated Gradients method works? - Vincent Lequertier's blog

    For artificial intelligence (AI) transparency and to better shape upcoming policies, we need to better understand the AI’s output. In particular, one may want to understand the role attributed to each input. This is hard, because in neural networks input variables don’t have a single weight that could serve as a proxy for determining their importance with regard to the output. Therefore, one have to consider all the neural network’s weights, which may be all interconnected. Here is how Integrated Gradients does this.

  • Want a piece of GitLab? It's going to cost you: IPO price per share settles at $77

    The one-stop shop approach by DevOps darling GitLab appears to have attracted an Initial Public Offering price of $77, giving the loss-making biz a potential valuation of $11bn

    GitLab finally filed for an IPO in September and this week upped the estimated price per share to between $66 and $69. The eventual price has turned out to be $77, well above the initial $55 to $60 first estimated.

    8.42 million shares of Class A common stock are being sold. Founder and CEO Sytse Sijbrandij is selling another 1.98 million shares, according to the filing. Should that $77 price survive the start of trading today, GitLab's market value will nudge past $11bn.

  • Functional vs. object-oriented programming: The basics

    Committing to a programming paradigm is an important step in any application development effort. While they are hardly the only two options when it comes to overarching development models, the choice between functional programming and object-oriented programming is one that an increasing number of developers face today.

  • There is no 'printf'.

    Pop quiz! What will the following program return?

  • Malicious packages mitmproxy2 and mitmproxy-iframe removed from PyPI directory - itsfoss.net

    The author of mitmproxy , a tool for analyzing HTTP / HTTPS traffic, drew attention to the appearance of a fork of his project in the Python Package Index (PyPI) directory. The fork was distributed under the similar name mitmproxy2 and the non-existent version 8.0.1 (current release of mitmproxy 7.0.4) with the expectation that inattentive users will perceive the package as a new version of the main project ( typesquatting ) and wish to try the new version.

    In terms of its composition, mitmproxy2 was similar to mitmproxy, with the exception of changes in the implementation of malicious functionality. The changes were reduced to the termination of setting the HTTP header ” X-Frame-Options: DENY “, which prohibits the processing of content inside the iframe, disabling protection against XSRF attacks and setting the headers ” Access-Control-Allow-Origin: * “, ” Access-Control- Allow-Headers: * “and” Access-Control-Allow-Methods: POST, GET, DELETE, OPTIONS “.

  • Perl Weekly Challenge 134: Pandigital Numbers and Distinct Term Count
  • Sourcing vs executing in Bash

    What if, from the shell prompt, I could source the script, to bring the function definitions into my current environment, and then manually invoke the check function on a single pull request?

    Sourcing the script as it is would have the unwanted effect of running checks on all the pull requests, because the last line in the script actually invokes main, as it’s supposed to.

  • Rust-Based Cloud-Hypervisor 19.0 Released With Improved Live Migration, Faster Boot Time - Phoronix

    Cloud-Hypervisor 19.0 debuted this week as the Intel-led open-source VMM focused on supporting modern cloud workloads and written in the Rust programming language while leveraging the Linux's KVM virtualization code or the Microsoft MSHV hypervisor on Windows.

    Cloud-Hypervisor 19.0 continues to focus on only supporting 64-bit software, providing a minimal attack surface and other security improvements in part by leveraging Rust, and other modern-focused design principals.

  • Dyn async traits, part 6

    A quick update to my last post: first, a better way to do what I was trying to do, and second, a sketch of the crate I’d like to see for experimental purposes.

Programming Leftovers

Filed under
Development
  • ThreatMapper: Open source platform for scanning runtime environments - Help Net Security

    Deepfence announced open source availability of ThreatMapper, a signature offering that automatically scans, maps and ranks application vulnerabilities across serverless, Kubernetes, container and multi-cloud environments.

  • Josef Strzibny: Organizing business logic in Rails with contexts

    Rails programmers have almost always tried to figure out the golden approach to business logic in their applications. From getting better at object-oriented design, to service objects, all the way to entirely new ideas like Trailblazer or leaving Active Record altogether. Here’s one more design approach that’s clean yet railsy.

  • Status update, October 2021

    On this dreary morning here in Amsterdam, I’ve made my cup of coffee and snuggled my cat, and so I’m pleased to share some FOSS news with you. Some cool news today! We’re preparing for a new core product launch at sr.ht, cool updates for our secret programming language, plus news for visurf.

    Simon Ser has been hard at work on expanding his soju and gamja projects for the purpose of creating a new core sourcehut product: chat.sr.ht. We’re rolling this out in a private beta at first, to seek a fuller understanding of the system’s performance characteristics, to make sure everything is well-tested and reliable, and to make plans for scaling, maintenance, and general availability. In short, chat.sr.ht is a hosted IRC bouncer which is being made available to all paid sr.ht users, and a kind of webchat gateway which will be offered to unpaid and anonymous users. I’m pretty excited about it, and looking forward to posting a more detailed announcement in a couple of weeks. In other sourcehut news, work on GraphQL continues, with paste.sr.ht landing and todo.sr.ht’s writable API in progress.

    Our programming langauge project grew some interesting features this month as well, the most notable of which is probably reflection. I wrote an earlier blog post which goes over this in some detail. There’s also ongoing work to develop the standard library’s time and date support, riscv64 support is essentially done, and we’ve overhauled the grammar for switch and match statements to reduce a level of indentation for typical code. In the coming weeks, I hope to see date/time support and reflection fleshed out much more, and to see some more development on the self-hosted compiler.

    [...]

    The goal of this project is to provide a conservative CSS toolkit which allows you to build web interfaces which are compatible with marginalized browsers like Netsurf and Lynx.

  • Monthly Report - September

    The month of September is very special to me personaly.

    Why?

    Well, I got married in the very same month 18 years ago. The best part is, I choose the day 11 to get married. I have never missed my wedding anniversary, thanks to all the TV news channel.

  • My Favorite Warnings: uninitialized | Tom Wyant [blogs.perl.org]

    This warning was touched on in A Belated Introduction, but I thought it deserved its own entry.

    When a Perl scalar comes into being, be it an actual scalar variable or an array or hash entry, its value is undef. Now, the results of operating on an undef value are perfectly well-defined: in a nuneric context it is 0, in a string context it is '', and in a Boolean context it is false.

    The thing is, if you actually operate on such a value, did you mean to do it, or did you forget to initialize something, or initialize the wrong thing, or operate on the wrong thing? Because of the latter possibilities Perl will warn about such operations if the uninitialized warning is enabled.

Syndicate content

More in Tux Machines