Programming/Development: Dirk Eddelbuettel, Dependencies and Python

-
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…
-
- Login or register to post comments
Printer-friendly version
- 2342 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
Linus Torvalds Decides To Land NVIDIA RTX 30 "Ampere" Support In Linux 5.11
While new feature code is normally not allowed in past the end of the merge window for a given Linux kernel release cycle, Linus Torvalds has decided to merge the newly-published open-source driver code for the NVIDIA GeForce RTX 30 "Ampere" graphics cards for the Linux 5.11 kernel that will debut as stable in February.
Ahead of this weekend's Linux 5.11-rc4 release, Linus Torvalds has merged the new initial open-source code for the NVIDIA RTX 30 / Ampere GPUs via the Nouveau driver. He was fine with allowing this late addition to Linux 5.11 as the new hardware support is all self-contained and doesn't risk regressing the existing NVIDIA GPU support within the Nouveau driver. Thus it's one of the rare times he permits new code to be added after a merge window since there is minimal risk of it regressing the status quo of hardware support.
| today's leftovers
|
Security Leftovers
| OSS Leftovers and Mostly Openwashing
|
Recent comments
9 hours 9 min ago
10 hours 33 min ago
10 hours 35 min ago
10 hours 47 min ago
10 hours 53 min ago
11 hours 15 min ago
12 hours 7 min ago
13 hours 39 min ago
13 hours 57 min ago
14 hours 11 min ago