Language Selection

English French German Italian Portuguese Spanish

Development

Python and Perl Programming

Filed under
Development
  • All Pythonistas should switch to Go… or okay, maybe just half

    But not those at Google, Uber, Dropbox, Soundcloud, Slack, and Medium. The programmers at top corporations have long fallen for the language with the cute mascot.

  • Python Has Become the Most Popular Language, According to TIOBE

    According to a TIOBE statement in October 2021, Python is now the most popular programming language in the world.

    According to the latest ratings from the software company TIOBE, Python is now the most popular programming language in the world. The so-called TIOBE Index is based on the number of language searches performed online, which may also be a measure of a language’s popularity.

  • Programming languages: This major update for Python has just arrived
  • Top 10 In-Demand Programming Language that Will Rule in 2021
  • gfldex: Double inspiration

    Quite a few of the posts prior to this one where inspired by a post of fellow blogger. I would like to double down on that today. Vadim wrangled with symbols and Fabio enjoyed renaming them. Having struggled with packages in the past, Vadim’s post was very helpful in making me realise, .HOW is how I can get hold of the object that is the package. And if Perl can do it, there is surely no way to stop Raku to have the same capability.

    We want to re-export functions while changing their name. Just adding a prefix will do for now. That presents the first problem. Currently, there is no way to get named arguments to use handed to sub EXPORT. Any Hash will also be gobbled up. All we have are positional parameters. Since Raku is omni-paradigmatic, that wont pose a challenge.

  • Hackers And China | Hackaday

    The open source world and Chinese manufacturing have a long relationship. Some fifteen years ago, the big topic was how companies could open-source their hardware designs and not get driven bankrupt by competition from overseas. Companies like Sparkfun, Adafruit, Arduino, Maple Labs, Pololu, and many more demonstrated that this wasn’t impossible after all.

Programming Leftovers

Filed under
Development
  • Youth Hacking 4 Freedom – from the Free Software Foundation Europe

    And there’s more: Thorsten Behrens from The Document Foundation’s Board of Directors is on the jury. So, if you fill the requirements listed above and want to get hacking on a project, join in!

  • Dirk Eddelbuettel: corels 0.0.3 on CRAN: Update

    An updated version of the corels package is now on CRAN!

    The change is chiefly an updated configure.ac (just like RcppGSL yesterday, RQuantLib two days ago, and littler three days ago.

  • Excellent Free Tutorials to Learn OpenMP - LinuxLinks

    OpenMP (Open Multi-Processing) is an open standard API for Shared Memory parallelization in C, C++ and Fortran which consist of three primary API components: compiler directives, runtime routines and environment variables.

    An OpenMP-parallelised application starts as a serial application that runs on a single compute core. When instructed by the programmer, the application spawns a number of threads, which can run concurrently on separate cores. Thus, work can be distributed to leverage more resources.

    Here’s our recommended OpenMP tutorials.

  • Open source developers are unique: Tips for working with and managing community-centric dev teams [iophk: the TechRepublic link is about IBM, so maybe it should not be included]

    Is there anything unique about working with, managing or being an open source developer. On a recent episode of Dynamic Developer, I spoke with Todd Moore, vice president for open technology and developer advocacy, at IBM about these topics as well what he looks for when hiring open source developers, the right way for companies to turn their open source projects into open standards and some of the coolest open technology initiatives IBM is working on.

    Todd has a long history in software and hardware development and is a leader in the open source world. He and his team of developers have worked with leading open source communities like the Apache Software Foundation, Linux Foundation, Eclipse and OpenStack.

    The following is a transcript of the interview, edited for readability. You can listen to the podcast player embedded in this article, watch a video above or read a transcript of the interview below.

  • Perl Weekly Challenge 133: Integer Square Roots and Smith Numbers

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

    Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 10, 2021 at 23:59). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.

  • Python Provides Classic Basic | Hackaday

    Back in the late 1970s and early 1980s when you turned on a PC, more often than not, you’d get a Basic prompt. Most people would then load a game from a tape, but if you were inclined to program you could just start writing. [Richpl] wanted that same experience and thus PyBasic was born.

  • Solution another YandexQ question via sieve of eratosthenes in Python

Mozilla and Programming Leftovers

Filed under
Development
Moz/FF
  • Reducing the Overhead of Profiling Firefox Sleeping Threads – Mozilla Performance

    Firefox includes its own profiler: Visit profiler.firefox.com to enable it, and the user documentation is available from there.

    The main advantages compared with using a third-party profiler, are that it’s supplied with Firefox, it can capture screenshots, it understands JavaScript stacks, and Firefox is adding “markers” to indicate important events that may be useful to developers.

    Its most visible function is to capture periodic “samples” of function call stacks from a number of threads in each process. Threads are selected during configuration in about:profiling, and can range from a handful of the most important threads, to all known threads.

    This sampling is performed at regular intervals, by going through all selected threads and suspending each one temporarily while a sample of its current stack is captured (this is known as “stack walking”). This costly sampling operation can have a non-negligible impact on how the rest of the Firefox code runs, this is the “overhead” of the Profiler. In order to be able to sample as many threads as possible with the smallest impact, there is ongoing work to reduce this overhead.

  • Lots to see in Firefox 93! - Mozilla Hacks - the Web developer blog

    Firefox 93 comes with lots of lovely updates including AVIF image format support, filling of XFA-based forms in its PDF viewer and protection against insecure downloads by blocking downloads relying on insecure connections.

    Web developers are now able to use static initialization blocks within JavaScript classes, and there are some Shadow DOM and Custom Elements updates. The SHA-256 algorithm is now supported for HTTP Authentication using digests. This allows much more secure authentication than previously available using the MD5 algorithm.

  • GCC, Clang[d], LSP client, Kate and variadic macro warnings, a short story

    Kate has had an LSP plugin for sometime now, which uses Clangd. It's a great plugin that brings many code navigation/validation features, akin to those available in Qt Creator and KDevelop.

    So naturally since I got it to work, I've been using it. At some point I found out about the Diagnostics tab in the LSP Client tool view in Kate, which displays useful information; however I also saw that it was plagued by a spam of the following warnings...

  • GCC 12 Enables Auto-Vectorization For -O2 Optimization Level - Phoronix

    The change merged today is enabling the auto-vectorizer at the -O2 optimization level rather than only at -O3 and above. The auto-vectorizer is enabled by default with -O2 and using its "very cheap" cost model. The very cheap model enables vectorization if the scalar iteration count is a multiple of four, it is the "cheapest" of these cost models. Meanwhile the default cost model for vectorization at -O3 is "dynamic" for having more checks to try to determine if a vectorized code path will be faster.

  • Jon Chiappetta: Reddit Refresher Javascript Bookmark
  • Dirk Eddelbuettel: RcppGSL 0.3.10: Small Updatex

    A new release 0.3.10 of RcppGSL is now on CRAN. upload](https://dirk.eddelbuettel.com/blog/2020/06/21#rcppgsl_0.3.8). The RcppGSL package provides an interface from R to the GNU GSL by relying on the Rcpp package.

    This release brings a requested configure.ac update (just like RQuantLib yesterday and littler two days ago, along with the at-work tiledb update today). It also adds a small testing improvement. No user-visible changes, no new features. Details follow from the NEWS file.

  • Lang team October update

    This week the lang team held its October planning meeting (minutes). We hold these meetings on the first Wednesday of every month.

  • This Week In Rust: This Week in Rust 411

3 new features of the latest OpenPGP.js version

Filed under
Development
Security

OpenPGP.js is a cryptography library that implements the OpenPGP standard, most commonly used for email encryption. ProtonMail, Mailvelope, and FlowCrypt all use OpenPGP.js, to name a few. That means the OpenPGP.js library encrypts millions of users' messages.

The OpenPGP standard, first published in the 1990s, like almost anything, requires maintenance and updating for both security and usability. A "crypto refresh" of the standard is in the works, which adds modern encryption algorithms and deprecates outdated ones. To improve usability, various email applications now allow users to seamlessly encrypt their communication—without managing their keys or those of their contacts.

First released in 2014, OpenPGP.js began based on an early prototype called GPG4Browsers, which is based on several scripts by Herbert Hanewinkel (among other contributors). The second version of OpenPGP.js, released in 2016, was completely reworked to use Uint8Arrays instead of strings (which significantly increased its performance) and modern ES6 modules rather than CommonJS modules internally. Versions 3 and 4, both released in 2018, added support for Elliptic-curve cryptography (ECC) and streaming, respectively.

Read more

Programming Leftovers

Filed under
Development
  • Intel C For Metal Compiler Updated With Support For XeHP & DG1 - Phoronix

    Intel's CM Compiler is out with its first big update since earlier in the year for advancing their "C For Metal" GPU programming language effort.

    One of Intel's (open-source) GPU computing projects we don't often hear too much talk about is their C for Metal (CM) compiler. Intel C for Metal is a general purpose GPU programming language designed to provide close-to-Assembly level performance on Intel graphics hardware. C for Metal can be used for media processing and other domains at great speed. Those looking for a tutorial / sample code around CM can find Intel's documentation on 01.org.

  • Dirk Eddelbuettel: RQuantLib 0.4.14: More Calendars plus Update

    A new release 0.4.14 of RQuantLib was uploaded to CRAN earlier today, and has by now been uploaded to Debian as well.

    QuantLib is a very comprehensice free/open-source library for quantitative finance; RQuantLib connects it to the R environment and language.

  • Two security improvements for GCC [LWN.net]

    It has often been said that the competition between the GCC and LLVM compilers is good for both of them. One place where that competition shows up is in the area of security features; if one compiler adds a way to harden programs, the other is likely to follow suit. Qing Zhao's session at the 2021 Linux Plumbers Conference told the story of how GCC successfully played catch-up for two security-related features that were of special interest to the kernel community.

  • Improvements to GCC's -fanalyzer option

    For the second year in a row, the GNU Tools Cauldron (the annual gathering of GNU toolchain developers) has been held as a dedicated track at the online Linux Plumbers Conference. For the 2021 event, that track started with a talk by David Malcolm on his work with the GCC -fanalyzer option, which provides access to a number of static-analysis features. Quite a bit has been happening with -fanalyzer and more is on the way with the upcoming GCC 12 release, including, possibly, a set of checks that have already found at least one vulnerability in the kernel.

    When GCC is invoked with -fanalyzer, it runs a module that creates an "exploded graph" combining information on the state of the program's control and data flow. That state includes an abstract representation of memory contents, known constraints on the values of variables, and information like whether the code might be running in a signal handler. The analyzer then uses this graph to try to explore all of the interesting paths through the code to see what might happen.

  • GNU Toolchain Begins Landing RISC-V Bitmanip/Zbs Instructions Support

    The GNU toolchain (initially with the GNU Assembler) has begun landing support for RISC-V's Zbs instructions that are part of the Bitmanip extension to the processor ISA.

    Zbs is part of RISC-V's Bitmanip extension, the "bit manipulation" additions to the RISC-V architecture focused on delivering code size reduction, better performance, and lower energy consumption. The 1.0 Bitmanip extension was frozen this summer and thus now moving on to compiler/toolchain support. More details on Bitmanip and the specific Zbs instructions via this repository.

  • Qt for Python release: 6.2 is here!

    We are really happy to tell you that following the Qt release, Qt for Python is also available!

    Many things happened on this release, we decided to communicate a little more on the details of the major milestones that we achieved on this release.

    You might have notice that last week only the Windows wheels are available on PyPi, that was due to the wheel size increase from the new modules, but luckily the PyPi team managed to address this quickly.

  • Excellent Free Tutorials to Learn Nim - LinuxLinks

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. The syntax of Nim resembles that of Python.

    It is designed to be “efficient, expressive, and elegant” supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages.

    The compiler and the standard library are licensed under the MIT license.

  • BBC Micro:bit Reads Morse Code With MakeCode | Hackaday

    We always have mixed feelings about the drag-and-drop programming languages. But we were impressed with [SirDan’s] Morse code decoder built with the graphical MakeCode. Granted, it is reading 5 element groups from a button on the BBC micro:bit and not worrying about details such as intercharacter or interelement spacing or word spacing. But it is still a nice demo for MakeCode.

  • My Favorite Warnings — A Belated Introduction | Tom Wyant [blogs.perl.org]

    A couple installments into this series of blog posts, I realized an introduction to Perl warnings would be appropriate, with some words on how to turn them off, and why you probably do not want to. Yes, this should have been the first post in the series, but I didn't know it would actually be a series, and, well, maybe better late than never.

    The Perl compiler/interpreter can emit warnings when it finds things that may indicate a problem with the code. These are not (yet) enabled by default, but experience has shown that enabling them can highlight conceptual and logic errors.

    Back in the early days of Perl 5, these were enabled using the -w command-line option, or by setting the $^W variable to a true value. But this mechanism had two drawbacks: it was all-or nothing, and it was global in scope. Certainly the value of $^W could be localized, but localization does not prevent a called module from seeing changes made by its caller.

  • Dyn async traits, part 4

    In the previous post, I talked about how we could write our own impl Iterator for dyn Iterator by adding a few primitives. In this post, I want to look at what it would take to extend that to an async iterator trait. As before, I am interested in exploring the “core capabilities” that would be needed to make everything work.

Programming Leftovers

Filed under
Development
  • Check Java processes on Linux with the jps command | Opensource.com

    On Linux, there are commands to view processes running on your system. A process is any ongoing event being managed by the kernel. A process is spawned when you launch an application, but there are also many other processes running in the background of your computer, including programs to keep your system time accurate, to monitor for new filesystems, to index files, and more. The utilities, such as those included in the procps-ng package, that monitor these processes tend to be intentionally generic. They look at all processes on your computer so you can filter the list based on what you need to know.

    On Linux, you can view processes with the ps command. It is the simplest way to view the running processes on your system.

  • How to remove special characters using sed

    Sed command is a Linux utility that can be used to perform lot of operations that includes insert and delete operations, find/search and replace operations. The sed command allows Linux users to edit and apply several functions on files without opening them directly. The sed command support editing functionalities that vary from beginners’ level to advanced level: For instance, inside a text file these operations can be performed on several datatypes: characters, numeric, special characters, alphanumeric et.,

    Keeping in view the importance of sed command; our today’s guide will explore several ways to remove special characters using sed command in Ubuntu.

  • How to use sed character classes

    Stream Editor (sed) is known as a powerful editor because of its wide range of supported functionalities like substituting, editing, deleting and many more. While Stream Editor has the long list of characters that provide assistance to manage the files automatically: these characters are enclosed in a set of similar characters known as Character Classes; these classes contain the characters of alike families.

    For instance, the digits while using sed are accessed through [[:digit:]] class and the alphanumeric characters are stored in the class named as [[:alnum:]]. Similarly, all the characters belong to some specific character class; knowing the importance of these classes, our today’s guide is focused to provide a deep insight into character classes in sed.

  • Bash Associative Array Explained With Examples In Linux - OSTechNix

    This is the second article as part of bash arrays. In the previous article, we have discussed how to work with Indexed arrays in Bash. In this guide, we will discuss about Bash Associative Array in detail with examples in Linux.

    Associative arrays work based on key-value pairs. In some languages, it is also called dictionaries or hash maps. The main difference between Indexed and Associative arrays is, Indexed arrays works based on index value, and each element in the array is mapped to a particular index position of the array. An associative array uses a "key" to map the value instead of index positions.

  • How to open URL in python

    Python is an interpreted language; it has different libraries to perform various functions. A Uniform Resource Locator (URL) is actually a web address to open a specific site. Sometimes while working in python we need to fetch data from a website, for this we have to open the url of a specific website. So, to open a URL in python we need to import the specified module and perform some steps to open that URL. In this article we will discuss how to open a URL in Python using “urllib.request” and “webbrowser” modules on Ubuntu (Linux OS) through a defined procedure.

  • How to use Python readline() function

    There are many useful methods of Python which we can use in our programs. One of the handy methods is python readline() method, it reads one complete line from a specified file at a time by default. You can also read more than one line or complete file using readline() method using different conditions like using size argument. The readline() method inserts a new line (\n) at the end of returned String.

    In this Article we discussed the usage of the readline() method in python and how to run it on a Linux system.

  • How to Rename File in Python

    We can rename files in Linux terminal using different approaches, one of the approaches is using Python which is discussed in this article. We cannot write Python code directly on the terminal, we create a separate file in a text editor. The “rename” is one of the operating system functions so we will use a Python OS module for this purpose.

  • Rakudo Weekly News: 2021.40 It’s here!

    With a MoarVM, NQP and Rakudo merge (at 922 commits and 335 files changed by 16 contributors), the work on the new-disp branch that started about 18 months ago, was finally made mainstream. Special kudos to everybody who was involved in what was the biggest internal change since the MoarVM backend was initially conceived. Jonathan Worthington reports about in The new MoarVM dispatch mechanism is here! (/r/rakulang, Twitter comments).

  • vrurg: Merging Symbols Issue
  • How to Remove Characters from Strings in JavaScript

    JavaScript provides users with various methods and properties for string manipulation, to transform those strings or to search useful information from those strings. Sometimes we have various lines of code in which we need to make changes, search for a character or replace a character or remove a character from a string.

    All these tasks become difficult to do and hence methods are provided by JavaScript that makes the job easier. Users can easily use these methods to manipulate a string and transform it. In this article we’ll discuss how to remove characters from strings in JavaScript, various ways and methods provided by JavaScript along with examples for your better understanding.

  • How to remove white empty spaces from Strings in JavaScript

    Manipulating string is a useful task while programming as it helps us in finding words, replacing words and especially for removing white spaces from string. JavaScript provides various built-in methods to users for manipulating with strings.

    Removing whitespaces from a string can be complex when it comes to tabs and line breaks and while you’re working with various lines of codes but JavaScript provides users with methods through which it becomes easier to manipulate strings and remove whitespaces from them and that’s why in this article we’ll discuss different methods and ways to remove whitespaces from a string in JavaScript, their explanation and how they’re used along with examples.

  • How to use git stash and git stash pop commands

    Git helps to control the version of your projects. Git is a well-known software used by programmers to work in a collaborative manner to achieve specific goals. The Git repositories are hosted by GitHub that helps to work online and assist the programmers to share their project or code files there. Moreover, Git is backed up by several operations or commands also like Git stash, Git stash apply, Git stash pop, Git stash drop. Inspired by the importance of Git, today’s guide will provide fundamental information about Git stash and Git stash pop; and use of both commands/operations in Ubuntu.

  • How to remove git remote

    Git is an open-source software with version control support that allows the users to store, edit and track the changes of projects.

    There are various benefits in using Git that include: fast and efficient processing on shared projects as well as monitoring the security of the projects. However, one of the major reasons for the emergence of Git is the remote repository access; the Git remote repository is available on the server and multiple contributors can make changes to it. Users can clone the remote repository to their machines and can retrieve required information from Git repository locally or it can help to do experimental analysis on the files of the repository without affecting its originality on the server. This cloning phenomenon allows to establish the connection between git remote repository and local repository; moreover, it also supports creating several clones of a single git repository so that multiple stakeholders can get access to the same project and can-do changes parallelly. The terminal support of Ubuntu can be used to add or remove the remote repositories as your local one.

  • How to make git local same as remote

    Git support of managing local and remote repositories has contributed to making computing a better experience. The remote repositories are managed on the server, whereas local repos are maintained on the machine and can be accessed without internet availability. Git offers two streaming supports: one is upstream, and the other is downstream; the upstream refers to where you clone your rep, and downstream allows you to integrate your work with other works.

    As Git is distributed version control software, working in a parallel manner may acquire the confusion state as there are several contributors making changes on a single project. Thus, it is recommended that the remote and local repositories must be synchronized to avoid any mishaps like you may require to fall back to some previous versions, which can be budget and time-consuming.

    While working in an environment where sometimes you have to make changes on remote, and you want that same changes must be present on your local repository as well. Keeping in view the importance of synchronization, we have prepared this guide to demonstrate the steps of keeping the local repository the same as remote...

  • How to output git log with first line only

    Git is one of the well-known repositories for version control systems and used widely among programmers to keep an eye on the changes being performed regularly. Sometimes, it is observed that fetching the history does not fulfill the purpose of it; so, you need to filter the content accordingly. Git provides this facility with its git log command; git log is used to display the content from history by filtering it according to the options provided.

    If you have a long list of commits and you want just basic information about commits; then the git log command provides a one line display of every commit. We have prepared this post to demonstrate the usage of git log command to get the output of commit in one line only: Let’s start this guide from general usage of git log followed by our targeted area:

  • Auto-Accepting in QSortFilterProxyModel

    In Qt 5.10, we added support for recursive filtering in QSortFilterProxyModel, which means keeping all parents of items matching the filter.

    One of the comments in the blog post about that feature was “Sometimes, you do not only want to show parents for a match (so the match is visible), you may (also) want to show children for a match”. This is indeed something I saw a need for, more than once. For instance, you filter a large tree for a project name but then you want to see all sub-tasks of that project as well, rather than see only those that contain the project name while those that do not are hidden.

Raspberry Pi Plots World Wide Earthquakes

Filed under
Development
Hardware

What do you do when you stumble across a website posting real-time earthquake data? Well, if you’re [Craig Lindley] you write some code to format it nicely onto a display, put it in a box, and watch it whilst making dinner.

[Craig] started off with coding in Forth on the ESP32, using ESP32Forth, but admits it didn’t go so well, ditching the ESP32 for a Raspberry Pi 3 he had lying around, and after a brief detour via C++, he settled on a Python implementation using Pygame.

A case was 3D printed, which he says worked OK, but needs a little tuning to be perfect. There is no shortage of casing options for the Pi with the official 7″ display, [Craig] suggests that it probably wasn’t worth the effort to 3D print the case and if he was building it again would likely use a commercially available option which had a better fit.

Read more

Programming Leftovers

Filed under
Development
  • Steinar H. Gunderson: plocate 1.1.12 released

    plocate 1.1.12 has been released, with some minor bugfixes and a minor new option.

    More interesting is that plocate is now one year old! plocate 1.0.0 was released October 11th, 2020, so I'm maybe getting a bit ahead of myself, but it feels like a good milestone. I haven't really achieved my goal of being in the default Debian install, simply because there is too much resistance to having a default locate at all, but it's now hit most major distributions (thanks to a host of packagers) and has largely supplanted mlocate in general.

  • Dirk Eddelbuettel: littler 0.3.14: Updates

    The fifteenth release of littler as a CRAN package just landed, following in the now fifteen year history (!!) as a package started by Jeff in 2006, and joined by me a few weeks later.

    littler is the first command-line interface for R as it predates Rscript. It allows for piping as well for shebang scripting via #!, uses command-line arguments more consistently and still starts faster. It also always loaded the methods package which Rscript only started to do in recent years.

  • Current issue : #70 | Release date : 2021-10-05

    Phrack! We're back! It was only five years ago that issue 0x45 was released. It may sound bad, but it is also, indeed, quite bad. Issue 0x45 was released four years after issue 0x44. And we are now five years after that. Just trying to set the context here. The world is so different and so many things have happened in these five years that it makes no sense trying to make any point. Phrack has always been a reflection of the hacking community, and guess what, the community is moving away from itself. By this we don't mean that there are no talented hackers, because there most definitely are (just take a look at our authors). We also don't mean that there is no exquisite public hacking, because there is (again, our articles as proof). However, there is a clear move away from the collective hacking mindset that was most prevalent in the past. The word "scene" brings only smirks to people's faces. There are many reasons for this, and we are all to blame [1].

    So where is the community right now, and, most importantly, where is it going?

  • LAMP is dead! Long live (Perl) web frameworks!

    Certainly on the Perl side (with which I’m most familiar), the community has long since recommend­ed the use of a framework built on the PSGI specification, deprecating 1990s-era CGI scripts and the mod​perl Apache extension. Although general-purpose web servers like Apache or Nginx may be part of an overall system, they’re typically used as proxies or load bal­ancers for Perl-specific servers either provided by the framework or a third-party module.

Programming: C, Python, Bash, PostgreSQL

Filed under
Development
  • How to create a linked list in C

    Linked List is another linear data type, e.g., structure data type, widely used in the C language. The main concept in the linked list is storing and binding the locations of data by Pointers. Let see how we will create a Linked list in C language by using Ubuntu 20.04 system. For that, open up the console application from the search area of the Linux desktop. On the other way, you can utilize the shortcut “Ctrl+Alt+T”.

  • Semctl System Call in C

    The C language comes up with the semctl system call in the Linux system. This system call has been widely used in the Linux system to carry out the control processes specified by the console shell on some particular semaphore set. The semaphores are known IPs widely used to give access to processes for communication with one another. Semaphore can be a variable having abstract data type for the control access of 1 resource for many procedures. Hence, the semctl system call has been used here to control the semaphore set. Let’s start by signing up from the Linux system.

    Open the console application from the search area. A quick alternative way to open the console is via “Ctrl+Alt+T”.

  • Waitpid Syscall in C

    The waitpid() system call monitors a child of the caller process for state changes and retrieves information about the child whose behavior has changed. The child was halted by a signal or resumed by a signal regarded as a state shift. Waiting for a terminated child enables the system to free the resources associated with the child; if no wait is conducted, the terminated child will remain in a “zombie” condition.

    The waitpid() system function pauses the current process until the PID argument specifies a child who has changed. The calling process is paused until a child’s process completes or is terminated. Waitpid() halts the calling process till the system receives information about the child’s status. Waitpid() returns quickly if the system already has status information on a suitable child when it is called. If the caller process gets a signal with the action of either executing a signal handler or terminating the process, waitpid() is terminated. The waitpid() function will pause the caller thread’s execution until it receives information and updates for one of its terminated child processes or a signal that will either run a signal-catching procedure or terminate the process.

  • Shift Operators in C

    In general, you should not need to worry about operations somewhere at bit level as a developer. You can conceptualize in terms of bytes, int, and doubles, and even higher-level data. However, there are instances when you would like to zoom in on a single piece. The bits in an integer variable are shifted by a defined number of positions using two shift operators. The “>>” operator changes bits to the right, while the operator changes bits left. In general, employing the left and right shift operators instead of computing and then multiplication by a power of two will result in substantially faster code.

  • Puts function in C

    Displaying the output on the screen is an important component of every programming language. The puts function in C is used to perform this. The puts () call in C is a file handling method that is utilized to print a line to the output screen. The puts () function looks a lot like the printf() function. The puts () function is being used to display the string that was read previously using the gets () or scanf() functions on the terminal. The integer value returned by the puts () function represents the number of characters written on the terminal.

    If the string contains formatting characters such as ‘% s,’ printf() will provide unpredictable results in the puts() function. Also, if “str” is a user-supplied string, using printf() could compromise security.

  • How to Use Dataclasses in Python

    This article will cover a guide on using the new “dataclass” objects included in Python 3.7 and newer versions. Dataclasses are just like other Python classes, but they are especially designed to be used as data containers and provide a cleaner and shorter syntax for quickly creating data objects. If you know about “namedtuple” objects and have used them in Python, you can define them as mutable namedtuple type objects. You can create new instances of dataclasses like any other class or namedtuple type objects and access their attributes using dot notation.

  • How to Use New F Strings in Python

    This article will cover a guide on using the new “F” type string formatting syntax added to recent versions of Python. Simply termed as “f-strings” or “formatted string literals”, these expressions allow you to use Python variables, functions and statements directly in the text of a string. They also help in keeping the code clean, as you can use inline expressions without resorting to any kind of ordered substitutions that are usually part of the other string formatting techniques available in Python. F-strings are included by default in Python 3.6 and newer builds.

  • Command Line Arguments

    In many cases, bash scripts require argument values to provide input options to the script. You can handle command-line arguments in a bash script in two ways. One is by using argument variables, and another is by using the getopts function. How you can handle command-line arguments is shown in this tutorial.

  • How do I list all schemas in PostgreSQL?

    Postgresql is a rational and reliable database. Many features of PostgreSQL differentiate it from other databases. PostgreSQL schema is a property that allows the user to maintain and organize the objects in the current database and manage them in logical groups. The currently existing schemas are viewed in the psql and pgAdmin as well. To enlist all the schemas in PostgreSQL, there are many approaches. We have used mainly of them to explain in this article. To understand this dilemma, you need to follow some prerequisites steps like:

    Install PostgreSQL on your system and configure it. After successful installation and the configuration of Postgresql, confirm it by checking its version on the psql. When you have installed the database, now you can use it because you have privileges to access the features present in it. If you have some knowledge of databases, then it will be favorable for you to understand the schemas. Now open psql and apply the password for the user for the server connectivity.

  • Change column name Postgresql

    In PostgreSQL, while performing operations, you need to create relations. After the creation of the tables, you may want to edit the attributes you have provided. One of the examples is to modify the column name of the table. The column name can be changed in PostgreSQL by using the “ALTER” command on the table.
    First, we provide the table name and then the column name after the rename clause. Thirdly, the name that is to be placed is written.

  • Using Floating Data Types in PostgreSQL

    PostgreSQL supports multiple different data types. One such data type is the floating data type which is used to store the floating-point data. We all understand that the handling and manipulation of this particular data type is a bit tricky and complex, so the programmers find it a little difficult to use it. Therefore, in this guide, we have decided to share the method of using the floating data types in PostgreSQL in Windows 10 after sharing with you a brief introduction of this data type.

  • Postgresql temporary tables

    As the name indicates, PostgreSQL temporary tables are the tables that are created for some time and are removed manually or automatically. Manually removal deals with deleting the table. Whereas the table is automatically removed when the database session is ended. The temporary tables last till the session exists.

    The use of a temporary table helps in avoiding the overloading of data in a particular database. Whenever you think you need to enter data in a database for some time to perform operations on the data, you will go for the temporary table. So that after usage, they are removed. And your database will have sufficient free space. This tutorial will explore what a temporary table is, its working, and its usage.

  • Postgresql round to 2 decimal places

    The ROUND () function converts the number you provided in the decimal or integer form up to the given integer. It can take a single or two arguments depending upon the condition you provide.

  • How reflection works in ****

    Note: this is a redacted copy of a blog post published on the internal development blog of a new systems programming language. The name of the project and further details are deliberately being kept in confidence until the initial release. You may be able to find it if you look hard enough — you have my thanks in advance for keeping it to yourself. For more information, see “We are building a new systems programming language”.

    I’ve just merged support for reflection in xxxx. Here’s how it works!

  • Need a New Programming Language? Try Zig

    Maybe you’ve heard of it, maybe you haven’t. Zig is a new programming language that seems to be growing in popularity. Let’s do a quick dive into what it is, why it’s unique, and what sort of things you would use it for. (Ed Note: Other than “for great justice“, naturally.)

Python 3.10.0

Filed under
Development
  • Python 3.10.0 is available

    On behalf of the Python development community and the Python 3.10 release team, I’m pleased to announce the availability of Python 3.10.0. Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

  • Python 3.10 is Here, Brings Some Great New Features and Improvements

    Python 3.10 sports powerful pattern matching features, better error reporting, and more. Here’s what’s new.

    Python is a powerful multipurpose programming language. This means it’s designed to be used in a range of applications, including data science, software and web development, automation, and generally getting stuff done.

    According to the TIOBE index for September 2021, which ranks programming languages based on their popularity, has Python ranked in the number 2 slot. It only needs to bridge 0.16% to displace C from the first place.

    Python 3.10 was released yesterday, so let’s take a quick look over all the important changes.

  • Python 3.10.0 released

    Version 3.10.0 of the Python language has been released. There are a lot of significant changes in this release, including the much-discussed structural pattern-matching feature. See this article for an overview of what's in 3.10.

  • Python 3.10 Released With Many Improvements - Phoronix

    Python 3.10 is out as the latest major update for this widely-used programming language's official implementation.

    Python 3.10 brings support for parameter specification variables, precise line numbers for debugging and other tools, explicit type aliases, structural pattern matching, optional EncodingWarning, writing union types as X | Y, and a variety of other changes. we are also seeing some small performance improvements with Python 3.10 compared to prior versions of Python.

  • Python 3.10.0 is available

    On behalf of the Python development community and the Python 3.10 release team, I’m pleased to announce the availability of Python 3.10.0.

    Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

  • Python 3.10.0

    Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

Syndicate content

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story Tex Says It's Ready srlinuxx 2 18/02/2005 - 11:45pm
Story IBM Pledges $100 Million for Linux srlinuxx 2 19/02/2005 - 4:07pm
Story New Robots More Humanlike srlinuxx 2 19/02/2005 - 4:22pm
Story Brightest Galactic Flash Ever Detected Hits Earth srlinuxx 2 19/02/2005 - 4:23pm
Story PCLinuxOS Guided Tour srlinuxx 2 21/02/2005 - 3:00pm
Story A Week with KDE 3.4beta2 srlinuxx 1 21/02/2005 - 4:34pm
Story PCLinuxOS forms alliance with Codeweavers Texstar 1 23/02/2005 - 5:42am
Blog entry Mdk 10.2 beta 3 srlinuxx 2 24/02/2005 - 6:20pm
Story Snapshots of KDE_3.4rc1 srlinuxx 2 28/02/2005 - 6:02am
Story O'Reilly Releases "Linux in a Windows World" srlinuxx 01/03/2005 - 4:13pm