Language Selection

English French German Italian Portuguese Spanish

Programming/Development: Dirk Eddelbuettel, Dependencies and Python

Filed under
Development
  • Dirk Eddelbuettel: RcppArmadillo 0.9.800.3.0

    A small Armadillo bugfix upstream update 9.800.3 came out a few days ago. The changes, summarised by Conrad in email to me (and for once not yet on the arma site are fixes for matrix row iterators, better detection of non-hermitian matrices by eig_sym(), inv_sympd(), chol(), expmat_sym() and miscellaneous minor fixes. It also contains a bug fix by Christian Gunning to his sample() implementation.

    Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab. RcppArmadillo integrates this library with the R environment and language–and is widely used by (currently) 679 other packages on CRAN.

  • Dirk Eddelbuettel: RDieHarder 0.2.1

    A new version, now at 0.2.1, of the random-number generator tester RDieHarder (based on the DieHarder suite developed / maintained by Robert Brown with contributions by David Bauer and myself) is now on CRAN.

    This version has only internal changes. Brian Ripley, tireless as always, is testing the impact of gcc 10 on CRAN code and found that the ‘to-be-default’ option -fno-common throws off a few (older) C code bases, this one (which is indeed old) included. So in a nutshell, we declared all global variables extern and defined them once and only once in new file globals.c. Needless to say, this affects the buildability options. In the past we used to rely on an external library libdieharder (which e.g. I had put together for Debian) but we now just build everything internally in the package.

  • There are (at least) three distinct dependency types

    Using dependencies is one of the main problems in software development today. It has become even more complicated with the recent emergence of new programming languages and the need to combine them with existing programs. Most discussion about it has been informal and high level, so let's see if we can make it more disciplined and how different dependency approaches work.

    What do we mean when we say "work"?

    In this post we are going to use the word "work" in a very specific way. A dependency application is said to work if and only if we can take two separate code projects where one uses the other and use them together without needing to write special case code. That is, we should be able to snap the two projects together like Lego. If this can be done to arbitrary projects with a success rate of more than 95%, then the approach can be said to work.

    It should be especially noted that "I tried this with two trivial helloworld projects and it worked for me" does not fulfill the requirements of working. Sadly this line of reasoning is used all too often in online dependency discussions, but it is not a response that holds any weight. Any approach that has not been tested with at least tens (preferably hundreds) of packages does not have enough real world usage experience to be taken seriously.

  • Monads aren't as hard as you think

    I’ve been scared of monads ever since I first heard of them. So many references to burritos, or nuclear waste containers, or some other analogy that didn’t make sense to me. So if you’re scared of monads too, maybe my take on what a monad is will help.

  • Print all git repos from a user
  • Print all git repos from a user
  • Talk Python to Me: #241 Opal: Full stack health care apps

    Open source has permeated much of the software industry. What about health care? This highly regulated and important industry might seem to be the domain of huge specialized software companies.

  • Sleepy snake

    I love this drawing! I’ve always been charmed by cartoonists’ ability to capture an essence in a seemingly simple drawing. Objects are reduced to stereotypes, but with some whimsy thrown in. Ben has always had this gift: to create just the right stroke to perfectly express an attitude or feeling.

    Here Sleepy is snug in his bed, covered by a blanket. Even in his custom bed, he’s too long to fit, but he’s comfortable. The pillow isn’t shaped like a real pillow, but it’s exactly our cartoon Platonic ideal of a pillow.

  • Generate a Python Random Number

    Here is a quick guide on Python’s random number. You can always refer to it whenever you need to generate a random number in your programs.

    Python has a built-in random module for this purpose. It exposes several methods such as randrange(), randint(), random(), seed(), uniform(), etc. You can call any of these functions to generate a Python random number.

    Usually, a random number is an integer, but you can generate float random also. However, you first need to understand the context as a programmer and then pick the right function to use.

  • Trigger Local Python App Remotely

    With an old Mac I have lying around at home and free web-based services, I’ve setup a simple app that fetches some data from an external service (YNAB) in order to run some daily budget calculations that I used to calculate manually for a long time. The output of my app is then sent back to my phone within seconds so I can trigger it from anywhere. I wanted to share the approach I’m using which has cost me nothing.

    This (obviously) isn’t an approach that should be used for large scale applications or anything other than pet projects. I just wanted to highlight how simple it can be using existing free tools. There are plenty of low cost, production ready, and scalable options out there (like AWS Lambda) if you prefer to start with that approach.

    My app is written in Python and served via Flask to a local endpoint (http://localhost:5000) which ngrok points to. I then have a IFTTT webhook hitting the Ngrok URL after clicking an IFTTT button widget from my phone. The app ends up broadcasting the output to my Slack account so I end up getting a push notification on my phone containing the app output within seconds of hitting the button:

  • Raspberry Pi Christmas Shopping Guide 2019

    Stuck for what to buy your friends and family this Christmas? Whether you’re looking to introduce someone to Raspberry Pi and coding, or trying to find the perfect gift for the tech-mad hobbyist in your life, our Christmas Shopping Guide 2019 will help you complete your shopping list. So, let’s get started…

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

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

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

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

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

  • How To Install MongoDB on AlmaLinux 9 - idroot

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

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

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