View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

So, I’ve built simple cothreading routines using setjmp in C that I can use for multitasking. Cool. As it stands, it is limited to cooperative multitasking, but if I could invoke it from an ALARM signal set on a periodic timer, and get information about where the program was interrupted, I could implement pre-emptive multitasking. So, is it possible to get information about the area that a program was interrupted to invoke the signal handler? Yes, but it is somewhat nonstandard and implementation-specific. Use sigaction() with SA_SIGINFO to request ucontext_t, which is where you retrieve this information.

20190724/DuckDuckGo unix get information about area in program where signal occurred
20190724/DuckDuckGo linux how to get instruction where signal interrupted
20190724/https://stackoverflow.com/questions/34989829/linux-signal-handling-how-to-get-address-of-interrupted-instruction

Basically, I’m reinventing “green threads,” but with the goal of doing so in a tiny, minimalistic implementation.

Hooray! Trisquel 9 development version is available. This is perhaps a great time for me to try it out, contribute to development, and maybe also put together a digital audio workstation version like Ubuntu Studio.

Also, please note that many artists require more up-to-date softwaer than garden variety desktop users, so the long-term support release cycles tend not to match very well with the needs of artists.

20190723/https://trisquel.info/en/forum/trisquel-9-ready-development-and-testing

Sadly, I learned that Musix has been removed from the endorsed distributions list at the request of the maintainer, due to lack of update. However, the maintainer is optimistic to do a solo handed update, if only sufficient funds are donated to work one full month without interruptions. We’ll have to wait and see. Unfortunately, I feel that the problem is bigger, that the community of techy musicians has decreased in number. Nowadays to be a musician, you no longer need to be really skilled in tech, so I guess that’s one of the big reasons why the tech musician community is waning.

20190723/https://www.gnu.org/distros/free-distros.html
20190723/https://musixdistro.wordpress.com/

Wondering why Trisquel has its own repositories and build system, rather than sharing that of Ubuntu? There’s a good answer and explanation in this forum thread.

20190723/https://trisquel.info/en/forum/why-does-trisquel-uses-own-mirrors-bulids-own-packages

So, I was wondering. Is it feasible to setup multiple Wi-Fi access points on the same channel when they are far apart, but can still hear each other? Will they be able to reliably cooperate with each other in sharing the same channel, or will the interference just be horrendous? It appears that with Wi-Fi, things are destined toward the later.

On the other hand, I found a great article with a lot of information and design considerations for setting up multiple access Wi-Fi points on the same network. I’ll summarize some of the noteworthy design considerations:

  • Water is a strong attenuator of Wi-Fi signals. Therefore, humans are a strong attenuator of Wi-Fi signals because they are water rich. Also, wood is a significant attenuator of Wi-Fi signals because it absorbs water vapor from the air, -6db, -20db, or more depending on the thickness of the wood. Notably, this also means that when the humidity is higher, like in the summer, the Wi-Fi signal attenuation is stronger, but when the humidity is lower like in the winter, the Wi-Fi signal attenuation is less.

  • Glass is actually also a fairly significant attenuator of Wi-Fi signals, -4db per pane. Double-paned and triple-paned glass respectively result in double and triple the attenuation. Likewise, fiberglass insulation is a significant attenuator of Wi-Fi signals.

Read on →

Trouble installing sosreport? Here is the dig that you need to know.

yum -y install sos
cd /usr/lib/python2.7/site-packages/sos/
ls policies/
vi policies/redhat.py
:s:RHEL_RELEASE_NAME...CentOS:Red Hat Enterprise:g

sosreport --batch --tmp-dir /var/tmp/capture

The issue is only apparent if you are installing the CentOS package on Red Hat Enterprise Linux. Unfortunately, some hacks are used such that the general package doesn’t support both distros simultaneously. So you have to make a hack to switch that if they aren’t matched up perfectly.

20190718/DuckDuckGo install sosreport no valid plugins were enabled
20190718/https://access.redhat.com/solution/3006791

20190718/https://bugzilla.redhat.com/show_bug.cgi?id=386691
20190718/https://bugzilla.redhat.com/show_bug.cgi?id=1197302

20190718/DuckDuckGo sospreport superclasses
20190718/https://github.com/sosreport/sos/wiki/How-to-Write-a-Policy

20190718/DuckDuckGo run sosreport non interactively
20190718/https://github.com/sosreport/sos/issues/405

Wow, VirtualBox does have a GUI option to detach so that you can operate in “headless” mode without the virtual machine GUI window present on your desktop, but it came about with a hide-and-seek game of GUI reorganization.

20190718/DuckDuckGo virtualbox hide window daemon vm
20190718/https://www.virtualbox.org/ticket/2597

20190718/DuckDuckGo virtualbox start vm daemon no gui

Beware! You MUST start a VM as headless via the command line or else you will not get the “detach GUI” option in the GUI.

VBoxManage startvm --type headless <name>

Previously, I’ve coded some GUIs with GTK+, but GTK+ is a no-go because of the recent events of breaking changes and other things that many application developers simply didn’t agree with. The choice is then between Qt and WxWidgets. Both are C++. So I’ll go with WxWidgets since it’s lighter, right? Well, wait, not so fast. People are disliking WxWidgets too for introducing breaking changes like GTK+. Okay, so there only is one choice, and that is Qt.

And since my software was supposed to be like PCManFM… now that makes it even easier, now that PCManFM is also on Qt.

If you want GTK+ or WxWidgets for a light weight GUI toolkit, keep it to the old versions.

Thinking about building a new light weight GUI toolkit that can be ubiquitous? Follow in the footsteps of Qt. Thankfully, this also does mean that you can use low-level Macintosh Toolbox or Windows API style primitives upon which the higher level is built. You could even use X11, for those who care.

If you really read into how old Trolltech operated internally, they really put a lot of ephasis on API compatibility.

Now X11 is good too… but then there’s Wayland display server. So, let’s be really firm on this one. When everyone in the graphics and GUI world didn’t care about API compatibility, they (Qt) were the last holdout. And yet, this is making them wildly popular among application developers. Turns out, application developers nowadays don’t want to experiment with new stuff and breaking changes.

Read on →

Do you want so-called “dynamic deploys” in the toy hodgepodge tech environment? Try vmpooler it looks like it is designed just to fit the bill.

20190717/https://github.com/puppetlabs/vmpooler

Here’s another gem that is useful for that hodgepodge environment. Essentially, it allows you to store secrets in your source code repositories without encrypting entire files that contain secrets, unlike ansible-vault or GPG.

20190717/https://github .com/voxpupuli/hiera-eyaml
20190717/https://slashdevslashrandom.wordpress.com/2013/06/03/my-griefs-with-hiera-gpg

Nowadays, DuckDuckGo is a lot bigger and they are writing a bunch of privacy articles on a website of their own. Here are two interesting articles, how to remove Google, and how Google limits people from the whole Internet by means of a “filter bubble” to show them only what they are “interested” in.

20190716/https://spreadprivacy.com/how-to-remove-google/
20190716/https://spreadprivacy.com/filter-bubble/

So, you’re doing some development on a Ruby gem, and now you want to install that custom Ruby gem into a bundler environment for the sake of testing with a larger Ruby app. How do you do this? Well, well, interestingly, there are two ways of doing this.

The first way is the simplest way. First of all, we assume you are not using a local directory for bundler. That is, you do a bundle install directly in your larger app without specifying a directory via the --path option. When you call bundle install like that, bundler will reuse the system/user gem directory for fetching installed bundler dependencies. Now, that is where the magic comes in. Change the version of your development gem to something unique, simply install your development gem to your system/user gem directory via rake install, then update your larger app’s Gemfile to point to your unique version. bundle install and bundle exec will automatically pick up and use your desired development gem version.

The second way assumes that you are using a local directory for bundler via the --path option. Here, the alternative that you should use is to define the gem with a path in the Gemfile like this:

gem 'rails_admin', :path => "vendor/gems/rails_admin"

You would place the gem inside the indicated directory.

Read on →