Programming Leftovers
-
SSHd now uses socket-based activation (Ubuntu 22.10 and later)
As of version 1:9.0p1-1ubuntu1 of openssh-server in Kinetic Kudu (Ubuntu 22.10), OpenSSH in Ubuntu is configured by default to use systemd socket activation. This means that sshd will not be started until an incoming connection request is received. This has been done to reduce the memory consumed by Ubuntu Server instances by default, which is of particular interest with Ubuntu running in VMs or LXD containers: by not running sshd when it is not used, we save at least 3MiB of memory in each instance, representing a savings of roughly 5% on an idle, pristine kinetic container.
At Canonical we care about making Ubuntu as efficient as possible on your hardware and in the cloud, which is why this change has been landed as part of a larger effort to reduce the default memory footprint of our images. A default Ubuntu 22.04 LXD image at release time used 65MiB of RAM, which in kinetic now uses 58MiB after this OpenSSH change; and more improvements are in progress, with the intention of backporting the safer changes to our Ubuntu 22.04 images to improve memory usage for the greatest number of users.
-
C vs Python: The Key Differences You Must Know
One of the most common dilemmas that beginners face is choosing the programming language they should learn first. And even if you aren’t a beginner, you could be wondering which language to try next – so there’s a chance that you might look up the difference: C vs Python.
Why – you ask? Well, they are the easiest and two of the most useful programming languages to learn out there. Either can set fundamental concepts in your mind like concrete and make you career-ready with proper implementation in a short time. But there are many differences we must take note of before that. So, for now, keep reading!
-
We need more sub-languages
For related (and already implemented or prototyped) work on making deep-seated languages safer, I recommend to look at the papers written by Stephen Kell.
Specifically for the GNOME community, Kell writes about GObject and its introspection system (GIR) in Towards a dynamic object model within Unix processes, with liballocs. I didn't try testing it in practice against codebases I work on, but it would be valuable.
[...]
So, why not the exactly same basic syntax of Java (for instance), with a very small subset of its standard library and some classes specific to the build system. Running that kind of build instructions would work with a compliant Java runtime environment (JRE), but alternative implementations would be entirely feasible too, if a sufficiently small subset of the language is carefully chosen. Most developers would at least feel at home.
-
The Travis separation a year later | daniel.haxx.se [Ed: Curl keeps moving to Microsoft proprietary software, which cannot be trusted]
A little over a year ago, we ditched Travis CI as a service to use for the curl project.
Up until that day, it had been our preferred and favored CI service for many years. At most, we ran 34 CI jobs on it, for every pull-request and commit. It was the service that we leaned on when we transitioned the curl project into a CI-heavy user. Our use of CI really took off 2017 and has been increasing ever since.
-
OpenMP: Support reverse offload (middle end part)
-
R-Ladies Taipei Hopes to Host Hybrid Events in the Future
We have two R communities here in Taiwan: R-Ladies Taipei, which I host, and the Taiwan R User Group. For the Taiwan R User Group, we meet every Monday and the R Ladies Taipei meetups are on the last Monday of every month. In our group, we not only talk about R but also about Machine Learning and Data Analysis. We are open to any topics that someone wants to discuss.
-
Please do not use Python for tooling
If you use a language that can produce binaries the job of ensuring you have all the dependencies in all the right versions is a one-time job: it happens at build time. It does not happen every time you are running the program. What’s more: it can be automated so that the result can be distributed. You can produce a statically linked binary that merely has to be downloaded and put in the appropriate location.
This ought to be the job of the party making the software. Not the user.
-
Python API deployment with RStudio Connect: Flask
One of the Python applications you can deploy to RStudio Connect is Flask. Flask is a WSGI (Web Server Gateway Interface) web application framework and provides a Python interface to enable the building of web APIs. It is useful to data scientists, for example for building interactive web dashboards and visualisations of data, as well as APIs for machine learning models. Deploying a Flask app to a publishing platform such as RStudio Connect means it can then be used from anywhere and can be easily shared with clients.