Programming Leftovers
-
Faster Winter 4: Export lists
Without an export, the compiler has to assume that every top-level function can possibly called from the outside, even functions that you think of as “internal”. If you have a function that you do not export, like instr, step_work and step after my change, the compiler can see all the places the function is called. If the function is only called in one place, it may inline it (copy its definition into where it is called), and simplify the code around the edges. And even if it does not inline the function, it might learn something about how the functions are used, and optimize them based on that (e.g. based on Demand Analysis).
-
Ondřej Holý: How to call asynchronous function synchronously
GLib provides a lot of asynchronous functions, especially to deal with I/O. Unfortunately, some functions don’t have synchronous equivalents and the code has to be split into several callbacks. This is not handy in some cases. My this year’s GSoC student recently asked me whether it is possible to create synchronous function from asynchronous. He is currently working on test suite and don’t want to split test cases into several callbacks. So I decided to write a blog spot about as it might be handy for more people.
-
Sort list alphabetically with python
You will be given a vector of string(s). You must sort it alphabetically (case-sensitive!!) and then return the first value.
The returned value must be a string and have “***” between each of its letters.
You should not remove or add elements from/to the array.
Above is another problem in codewars, besides asking us to sort the array list and returning the first value in that list, we also need to insert stars within the characters.
-
Abolishing SyntaxError: invalid syntax ...
Do you remember when you first started programming (possibly with Python) and encountered an error message that completely baffled you? For some reason, perhaps because you were required to complete a formal course or because you were naturally persistent, you didn't let such messages discourage you entirely and you persevered. And now, whenever you see such cryptic error messages, you can almost immediately decipher them and figure out what causes them and fix the problem.
Congratulations, you are part of an elite group! Even a large number of people who claim that they can program are almost certainly less capable than you are.
Given your good fortune, would you mind donating 5 to 10 minutes of your time to help countless beginners that are struggling in trying to understand Python error messages?
-
Is it too late to integrate GitOps?
The idiom “missed the boat” can be used to describe the loss of an opportunity or a chance to do something. With OpenShift, the excitement to use this new and cool product immediately may create your own “missed the boat” moment in regards to managing and maintaining deployments, routes, and other OpenShift objects but what if the opportunity isn’t completely gone?
Continuing with our series on GitOps (LINK), the following article will walk through the process of migrating an application and its resources that were created manually to a process in which a GitOps tool manages the assets. To help us understand the process we will manually deploy a httpd application. Using the steps below we will create a namespace, deployment, and service and expose the service which will create a route.
- Login or register to post comments
- Printer-friendly version
- 1567 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