Language Selection

English French German Italian Portuguese Spanish


Raku/Perl Programming: Writing/Coding Perl and Discovering It

Filed under
  • Write Codes, not Op - on Indention

    As I heard from many posts on those online communities, Perl had been described as "hard to read"/"write once, modify never"/"oversophisticated"... These did not match my personal experience. Recently I have discovered that there is a Perl style guideline on the official site!

  • On my technical Background - a beginner's story

    For me, solitaires (games) always attract me. Programming has been felt like a solitaire . (Some people must disagree with me on this line. They are lucky. And I also want myself can grow as strong as a contributor to the opensource programming community.) Testing. Possible modifications. I learnt LOGO programming language in the primary school. As I can remember, while I was in junior high school, I lost my sleep one night just because of thinking using LOGO to write a Chinese Chess program! (The workload would be too much... LOGO is derived from LISP, I know. Ha.)

    I met Perl in 2006, while I was an unnoticed junior high schooler and had no support on my interest. Due to a sense of unorthodoxness, and, at that time, Python was not as hot as it has been now, I borrowed a book on Perl and had a little bit appreciation on this programming language... I thought of writing a program on Othello(aka "Reversi", but "Othello" is commercially copyrighted)... However, I had no support on computing at that time. I programmed "Hello World" and nothing else. Two years later, I had to be familiar with Pascal as it was the standard language in local public exam; in addition, it is one of the standard languages for local competitive programming. (Besides handling the infamous heavy loading of academic study for adolescents in East Asia, I was VERY into those competitive math/programming/Physics Olympiad.) Of couse I knew that Pascal had been already excluded in practical business. After 3-years relationship with Pascal, coincidentally I have to get into the university , I digged into my major physics and its close friend math, and abandoned programming.

    I came back to programming because of a practical reason: career, initially. (I had thought of becoming a research scientist; however my plans were naive... ... This is a long and twisted story with self-loath and will be bored you all.) But programming (especially on Perl?) becomes one of my hobbies now.

Python Programming Leftovers

Filed under
  • PyDev of the Week: Jessica Garson

    This week we welcome Jessica Garson (@jessicagarson) as our PyDev of the Week!

  • Public key cryptography: RSA keys [Ed: New update]

    I bet you created at least once an RSA key pair, usually because you needed to connect to GitHub and you wanted to avoid typing your password every time. You diligently followed the documentation on how to create SSH keys and after a couple of minutes your setup was complete.

    But do you know what you actually did?

    Do you know what the ~/.ssh/id_rsa file really contains? Why did ssh create two files with such a different format? Did you notice that one file begins with ssh-rsa, while the other begins with -----BEGIN RSA PRIVATE KEY-----? Have you noticed that sometimes the header of the second file misses the RSA part and just says BEGIN PRIVATE KEY?

    I believe that a minimum level of knowledge regarding the various formats of RSA keys is mandatory for every developer nowadays, not to mention the importance of understanding them deeply if you want to pursue a career in the infrastructure management world.

  • Default Arguments in Python Functions

    Functions in Python are used to implement logic that you want to execute repeatedly at different places in your code. You can pass data to these functions via function arguments. In addition to passing arguments to functions via a function call, you can also set default argument values in Python functions. These default values are assigned to function arguments if you do not explicitly pass a parameter value to the given argument. Parameters are the values actually passed to function arguments.

  • How to Do a Binary Search in Python

    Binary search is a classic algorithm in computer science. It often comes up in programming contests and technical interviews. Implementing binary search turns out to be a challenging task, even when you understand the concept. Unless you’re curious or have a specific assignment, you should always leverage existing libraries to do a binary search in Python or any other language.

  • Python 3.5.2 : Detect motion and save images with opencv.

    This script is simple to use it with a webcam or to parse a video file.
    The main goal of this script is to see the difference in various frames of a video or webcam output.
    The first frame of our video file will contain no motion and just background and then is compute the absolute difference.
    There is no need to process the large, raw images straight from the video stream and this is the reason I convert the image to grayscale.
    Some text is put on the window to show us the status string to indicate it is detection.

  • Python 101 2nd Edition

    My Kickstarter for the 2nd Edition of Python 101 is ending in less than two days. If you want a signed copy or to purchase one of my other books for a discount, you should check out the Kickstarter as I have lots of good deals on there.

  • Against service layers in Django

    Recently I’ve seen posts and questions pop up in a few places about a sort of “enterprise” Django style guide that’s been getting attention. There are a number of things I disagree with in that guide, but the big one, and the one people have mostly been asking about, is the recommendation to add a “service layer” to Django applications. The short version of my opinion on this is: it’s probably not what you want in Django apps.

Programming: Golang, C, Eclipse, Perl and Python/WebRTC

Filed under
  • Golang project structures for independent teams: A better way to go

    Working in small and independent teams can be tricky for engineers. In my experience as an engineer at Curve, a fast growth scale-up in the fintech sector, I’ve often found that different teams tend to use completely different approaches. This can make moving teams and cross-team communications a challenge.

    At Curve, we use Golang (or Go for short) for programming. Go is an open-source programming language that makes it easy to build simple, reliable and efficient software.

    Working with open source language across multiple teams can present its own unique set of challenges. For instance, lots of problems can arise from differences in structure and conforming to different standards. Trying to maintain high code quality standards while also ensuring every project follows best practices can be tough.

  • numpysane and broadcasting in C

    Since the beginning, the numpysane library provided a broadcast_define() function to decorate existing Python routines to give them broadcasting awareness. This was very useful, but slow. I just did lots of typing, and now I have a flavor of this in C (the numpysane_pywrap module; new in numpysane 0.22). As expected, you get fast C loops! And similar to the rest of this library, this is a port of something in PDL: PDL::PP.

  • Eclipse Foundation Survey: IoT Is Real and Adoption Is Growing
  • The Eclipse Foundation Releases IoT Commercial Adoption Survey Results

    The Eclipse Foundation, one of the world’s largest open source foundations focused on the Internet of Things (IoT), today announced the release of its first annual IoT Commercial Adoption survey. One of the first of its kind, this survey’s objective was to gain a better understanding of the IoT industry landscape by identifying the requirements, priorities, and challenges faced by organizations that are deploying and using commercial IoT solutions, including those based on open source technologies. This survey is distinct and separate from the IoT Developer Survey, the industry’s most influential survey from the development front lines, which the Eclipse Foundation has conducted for the last six years.

  • Perl Weekly Challenge 051: 3 Sum and Colourful Numbers
  • WebRTC: a working example

    Recently I had to use WebRTC for a simple project. The technology itself has many advantages and is being developed as an open standard, without the need for any plugins. However, I was quite new to WebRTC and had some problems getting my head around the basic concepts, as well as creating a working solution. There are many tutorials available, but most of them are incomplete, obsolete, or forced me to use some third party services (e.g. Google Firebase), that only made the whole process more complicated to setup and more difficult to understand.

    I decided to put together the information from all those resources and create a simple, working example of a WebRTC application. It does not require any third party services, unless you want to use it over a public network (in which case owning a server would really help). I hope it will provide a good starting point for everyone who is interested in exploring WebRTC.

    This is not going to be a full tutorial of the WebRTC technology. You can find plenty of tutorials and detailed explanations all over the internet, for example here. You can also check the WebRTC API, if you want more information. This post is just going to show you one possible working example of WebRTC and explain how it works.

Programming Leftovers

Filed under
  • Dirk Eddelbuettel: RcppAPT 0.0.6

    A new version of RcppAPT – our interface from R to the C++ library behind the awesome apt, apt-get, apt-cache, … commands and their cache powering Debian, Ubuntu and the like – is now on CRAN.

    RcppAPT allows you to query the (Debian or Ubuntu) package dependency graph at will, with build-dependencies (if you have deb-src entries), reverse dependencies, and all other goodies. See the vignette and examples for illustrations.

    This new version corrects builds failures under the new and shiny Apt 2.0 release (and the pre-releases like the 1.9.* series in Ubuntu) as some header files moved around. My thanks to Kurt Hornik for the heads-up. I accomodated the change in the (very simple and shell-based) configure script by a) asking pkg-config about the version of pkg-apt and then using that to Cool compare to a ‘threshold value’ of ‘1.9.0’ and c) setting another compiler #define if needed so that d) these headers could get included if defined. The neat part is that a) and Cool are done in an R one-liner, and the whole script is still in shell. Now, CRAN being CRAN, I now split the script into two: one almost empty one not using bash that passes the ‘omg but bash is not portable’ test, and which calls a second bash script doing the work.

  • Talk Python to Me: #255 Talking to cars with Python

    Modern cars have become mobile computer systems with many small computers running millions of lines of code. On this episode, we plug a little Python into those data streams.

  • Rust-Based Redox OS Working On Pkgar For Package Management

    It's been a while since having news on Redox OS as the Rustlang-written open-source operating system. But it turns out that's been due to Jeremy Soller being busy working on Pkgar as a new package management format for the operating system.

Pi Day: 6 Raspberry Pi projects to try at work and home

Filed under

“The combination of the Raspberry Pi with 3D printers and IoT technology can lead to some pretty insane results, limited only by your imagination and programming skills. One of the devices you can create with a Raspberry Pi is an IoT-friendly ‘smart microwave’ that takes nuking your food to the next level. With a revamped touchpad and voice-activated commands, now I don’t have to get up to make popcorn and interrupt my binge coding sprees.

“The microwave also includes a barcode scanner that can search online for cooking times, so that your food is perfectly optimized for consumption. If that wasn’t geeky enough, it can also send tweets, alerts, or instant messages to your social media accounts alerting you that the timer is done.

“If I need to check which employees left food or ‘blew up’ their coffee, no problem. The microwave allows you to access detailed statistics and can be controlled remotely. All of which can lead to some fun pranks around the office, as you can imagine.”

Milenkovic credits tech enthusiast Nathan Broadbent as the original creator of this invention. More details can be found on his site, Made by Nathan, here.

Read more

Python Leftovers and Microsoft Trying to Control the Narrative

Filed under
  • Documentation as a way to build Community

    As a long time user and participant in open source communities, I've always known that documentation is far from being a solved problem. At least, that's the impression we get from many developers: "writing docs is boring"; "it's a chore, nobody likes to do it". I have come to realize I'm one of those rare people who likes to write both code and documentation.

    Nobody will argue against documentation. It is clear that for an open-source software project, documentation is the public face of the project. The docs influence how people interact with the software and with the community. It sets the tone about inclusiveness, how people communicate and what users and contributors can do. Looking at the results of a “NumPy Tutorial” search on any search engine also gives an idea of the demand for this kind of content - it is possible to find documentation about how to read the NumPy documentation!

  • Weekly Python StackOverflow Report: (ccxix) stackoverflow python report
  • Top App Programming Language Would More Impact In Upcoming Years [Ed: What a joke; we're led to think that all programming can be assessed based on one single Web site that Microsoft bought as if nothing exists outside it]

    In this article, we discuss top app programming language would more impact In upcoming years. Number of mobile app technologies that are widely used for a specific platform or for cross-platform app development. One of the most comprehensive code repositories today GitHub create a year in Review report that shares interesting statistics about the programmer community.

    As a mobile app development company, this report is beneficial as it informs you about the current status of popular app programming languages. While JavaScript, PHP, C, C#, C++, etc., are still in use, there are some promising ones coming up on the horizon.

Programming: GNU Mailutils, Perl, AOMP, RInside and State of Java Report

Filed under
  • GNU Mailutils Version 3.9

    Version 3.9 of GNU mailutils is available for download.
    This is a bug-fix release. Please see the NEWS file entry for a detailed list of changes.

  • KBOS methods

    After scopes, types and signatures we got all the prerequisites to talk about the syntax and semantics of KBOS methods. Unless you want to contribute to Kephra or write a plugin, you may never use them, but please join me in the thought experiment - maybe we get a littler smarter.

    General Rules of Syntax

    KBOS is outspokenly declerative. The keyword class starts a class, attribute an attribute definition and you could even guess what method name (...) {....} stands for. In front of method may appear several combinable keywords. Lets call them method modifier for now, because Raku does that too. If one of them is present, writing method is optional.

  • What's new on CPAN - February 2020

    Welcome to “What’s new on CPAN”, a curated look at last month’s new CPAN uploads for your reading and programming pleasure. Enjoy!

  • AMD AOMP 0.7-7 Released For Radeon OpenMP Offloading

    Announced at the end of last year was Radeon Open Compute 3.0 with the new "AOMP" compiler. Today a new version of AOMP has been released for OpenMP offloading support to AMD Radeon GPUs.

    AOMP is the newest of several downstreams of LLVM/Clang maintained by AMD. AOMP tracks upstream LLVM / Clang but with changes for supporting OpenMP API offloading support to Radeon GPUs as part of the ROCm driver stack. While focused on Radeon OpenMP support, AMD does leave the HIP / CUDA / OpenCL support within the AOMP Clang build.

  • Dirk Eddelbuettel: RInside 0.2.16

    A new release 0.2.16 of RInside arrived on CRAN and in Debian today. This comes almost exactly one year after the previous release 0.2.15. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

    This release brings one new feature, contributed by Lance Bachmeier (with some additional post-processing by me). It adds the ability to embed and call R from C programs and applications. The interface is more limited as we do not get Rcpp for automagic conversion. But this offers the door to a number of applications supporting plain C interface, and the new examples directory for example shows one for ruby. We may add others.

  • New Relic – the State of Java Report

    New Relic has released a new JVM report based on an analysis of data reported by customer JVMs running in production across the globe. Unlike other self-reported surveys, the data produced here is from JVMs that are running in production. As would be expected, the resulting data set consists of New Relic customers, but it paints a picture of what is being used in production as opposed to what developers are working and testing against.

    In particular, the report highlights that the majority of JVMs that are running in production are doing so with LTS releases of Java; and only a fraction over 11% are running on Java 11. The majority of JVMs (over 85%) are running on Java 8, with Java 7 following behind with a few percent. Non-LTS releases are responsible for just over 1% of reported machines running. In addition, the report highlights that JVM users are often slow to upgrade in production; there are more versions of Java running before 7 than on either 9 or 10 (which are both EOL) or 12 and 13 (which are both EOL or about to become EOL). The report also highlights that a number of JVMs are running on outdated versions of Java 8, some of which are known to have security vulnerabilities.

Programming With Python

Filed under
  • Thinking psycopg3

    Psycopg is the database adapter used by most Python programs needing to work with the PostgreSQL database manager. In this blog post, psycopg maintainer Daniele Varrazzo looks forward to the next major version.

  • PyData COVID-19 Response

    The safety and well-being of our community are extremely important to us. We have therefore decided to postpone all PyData conferences scheduled to take place until the end of June:
    PyData Miami
    PyData London
    PyData Amsterdam

  • Encapsulation in Python

    Encapsulation is an essential aspect of Object Oriented Programming.

    Let’s explain encapsulation in plain words: information hiding. This means delimiting of the internal interface and attribute from the external world.

    The benefit of information hiding is reducing system complexity and increasing robustness.

    Why? Because encapsulation limits the interdependencies of different software components. Suppose we create a module. Our users could only interact with us through public APIs; they don’t care about the internals of this module. Even when the details of internals implementation changed, the user’s code doesn’t need a corresponding change.

    To implement encapsulation, we need to learn how to define and use private attribute and a private function.

  • Functional strategies in Python

    I got into a debate about Python’s support for functional programming (FP) with a friend. One of the challenging parts was listening to him say, “Python is broken” a number of times.

    Python is not broken. It’s just not a great language for writing pure functional programs. Python seemed broken to my friend in exactly the same way that a hammer seems broken to someone trying to turn a screw with it.

    I understand his frustration. Once you have fully embraced the FP mindset, it is difficult to understand why people would write programs any other way.

    I have not fully embraced the FP mindset. But that doesn’t mean that I can’t apply some FP lessons to my Python programs.

    In discussions about how FP and Python relate, I think too much attention is paid to the tactics. For example, some people say, “no need for map/­filter/­lambda, use list comprehensions.” Not only does this put off FP people because they’re being told to abandon the tools they are used to, but it gives the impression that list com­pre­hensions are somehow at odds with FP constructs, or are exact replacements.

  • How to use shared in-browser consoles to cooperate while working remotely.

    One of the challenges of remote work is when you need to work together on one thing.

    Our in-browser consoles are one of the core features of our service. Almost since the beginning, PythonAnywhere has been able to share consoles -- you entered the name of another user or an email address, and they got an email telling them how to log in and view your Python (or Bash, or IPython) console. If you use an email, the person you invite doesn't have to be PythonAnywhere registered user.

  • Python Vs JavaScript: Which One Should You Use For A Project?

    Are you confused which web app development technology is the right fit for you: JavaScript or Python? Do you want to know the real difference between these two most popular tools for web development? You have landed at the right place. In this blog, we will talk about various pros and cons of choosing these two languages as well as JavaScript vs Python performance and JavaScript vs Python speed and learning curve. In addition, we will compare these two languages on various parameters. So, let’s start:

[llvm-dev] [10.0.0 Release] Release Candidate 4 is here

Filed under

Hello everyone,

Release Candidate 4 was tagged earlier today as llvmorg-10.0.0-rc4 on
the release branch at b406eab8880. It contains 12 commits since the
previous release candidate.

If no new problems arise, this is what the final release will look like.

Source code and docs are available at and

Pre-built binaries will be added as they become ready.

Please file bug reports for any issues you find as blockers of

Release testers, please run the test script, share your results, and
upload binaries.


Read more

Also: LLVM 10.0 RC4 Released Due To Last Minute Fixes

Programming: JavaScript, PHP, Debuggers, Python

Filed under
  • 50 Frequently Asked JavaScript Interview Questions and Answers [2020]

    JavaScript has proved itself as a versatile and scalable scripting language all over time. It is one of the most popular scripting languages in the web development industry. It offers more reliability; it is easy to run and execute. It opens up special opportunities for developers. This is the reason why millions of developers (almost 94 percent of all websites are made of JavaScript) tend to use this language.

    An entry-level developer with basic knowledge of JavaScript can earn $70-80,000 per year. JavaScript can be really a blessing for your career, and long time work skills in this language can make you one of the highest-paid employees of the year. Hence, no wonder why you should look for Jobs that offer a position as JavaScript developers. You might be a rookie or a professional, to get yourself on board, it is important to be ready for the JavaScript Interview Questions as well.

  • "rpminfo" php extension
  • Possible issues with debugging and inspecting compiler-optimized binaries

    Developers think of their programs as a serial sequence of operations running as written in the original source code. However, program source code is just a specification for computations. The compiler analyzes the source code and determines if changes to the specified operations will yield the same visible results but be more efficient. It will eliminate operations that are ultimately not visible, and rearrange operations to extract more parallelism and hide latency. These differences between the original program’s source code and the optimized binary that actually runs might be visible when inspecting the execution of the optimized binary via tools like GDB and SystemTap.


    The binary code for a particular line of source code might be removed by the compiler because it has no effect on the later results. This removal might happen when the compiler data and control flow analysis for the function determines that while the code on the line is on a control flow path that could be executed, the values computed are never used. The debugging information that maps the instructions back to source code would have no entries for those eliminated lines. GDB and SystemTap would not be able to inspect the state of the program at those exact source code lines because they no longer exist in the binary.

  • PyCharm 2020.1 EAP 7

    We have a new Early Access Program (EAP) version of PyCharm that can now be downloaded from our website

    This EAP has a lot of important bug fixes, some new features, and a few usability improvements. All of which makes PyCharm that much better to work with.

  • Moshe Zadka: Or else:

    The underappreciated else keyword in Python has three distinct uses.

Syndicate content

More in Tux Machines

LibreOffice 6.4.3 Release Candidate Version 1 Released Today!

LibreOffice 6.4.3 RC1 Released: LibreOffice is one of the best open-source text editors. LibreOffice comes as default application release of Linux OS. LibreOffice is developed by Team Document Foundation. Today they announced that the LibreOffice 6.4.3 RC1 version has been released. As per their calendar, LibreOffice 6.4.3 RC1 has been released exactly on today!. This RC1 version has many bugs fixes and tweaks in essential features. Read more

Unifont 13.0.01 Released

Unifont 13.0.01 is now available. This is a major release. Significant changes in this version include the addition of these new scripts in Unicode 13.0.0: U+10E80..U+10EBF: Yezidi, by Johnnie Weaver U+10FB0..U+10FDF: Chorasmian, by Johnnie Weaver U+11900..U+1195F: Dives Akuru, by David Corbett U+18B00..U+18CFF: Khitan Small Script, by Johnnie Weaver U+1FB00..U+1FBFF: Symbols for Legacy Computing, by Rebecca Bettencourt Read more

Programming: micro.sth, RProtoBuf, Perl and Python

  • Introducing micro.sth

    Many developers turn their noses up at PHP, but I have a soft spot for it. For me, it's the most approachable programming language by far. It feels intuitive in a way no other languages do, and it makes it possible to cobble together a working application with just a handful of lines of code. So whenever I can't find a tool for a specific job, I try to build one myself. The latest project of mine is a case in point. I was looking for a simple application for keeping a photographic diary, and I was sure that I'd be able to find an open-source tool for that. I searched high and low, but I came back empty-handed. Sure, there are plenty of static website generators, but I'd prefer something that doesn't require me to perform the write-generate-upload dance every time I want to post a quick update. And I need something that I can use not only to maintain a simple diary, but also store notes, manage tasks, and draft articles -- all this without getting bogged down by configuring templates, defining categories, and tweaking settings. And because I want most of my content to be private, I should be able to protect access to it with a password.

  • Dirk Eddelbuettel: RProtoBuf 0.4.17: Robustified

    A new release 0.4.17 of RProtoBuf is now on CRAN. RProtoBuf provides R with bindings for the Google Protocol Buffers (“ProtoBuf”) data encoding and serialization library used and released by Google, and deployed very widely in numerous projects as a language and operating-system agnostic protocol. This release contains small polishes related to the release 0.4.16 which added JSON support for messages, and switched to ByteSizeLong. This release now makes sure JSON functionality is only tested where available (on version 3 of the Protocol Buffers library), and that ByteSizeLong is only called where available (version 3.6.0 or later). Of course, older versions build as before and remain fully supported.

  • Perl Weekly Challenge 53: Rotate Matrix and Vowel Strings

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

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

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

today's howtos