Programming Leftovers
-
An Introduction to Python for Non-Programmers
Welcome to the first entry in this Python for non-programmers series.
If you’re reading this, you probably have developed a curiosity about programming and are looking for a good place to start. I have good news for you. Python is one of the best languages with which to start that journey. Why? We’ll get into that in a minute. But first, let’s discover exactly what this language is and can do.
Python is what’s called a high-level, general-purpose programming language. Let’s break that definition down.
First, what is a high-level language? Let’s consider this:
At the bottom, you have the computer hardware, which only understands what’s called “machine language.” Because machine language (or machine code) is so close to the hardware, it’s considered a low-level language (because it exists at such a low level).
As you rise up away from the low level, languages become high-level, because they are abstracted away from the hardware. High-level languages do not need to view or access the details of the computer. If they did, they’d be considerably harder to use.
-
Raku Advent Calendar: Day 3 – Silently
Santa was working on some programs to handle all of the intracacies of modern-day just-in-time package delivering, and got annoyed by some parts of the program getting noisy because some elf had left some debug statements in there. Ah, the joys of collaboration!
So Santa wondered whether there could be a way to be less distracted by what otherwise seemed to be a perfectly running program. Looking at the Wonderful Winter Raku Land, after a little bit of searching, Santa found the silently module. That was great! It’s a module that exports a single subroutine silently that takes a block to execute, and will capture all output made by the code running in that block.
-
Installing Qt via Conan Package Manager
We have been working intensely for months for the Conan package manager to distribute Qt packages. Today, we are happy to provide you a technology preview.
-
Why curl is used everywhere, even on Mars
When I speak of curl in this post, I lump curl the command line tool and libcurl the library into one, and I just call them curl. Related: my webinar titled “Why everyone is using curl and you should too“.
I believe just about every curl user has their own story and explanation about why they use curl in their product or device. I think there are several good reasons why users, including many of the world’s largest and most successful tech giants, decide they can lean on curl for Internet transfers.
curl is used in mobile phone and tablet apps, it is used in TVs, cars, motorcycles, fridges, settop boxes, printers, smart watches, medical devices and computer games, both on desktop and in game consoles and of course in just about every web or Internet server out there. It was also used to land on mars. Put simpler: in almost every internet-connected device.
-
Runtime control of debug output: Endless Orange Week | Philip Withnall
Recently at Endless we had a week of focused working on projects which are not our day-to-day work. It was called ‘Endless Orange Week’, and everyone was encouraged to explore a topic of their choosing.
I chose to look at two projects, both of which included a D-Bus/API component. My thinking was that review of the new interfaces on each project might take a while, so it would make sense to have two projects running in parallel so I could switch between them when blocked.
I’m going to blog about the two projects separately, to avoid one mega-long post.
The first project was to add a D-Bus debug interface for applications. This would allow debug output from an application to be turned on and off at runtime, rather than just being set with a command line argument or environment variable when the application is first started.
This would allow users and developers to get debug output from long-running applications without having to restart them, as quite often restarting a process will destroy the state you were hoping to debug.
-
Notcurses 3.0 Released For Adding "Bling" To Your Terminal Apps - Phoronix
For those wanting to add some "bling" to your command-line programs to make some "rad" terminal apps, Notcurses 3.0 was released today for designing colorful and complex text-user interfaces. Notcurses allows adding a range of multimedia, Unicode, and other graphics capabilities to command-line applications across Linux / macOS / Windows.
Notcurses isn't designed to be a drop-in replacement to Ncurses or the likes but is trying to bling up the terminal but not necessarily most practical or efficient for long-time power users of the terminal. It does though have many cool effects if that's your thing and some of the functionality would spice up terminal apps if desiring a more modern TUI.
-
Understanding the MIXAL insertion sort. | Adam Young’s Web Log
A debugger is a wonderful tool for understanding what actually happens in a piece of code. Donald Knuth’s coding in TAOCP is archaic enough that I do not understand it just by reading through. This is due to a combination of my unfamiliarity with MIXAL, as well as some of the coding conventions he’s chosen. So, I’m going to step through the MIXAL code in mixvm, and annotate what I find.
-
Insertion sort From Knuth to Gnu AARCH64 | Adam Young’s Web Log
Now that I can run the Knuth version of the Insertion sort via MIXAL, I want to convert it to AARCH64 Assembly. What I am going to try to do here is a line by line translation. This is not necessarily how I would write the insertion sort in AARCH64 assembly, but rather a direct translation of the MIXAL version.
I started by defining constants for the output parameters. This is the equivalent to the TERM definition in the MIXAL version.
I print out the completed buffer. You can see some trial and error here; I was trying to calculate N, the length of the buffer, bases on the addreses, just as I had done for Hello World messages, but the fact that I needed to put a blank in the first position made that logic more complex than I wanted. So, while I hand caluclated the leng of the bufffer (26) I add 2 to account for the lead blank and the trailing \n.
IUn MIXAL, Many of the comparisons are done between registers and memory. AARCH64 does not support this. You also cannot add two integers without first loading one of them into a register. Thus, many single commands in MIXAL become multiple.
- Login or register to post comments
- Printer-friendly version
- 2088 reads
- PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is releasedAfter 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. |
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future TechThe 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. |
today's howtos
|
Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago