Language Selection

English French German Italian Portuguese Spanish

Development

Today's Leftovers and Programming Leftovers

Filed under
Development

  • LHS Episode #429: The Weekender LXXVIII

    It's time once again for The Weekender. This is our bi-weekly departure into the world of amateur radio contests, open source conventions, special events, listener challenges, hedonism and just plain fun. Thanks for listening and, if you happen to get a chance, feel free to call us or e-mail and send us some feedback. Tell us how we're doing. We'd love to hear from you.

  • New Alpha Release: Tor 0.4.7.1-alpha
  • Mozilla is testing setting Bing as the default Firefox search engine - MSPoweruser
  • What is open-source software? Understanding the non-proprietary software that allows you to modify its code [Ed: Lots of disinformation here]
  • It’s Time for Vendor Security 2.0

    1. Questionnaires are largely Security Theater because it’s nearly impossible to assess a company’s security risk from the outside.

    2. If the business needs a given tool, they’ll likely force the company to use it despite the risk.

    3. Given these truths, the most realistic path for protecting ourselves from vendors is heavy investment in Risk Visibility, Risk Reduction, and Risk Communication/Acceptance.

  • Napkin Problem 16: When To Write a Simulator

    I hope you see the value in simulations for getting a handle on these types of problems. I think you’ll also find that writing simulators is some of the most fun programming there is. Enjoy!

  • Use virtual environments to install third-party Python programs from PyPI

    The problem is that Pip's "user" mode involves pretending that Pip is basically a Unix distribution's package manager that just happens to be operating on your $HOME/.local. This is an attractive illusion and it sort of works, but in practice you run into issues over time when you upgrade things, especially if you have more than one program installed. You'll experience some of these issues with virtual environments as well, but with single purpose virtual environments (one venv per program) and keeping track of what you installed, the ultimate brute force solution is to delete and recreate the particular virtual environment. The dependency versions are getting tangled? Delete and recreate. You've moved to a new distribution version of Python (perhaps you've upgraded from one Ubuntu LTS to another)? It sounds like a good time to delete and recreate, rather than dealing with version issues.

Programming Leftovers

Filed under
Development
  • Announcement : An AArch64 (Arm64) Darwin port is planned for GCC12

    As many of you know, Apple has now released an AArch64-based version of macOS and desktop/laptop platforms using the ‘M1’ chip to support it. This is in addition to the existing iOS mobile platforms (but shares some of their constraints).

    There is considerable interest in the user-base for a GCC port (starting with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168) - and, of great kudos to the gfortran team, one of the main drivers is folks using Fortran.

    Fortunately, I was able to obtain access to one of the DTKs, courtesy of the OSS folks, and using that managed to draft an initial attempt at the port last year (however, nowhere near ready for presentation in GCC11). Nevertheless (as an aside) despite being a prototype, the port is in use with many via hombrew, macports or self-builds - which has shaken out some of the fixable bugs.

    The work done in the prototype identified three issues that could not be coded around without work on generic parts of the compiler.

    I am very happy to say that two of our colleagues, Andrew Burgess and Maxim Blinov (both from embecosm) have joined me in drafting a postable version of the port and we are seeking sponsorship to finish this in the GCC12 timeframe.

    Maxim has a lightning talk on the GNU tools track at LPC (right after the steering committee session) that will focus on the two generic issues that we’re tackling (1 and 2 below).

    Here is a short summary of the issues and proposed solutions (detailed discussion of any of the parts below would better be in new threads).

  • Apple Silicon / M1 Port Planned For GCC 12 - Phoronix

    Developers are hoping for next year's GCC 12 release they will have Apple AArch64 support on Darwin in place for being able to support Apple Silicon -- initially the M1 SoC -- on macOS with GCC.

    LLVM/Clang has long been supporting AArch64 on macOS given that Apple leverages LLVM/Clang as part of their official Xcode toolchain as the basis for their compiler across macOS to iOS and other products. While the GNU Compiler Collection (GCC) supports AArch64 and macOS/Darwin, it hasn't supported the two of them together but there is a port in progress to change it.

  • Dirk Eddelbuettel: tidyCpp 0.0.5 on CRAN: More Protect’ion

    Another small release of the tidyCpp package arrived on CRAN overnight. The packages offers a clean C++ layer (as well as one small C++ helper class) on top of the C API for R which aims to make use of this robust (if awkward) C API a little easier and more consistent. See the vignette for motivating examples.

    The Protect class now uses the default methods for copy and move constructors and assignment allowing for wide use of the class. The small NumVec class now uses it for its data member.

  • QML Modules in Qt 6.2

    With Qt 6.2 there is, for the first time, a comprehensive build system API that allows you to specify a QML module as a complete, encapsulated unit. This is a significant improvement, but as the concept of QML modules was rather under-developed in Qt 5, even seasoned QML developers might now ask "What exactly is a QML module". In our previous post we have scratched the surface by introducing the CMake API used to define them. We'll take a closer look in this post.

  • Santiago Zarate: So you want to recover and old git branch because it has been overwritten?
  • Start using YAML now | Opensource.com

    YAML (YAML Ain't Markup Language) is a human-readable data serialization language. Its syntax is simple and human-readable. It does not contain quotation marks, opening and closing tags, or braces. It does not contain anything which might make it harder for humans to parse nesting rules. You can scan your YAML document and immediately know what's going on.

    [...]

    At this point, you know enough YAML to get started. You can play around with the online YAML parser to test yourself. If you work with YAML daily, then this handy cheatsheet will be helpful.

  • 40 C programming examples

    C programming language is one of the popular programming languages for novice programmers. It is a structured programming language that was mainly developed for UNIX operating system. It supports different types of operating systems, and it is very easy to learn. 40 useful C programming examples have been shown in this tutorial for the users who want to learn C programming from the beginning.

Programming Leftovers

Filed under
Development
  • Using functions more

    Bash functions seem to sit in a sweet spot between aliases and full blown scripts. I’ve defined a number of functions in my dotfiles which are all useful. Unlike aliases, they can take parameters and have greater scope for doing things; unlike scripts, they run in the context of the current shell which means, for example, that I can set a value in a variable during the course of a function’s execution and it’s available directly afterwards, in the same shell session.

  • Some notes on upgrading programs with Python's pip

    My primary use of Python's pip package manager is to install programs like the Python LSP server; I may install these into either a contained environment (a virtual environment or a PyPy one) or as a user package with 'pip install --user'. In either case, the day will come when there's a new version of the Python LSP server (or whatever) and I want to update to it. As I noted down back in my pip cheatsheet, the basic command I want here is 'pip install --upgrade <package>', possibly with '--user' as well. However, it turns out that there are some complexities and issues here, which ultimately come about because pip is not the same sort of package manager as Fedora's DNF or Debian's apt.

  • OpenBSD's pledge and unveil from Python

    Years ago, OpenBSD gained two new security system calls, pledge(2) (originally tame(2)) and unveil. In both, an application surrenders capabilities at run-time. The idea is to perform initialization like usual, then drop capabilities before handling untrusted input, limiting unwanted side effects. This feature is applicable even where type safety isn’t an issue, such as Python, where a program might still get tricked into accessing sensitive files or making network connections when it shouldn’t. So how can a Python program access these system calls?

  • A good old-​fashioned Perl log analyzer

    A recent Lobsters post laud­ing the virtues of AWK remind­ed me that although the lan­guage is pow­er­ful and lightning-​fast, I usu­al­ly find myself exceed­ing its capa­bil­i­ties and reach­ing for Perl instead. One such appli­ca­tion is ana­lyz­ing volu­mi­nous log files such as the ones gen­er­at­ed by this blog. Yes, WordPress has stats, but I’ve nev­er let rein­ven­tion of the wheel get in the way of a good pro­gram­ming exercise.

  • Learning Path: Introduction to R

    Enhance your data science toolkit with our “Introduction to R” learning path: from the basis of the syntax, to operations and functions, for solid programming foundations.

    R is one of the most popular programming, scripting, and markup languages. Written by statisticians for statisticians, it is an incredible tool for data exploration, data manipulation, visualization and data analysis. If you don’t have it yet in your pocket, or if you would like to build better foundations for your programming skills, this workshop series is what you were looking for.

Programming Leftovers

Filed under
Development
  • Generate a minimal GStreamer build, tailored to your needs

    GStreamer is a powerful multimedia framework with over 30 libraries and more than 1600 elements in 230 plugins providing a wide variety of functionality. This makes it possible to build a huge variety of applications, however it also makes it tricky to ship in a constrained device. Luckily, most applications only use a subset of this functionality, and up until now there wasn't an easy way to generate a build with just enough GStreamer for a specific application.

    Thanks to a partnership with Huawei, you can now use gst-build to generate a minimal GStreamer build, tailored to a specific application, or set of applications. In this blog post, we'll look at the major changes that have been introduced in GStreamer to make this possible, and provide a small example of what can be achieved with minimal, custom builds.

  • How to reach craftsmanship? – vanitasvitae's blog

    I also taught myself coding. Well, I learned the basics of Java programming in school, but I kept on learning beyond that. My first projects were the typical mess that you’d expect from a beginner which has no idea what they are doing. Later I studied computer science and now I’m just a few credit points away from getting my masters degree. Yet, the university is not the place where you learn to code. They do teach you the basics of how a computer works, what a compiler is and even the theory behind creating your own compilers, but they hardly teach you how to write *good* code.

  • Perl Weekly Challenge 130: Odd Number and Binary Search Tree
  • Debugging by starting a REPL at a breakpoint is fun

    Hello! I was talking to a Python programmer friend yesterday about debugging, and I mentioned that I really like debugging using a REPL. He said he’d never tried it and that it sounded fun, so I thought I’d write a quick post about it.

    This debugging method doesn’t work in a lot of languages, but it does work in Python and Ruby and kiiiiiind of in C (via gdb).

  • Crunch numbers in Python with NumPy | Opensource.com

    NumPy, or Numerical Python, is a library that makes it easy to do statistical and set operations on linear series and matrices in Python. It is orders of magnitude faster than Python lists, which I covered in my notes on Python Data Types. NumPy is used quite frequently in data analysis and scientific calculations.

    I'm going to go over installing NumPy, and then creating, reading, and sorting NumPy arrays. NumPy arrays are also called ndarrays, short for n-dimensional arrays.

  • How I patched Python to include this great Ruby feature

    Ruby, unlike Python, makes lots of things implicit, and there's a special kind of if expression that demonstrates this well. It's often referred to as an "inline-if" or "conditional modifier", and this special syntax is able to return one value when a condition is true, but another value (nil, specifically) when a condition is false.

Devices and Programming

Filed under
Development
Hardware
  • Foot pressure sensors detect Parkinson’s disease
  • Perl Monthly Report - August

    Well, right from day one, I have been getting to work on something I never worked on before. To be honest with you, I was expecting to fight with good old CGI ridden code mostly. I find myself lucky to have such a great supporting team. Right now I am playing with Elastic Search and I am enjoying it. Thanks to CPAN for such a cool library, Search::Elasticsearch.

  • Applying PEP 8

    Two recent threads on the python-ideas mailing list have overlapped to a certain extent; both referred to Python's style guide, but the discussion indicates that the advice in it may have been stretched further than intended. PEP 8 ("Style Guide for Python Code") is the longstanding set of guidelines and suggestions for code that is going into the standard library, but the "rules" in the PEP have been applied in settings and tools well outside of that realm. There may be reasons to update the PEP—some unrelated work of that nature is ongoing, in fact—but Pythonistas need to remember that the suggestions in it are not carved in stone.

  • This Week in Rust 408

Programming Leftovers

Filed under
Development
  • Steinar H. Gunderson: plocate in Fedora

    It seems that due to the work of Zbigniew Jędrzejewski-Szmek, plocate is now in Fedora Rawhide. This carries a special significance; not only in Fedora an important distribution, but it is also the upstream of mlocate. Thus, an expressed desire to replace mlocate with plocate over the next few Fedora releases feels like it carries a certain amount of support on the road towards world domination. Smile

  • Qt Creator 5.0.1 released

    Qt Creator 5.0.1 released

  • My Favorite Warnings: redundant and missing

    The redundant and missing warnings were added in Perl 5.22 to cover the case where a call to the printf or sprintf had more (redundant) or fewer (missing) arguments than the format calls for. The documentation says that they may be extended to other built-ins (pack and unpack being named specifically) but as of Perl 5.34.0 only the printf() built-ins are covered.

  • 10 Python Code Challenges for Beginners

    One of the best ways to test and practice your skills with Python is by solving coding challenges. You can learn a lot from books and online courses, but coding isn't an armchair activity. You have to write some code to make genuine progress.

    Coding challenges are perfect for this. Coding challenges are small problems you can solve with code. Just because they're small doesn't mean they won't put your knowledge to the test. Each bite-size challenge will focus on skills that you'll use later working on complete software projects.

  • Python (numpy && matplotlib) solving one relatively difficult math problem

    The problem itself is to find all solutions of the following equation on real axis

    cos (cos (cos (cos (x)))) - sin (sin (sin (sin (x)))) = 0

    We intend to prove that equation above doesn't have any solution via creating a python script importing NumPy and Matplotlib. Just recall that the function understudy has a period of 2*pi .

Why Many Linux App Developers Don’t Want Distros to Use Themes

Filed under
Development
GNU
Linux
GNOME

You may associate Linux with the freedom to make your desktop look however you want, but that’s not the case with GNOME. At least, not without knowing which extensions to install or how to read code. By default, GNOME is intended to look and feel a certain way, and many developers would prefer if Linux distributions didn’t change the appearance of their apps by using themes.

Is it an issue when you change the theme on your own personal machine? No, you know what you're getting yourself into. But confusion can arise when the customized experience comes presented as the default.

Read more

Ticketit: Open-source Laravel-based Ticketing System

Filed under
Development
Software

Laravel is a trending open-source modern PHP framework for building enterprise and complex as well as small apps.

As Laravel becomes the number one PHP framework with its large community and rich ecosystem, developers may require to add a ticketing and support system to their apps. Well, with Ticketit it takes no time.

Ticketit is a free self-hosted Laravel-based ticketing system. It can be integrated smoothly with other Laravel projects.

Even though, the project is archived on GitHub, many Laravel developers are forking it and integrating it in their projects.

Read more

New Intel Tremont Optimizations Heading To The GCC Compiler

Filed under
Development
GNU

The GNU Compiler Collection has already supported Intel's Tremont cores as used by the low-power Jasper Lake platform. Now though coming to GCC are some optimizations to further enhance the performance when targeting the Tremont micro-architecture.

The new GCC Tremont patches include updating the memcpy/memset inline strategies, updated handling around vector and SSE conversions, switching to using the Haswell scheduling mountain, enabling a number of other options.

Read more

Solus abandons GTK

Filed under
Development

One of the leaders of the Solus Linux project, Joshua Strobl, announced his intention to abandon GTK in the development of both future versions of Budgie and the entire ecosystem of applications in Solus. On his blog, he made a number of criticisms of the current state and development plans of GTK, as well as the GNOME development philosophy.

According to him, the widespread implantation of Adwaita as the only true desktop theme and the accompanying removal of part of the API for various kinds of customization has added headaches to developers who maintain the GNOME stack in distributions or integrate their applications into it. All suggested options for customizing the look and feel of GTK-based applications and related libraries are rejected, and members of the GNOME team are insolently rude in response in tickets and social media.

Joshua also complains that GTK4, released a little less than a year ago, slightly complicated the code for working with widgets by prohibiting direct inheritance. But he sees a much more important problem with the abolition of the X11 API, in particular for obtaining the configuration of the connected monitors. Moving towards full support for Wayland, GNOME removed the X server polling functionality, instructing the developer to write their own interfaces to access X11 directly (or to APIs of other operating systems, if the application turned out to be cross-platform).

Read more

Also:

Rolled back to gtk2 version of yad

Syndicate content