đŸ Archived View for news.tuxmachines.org âș n âș 2023 âș 04 âș 26 âș Programming_Leftovers.1.gmi captured on 2023-04-26 at 12:54:43. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Tux Machines
Posted by Roy Schestowitz on Apr 26, 2023
=> https://www.brodrigues.co/blog/2023-04-25-10_years/ âș I've been blogging for 10 years
The primary reason I started my blog was to have a repository of code snippets that I could re-use. Anytime I had to do something for my thesis or for work, I would write instructions around the code that Iâve used to explain how and why things worked out. But I needed a spot to save these scripts, and it turns out that a blog was the best solution for this: it doesnât require any subscription to a (very often proprietary) service to store my notes for me, and I need 0 discipline to maintain a blog. Simply write a post, push to Github, website gets updated. If I would store the notes myself on my computer instead, this would mean a lot of work, and I would need to think about how to make them available across devices.
The other reason is that I thought that this would be a good way for me to contribute to the wider free software and open source ecosystem. Iâm not a programmer, so contributing code would be quite difficult for me. Iâve recently published a package, so in the end I ended up contributing code, but that was more due to âluckâ finding an actual problem that hadnât been solved (well, thatâs not really the case, logging in R had been solved, but not using a monad and for some reason I had become obsessed with monads in 2022) and also thanks to the help of much better programmers than myself. So writing and posting these blog posts would be my way to contribute to the community. I think that this was the right decision, as Iâve had many people throughout the years thank me for some of my blog posts that helped them with some of their tasks.
=> https://www.codewithjason.com/why-duplication-is-more-acceptable-in-tests/ âș Why duplication is more acceptable in tests
Itâs often taught in programming that duplication is to be avoided. But for some reason itâs often stated that duplication is more acceptable in test code than in application code. Why is this?
Weâll explore this, but first, letâs examine the wrong answers.
=> https://rubenerd.com/urban-sprawl-and-online-retail/ âș Urban sprawl guarenteed the success of online retail
Unfortunately, much of Sydney is the same suburban âstroadâ wasteland like you see in post-WWII New Zealand or North America. Weirdly enough, my first experience with this lifestyle was in Malaysia; my parents wanted a house again after living in high-rise Singapore, so we moved into a residential development on the periphery (to put it charitably!) of Kuala Lumpur. It was a beautiful, isolated prison accessible only by car, and I promised myself to never live in one again!
Which leads me to this epiphany about online retail. Living in a remote house distorts your view of the world in so many ways, but this might be one of the more economically consequential.
=> https://alexn.org/blog/2023/04/24/kotlin-suspended-functions-to-cats-effect-io/ âș Kotlin Coroutines to Cats-Effect
Kotlin Coroutines are usually integrated in Java code via Javaâs CompletableFuture, but a tighter integration might be possible with Cats-Effect. I played around to see if I can convert Kotlinâs coroutines, built via suspended functions straight to cats.effect.IO. Turns out I could.
=> https://bt.ht/git-patches âș Applying Email-Based Git Patches in Evolution on Linux
Users who work with git patches through email most likely use a terminal-based program such as aerc or mutt. CLI email clients tend to have built-in support for easily applying patches directly to their local repos. But what about people who prefer to use graphical email apps?
Lucky for us, it is actually fairly simple to replicate a similar workflow to that of a CLI client. In this example I will be focusing on the Evolution email client, but the core principles should work in most other GUIs.
=> https://euroquis.nl//freebsd/2023/04/25/cmake.html âș CMake 3.26 update on FreeBSD
It was time again to update CMake on FreeBSD. Thatâs always a guarantee for a good time, since there are about 2500 FreeBSD ports (software packages) that use CMake directly as their (meta-) build system. An update is a special moment to try to break them.
=> https://cmake.org/cmake/help/v3.26/release/3.26.html âș CMake
=> https://www.freebsd.org/ âș FreeBSD
=> https://cmake.org/cmake/help/v3.26/release/3.26.html âș CMake
=> https://www.freebsd.org/ âș FreeBSD
=> https://balintreczey.hu/blog/improve-build-time-of-rust-java-and-intel-fortran-projects-with-firebuilds-new-release/ âș Balint Reczey: Improve build time of Rust, Java and Intel Fortran projects with Firebuildâs new release!
Rust is a hugely popular compiled programming language and fully supporting it was an important goal for Firebuild for some time.
=> https://www.rust-lang.org/ âș Rust
Firebuildâs v0.8.0 release finally added Rust support in addition to numerous other improvements including support for Doxygen, Intelâs Fortran compiler and restored javac and javadoc acceleration.
=> https://github.com/firebuild/firebuild/releases/tag/v0.8.0 âș v0.8.0 release
=> https://www.rust-lang.org/ âș Rust
=> https://github.com/firebuild/firebuild/releases/tag/v0.8.0 âș v0.8.0 release
=> https://tecadmin.net/resolved-unary-operator-expected-error-in-bash/ âș âUnary Operator Expectedâ Error in Bash: Causes, Solutions, and Best Practices
Welcome to this tutorial on resolving the "unary operator expected" error in Bash! This error often occurs when working with Bash scripts and can be challenging to diagnose and fix.