From 2fc7b13c64dbc20d9ae818634757ffd693651d1b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 15 Mar 2023 00:05:11 +0200 Subject: add index tpl --- gemfeed/atom.xml | 4720 ++++++++++++++++++++++++++++++++++++++++++++++++++++- index.gmi | 2 + index.gmi.tpl | 35 + stats/by-host.gmi | 146 -- 4 files changed, 4706 insertions(+), 197 deletions(-) create mode 100644 index.gmi.tpl delete mode 100644 stats/by-host.gmi diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 11d031a3..f2ff6f67 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2023-03-12T17:13:52+02:00 + 2023-03-12T19:25:07+02:00 foo.zone feed To be in the .zone! @@ -10,16 +10,16 @@ How to shut down after work gemini://foo.zone/gemfeed/2023-02-26-how-to-shut-down-after-work.gmi - 2023-02-26T17:13:52+02:00 + 2023-02-26T23:48:01+02:00 - Paul C. Buetow - comments@mx.buetow.org + Paul Buetow + hi@paul.cyou - Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work. . .....to read on please visit my site. + Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work.

How to shut down after work

-

Author: Paul; Published: 2023-02-26T23:48:01+02:00

+

Published at 2023-02-26T23:48:01+02:00

     |\   "Music should be heard not only with the ears, but also the soul."
 |---|--\-----------------------|-----------------------------------------|  
@@ -75,16 +75,16 @@
         Why GrapheneOS rox
         
         gemini://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.gmi
-        2023-01-23T17:13:52+02:00
+        2023-01-23T15:31:52+02:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        Art by Joan Stark. .....to read on please visit my site.
+        Art by Joan Stark
         
             

Why GrapheneOS rox

-

Author: Paul; Published: 2023-01-23T15:31:52+02:00

+

Published at 2023-01-23T15:31:52+02:00

 Art by Joan Stark
                _.===========================._
@@ -174,16 +174,16 @@ Art by Joan Stark
         Ultra(re)learning Java - My takeaways
         
         gemini://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi
-        2022-12-24T17:13:52+02:00
+        2022-12-24T23:18:40+02:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my 'Creative universe' post:. .....to read on please visit my site.
+        As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my 'Creative universe' post:
         
             

Ultra(re)learning Java - My takeaways

-

Author: Paul; Published: 2022-12-24T23:18:40+02:00

+

Published at 2022-12-24T23:18:40+02:00


As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my "Creative universe" post:

Creative universe
@@ -256,16 +256,16 @@ Art by Joan Stark I tried (Doom) Emacs, but I switched back to (Neo)Vim gemini://foo.zone/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi - 2022-11-24T17:13:52+02:00 + 2022-11-24T11:17:15+02:00 - Paul C. Buetow - comments@mx.buetow.org + Paul Buetow + hi@paul.cyou - Art by \ \_! / __!. .....to read on please visit my site. + Art by \ \_! / __!

I tried (Doom) Emacs, but I switched back to (Neo)Vim

-

Author: Paul; Published: 2022-11-24T11:17:15+02:00; Updated: 2022-11-26

+

Published at 2022-11-24T11:17:15+02:00; Updated at 2022-11-26

              _/  \    _(\(o
              /     \  /  _  ^^^o
@@ -400,16 +400,16 @@ nmap ,j :call OpenJournalPage()<CR>
         Installing DTail on OpenBSD
         
         gemini://foo.zone/gemfeed/2022-10-30-installing-dtail-on-openbsd.gmi
-        2022-10-30T17:13:52+02:00
+        2022-10-30T11:03:19+02:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        This will be a quick blog post, as I am busy with my personal life now. I have relocated to a different country and am still busy arranging things. So bear with me :-). .....to read on please visit my site.
+        This will be a quick blog post, as I am busy with my personal life now. I have relocated to a different country and am still busy arranging things. So bear with me :-)
         
             

Installing DTail on OpenBSD

-

Author: Paul; Published: 2022-10-30T11:03:19+02:00

+

Published at 2022-10-30T11:03:19+02:00

        ,_---~~~~~----._
  _,,_,*^____      _____``*g*\"*,
@@ -695,16 +695,16 @@ REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nod
         After a bad night's sleep
         
         gemini://foo.zone/gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi
-        2022-09-30T17:13:52+03:00
+        2022-09-30T09:53:23+03:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it.. .....to read on please visit my site.
+        Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it.
         
             

After a bad night's sleep

-

Author: Paul; Published: 2022-09-30T09:53:23+03:00; Updated: 2022-10-12

+

Published at 2022-09-30T09:53:23+03:00; Updated at 2022-10-12

                z
                 z
@@ -769,16 +769,16 @@ jgs                (________\  \
         Gemtexter 1.1.0 - Let's Gemtext again
         
         gemini://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi
-        2022-08-27T17:13:52+03:00
+        2022-08-27T18:25:57+01:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        I am proud to announce that I've released Gemtexter version . What is Gemtexter? It's my static site generator written in GNU Bash:. .....to read on please visit my site.
+        I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my static site generator written in GNU Bash:
         
             

Gemtexter 1.1.0 - Let's Gemtext again

-

Author: Paul; Published: 2022-08-27T18:25:57+01:00

+

Published at 2022-08-27T18:25:57+01:00

 -=[ typewriter ]=-  1/98
 
@@ -845,16 +845,16 @@ check_dependencies () {
         Let's Encrypt with OpenBSD and Rex
         
         gemini://foo.zone/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi
-        2022-07-30T17:13:52+03:00
+        2022-07-30T12:14:31+01:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD.. .....to read on please visit my site.
+        I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD.
         
             

Let's Encrypt with OpenBSD and Rex

-

Author: Paul; Published: 2022-07-30T12:14:31+01:00

+

Published at 2022-07-30T12:14:31+01:00

                                                /    _    \
   The Hebern Machine                            \ ." ". /
@@ -1452,16 +1452,16 @@ rex commons
         Sweating the small stuff - Tiny projects of mine
         
         gemini://foo.zone/gemfeed/2022-06-15-sweating-the-small-stuff.gmi
-        2022-06-15T17:13:52+03:00
+        2022-06-15T08:47:44+01:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        This blog post is a bit different from the others. It consists of multiple but smaller projects worth mentioning. I got inspired by Julia Evan's 'Tiny programs' blog post and the side projects of The Sephist, so I thought I would also write a blog posts listing a couple of small projects of mine:. .....to read on please visit my site.
+        This blog post is a bit different from the others. It consists of multiple but smaller projects worth mentioning. I got inspired by Julia Evan's 'Tiny programs' blog post and the side projects of The Sephist, so I thought I would also write a blog posts listing a couple of small projects of mine:
         
             

Sweating the small stuff - Tiny projects of mine

-

Author: Paul; Published: 2022-06-15T08:47:44+01:00; Updated: 2022-06-18

+

Published at 2022-06-15T08:47:44+01:00; Updated at 2022-06-18

          _
         /_/_      .'''.
@@ -1693,16 +1693,16 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
         Perl is still a great choice
         
         gemini://foo.zone/gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi
-        2022-05-27T17:13:52+03:00
+        2022-05-27T07:50:12+01:00
         
-            Paul C. Buetow
-            comments@mx.buetow.org
+            Paul Buetow
+            hi@paul.cyou
         
-        Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. 'Perl' is the name of the language and  the name of the interpreter or the interpreter command.. .....to read on please visit my site.
+        Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. 'Perl' is the name of the language and `perl` the name of the interpreter or the interpreter command.
         
             

Perl is still a great choice

-

Author: Paul; Published: 2022-05-27T07:50:12+01:00; Updated: 2023-01-28

+

Published at 2022-05-27T07:50:12+01:00; Updated at 2023-01-28

Comic source: XKCD

Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. "Perl" is the name of the language and perl the name of the interpreter or the interpreter command.

Unfortunately (it makes me sad), Perl's popularity has been declining over the last years as Google trends shows:

@@ -1794,6 +1794,4624 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs https://www.perl.org

Update 2022-12-17: The following is another related post. I don't agree to the statement made there, that Python code tends to be shorter than Perl code, though!

Why Perl is still relevant in 2022
+

E-Mail your comments to hi@paul.cyou :-)

+
+
+ + + Creative universe + + gemini://foo.zone/gemfeed/2022-04-10-creative-universe.gmi + 2022-04-10T10:09:11+01:00 + + Paul Buetow + hi@paul.cyou + + I have been participating in an annual work-internal project contest (we call it Pet Project contest) since I moved to London and switched jobs to my current employer. I am very happy to say that I won a 'silver' prize last week here 🎆. Over the last couple of years I have been a finalist in this contest six times and won some kind of prize five times. Some of my projects were also released as open source software. One had a magazine article published, and for another one I wrote an article on my employer's engineering blog. If you have followed all my posts on this blog (the one you are currently reading), then you have probably figured out what these projects were: + +
+

Creative universe

+

Published at 2022-04-10T10:09:11+01:00; Updated at 2022-04-18

+
+ .              +   .                .   . .     .  .
+                   .                    .       .     *
+  .       *                        . . . .  .   .  + .
+            "You Are Here"            .   .  +  . . .
+.                 |             .  .   .    .    . .
+                  |           .     .     . +.    +  .
+                 \|/            .       .   . .
+        . .       V          .    * . . .  .  +   .
+           +      .           .   .      +
+                            .       . +  .+. .
+  .                      .     . + .  . .     .      .
+           .      .    .     . .   . . .        ! /
+      *             .    . .  +    .  .       - O -
+          .     .    .  +   . .  *  .       . / |
+               . + .  .  .  .. +  .
+.      .  .  .  *   .  *  . +..  .            *
+ .      .   . .   .   .   . .  +   .    .            +
+                                         - the universe
+

+

Prelude

+

I have been participating in an annual work-internal project contest (we call it Pet Project contest) since I moved to London and switched jobs to my current employer. I am very happy to say that I won a "silver" prize last week here 🎆. Over the last couple of years I have been a finalist in this contest six times and won some kind of prize five times. Some of my projects were also released as open source software. One had a magazine article published, and for another one I wrote an article on my employer's engineering blog. If you have followed all my posts on this blog (the one you are currently reading), then you have probably figured out what these projects were:

+DTail - The distributed log tail program
+Realistic load testing with I/O Riot for linux
+

Note that my latest silver prize project isn't open source software and because of that there is no public material I can refer to. Maybe the next one again?

+

I want to point out that I never won the "gold" prize and it's the first time I won "silver", though. I believe, looking at the company's contest history, I am the employee with the most consecutive successful project submissions (my streak broke as I didn't participate last year) and am also the one with the highest successful project count in total. Sorry if this all sounds a bit self-promotional, but I think it is something to be proud of. Consistency beats a one-off success.

+

I often put endless hours and sometimes sleepless nights into such projects and all of that in my own time. I, an engineer whose native tongue is not English, also have to present such a project in front of the CEO, CTO and CPO, the Chief Scientist, the founders of the company, and, if it is not enough, to all other staff of the company too. I usually also demonstrate a working prototype live on a production grid during the presentation. 😓

+

So why would I sign up myself for such side projects? Isn't it a lot of stress and extra work? Besides the prize in form of money (you can not count on that, you may win or you may not win something) and recognition, there are also other motivational points:

+
    +
  • I want to learn new technologies or to deepen my knowledge of a given technology. I want to have a personal benefit from the project, even when I don't win any prize. So when the company is offering a contest, why not use it as a motivational trampoline? It's good to have a hard deadline for a project. And the project will also benefit the company in some way. So it's a win-win.
  • +
  • I love the idea of combining several old things into a new thing. You can call this creativity. At work, we call this sometimes Lego: Building new things from given blocks. But I also love to add something new and unique to the mix, something that didn't exist as a Lego block before and could not be built by using only the already existing blocks.
  • +
+

How to be creative

+

How did I manage to be creative with all these Pet Projects? Unfortunately, there is no step-by-step guide I could point you to. But what I want to do in this blog post is share my personal experience so far.

+

Know which problem you want to solve

+

There must be a problem to be solved or a thing to be improved. It makes no sense to have a project without a goal. A problem might be obvious to you, and you don't even need to think about it. In that case, you are all set, and you can immerse yourself with the problem.

+

If, however, you don't know what problem you want to solve: Do you really need to be creative? All problems are solved anyway, correct? In that case, just go on with your work. As you immerse yourself with your daily work, you will find a project naturally after a while. I don't believe you should artificially find a project. It should come naturally to you. You should have an interest in the problem domain and a strong desire to find a proper solution for the problem. Artificially created projects come with the catch that you might give up on it rather sooner than later due to lack of motivation and desire.

+

Immerse / deep dive

+

If you want to be creative in a field, you must know a lot about it. The more you know about it, the more dots you can connect. When you are learning a new technology or if you are thinking about a tough problem, do it thoroughly. Don't let anything distract you. Read books, watch lectures, listen to podcasts or audiobooks about the topic, talk to other people working on similar topics. Immerse yourself for multiple hours per day, multiple days per week, multiple weeks and maybe even months. Create your own inner universe.

+

But once a day is over, shut your thoughts down. Hit the off-switch. Stop thinking about this problem for the remainder of the day. This can be difficult, as you didn't solve the problem- or didn't understand everything of the new technology yet, and you really want to get to the point. But be strict to yourself and stop thinking about it for a while.

+

You must understand that you are more than just your conscious thoughts. Your brain does a lot of work in the background that you aren't aware of consciously. What happens when you stop consciously thinking about a problem is that your brain continues processing it. You might have experienced the "AHA"-effect, where suddenly you had an idea out of nowhere (e.g. during a walk, in the shower, or in the morning when you woke up)? This is your conscious self downloading a result from the background thread of your brain. You can elevate this effect by immersing with the problem immensely before giving your conscious self a break.

+

Sometimes, depending on how deeply you were immersed, you may need to let the problem go for a couple of days (e.g. over a weekend) before you can download a new insight.

+

Always have a notebook with you

+

Wherever you go, ensure that you always have something to take notes with you. Once you have an idea from nowhere (or from your unconscious but volatile brain), you really want to write it down to persistent storage. It doesn't matter what kind of note-taking device you use here. It can be a paper journal, or it can be your smartphone. 

+

My advice is to have a separate section where you put your notes of all of your ideas. At home or in the office, I write everything in my paper journal. When I am not at home, I use a digital note-taking app on my phone. Later, I copy the digital notes from it into a project-specific section of my paper journal.

+

I prefer taking notes on paper, as it gives you more freedom of how to structure it. You can use any colour, and you can also quickly create diagrams without the use of any complex computer program.

+

When you didn't sleep enough

+

I noticed while being sleep-deprived I am (obviously) unable to concentrate so much, and it is difficult to be immersed in a focused way. But on the other hand, I am a lot more creative compared to when I am not sleep-deprived. Then, my brain suddenly presents me with connections I have not thought of before. Here, I usually write any idea I have down on a sheet of paper or in my journal, so I can pick it up later. I then often continue to philosophise about a possible solution. Sometimes to the absurd, and sometimes to something pretty useful.

+

I am not saying that you should skip sleep. By all means, if you can sleep, then sleep. But there are some days when you don't manage to sleep (e.g. think too much about a project and didn't manage to hit the off switch). This is, where you can take advantage of your current state of mind. Disclaimer: Skipping sleep damages your health. So, please don't try this out on purpose. But in case you had a bad night, remember this trick.

+

Have regular breaks and relax

+

Have regular breaks. Don't skip your lunch break. Best, have a walk during lunchtime. And after work, do some kind of workout or visit a sports class. Do something completely unrelated to work before going to sleep (e.g. visit a parallel universe and read a Science Fiction novel). In short: Totally hit the off-switch after your work for the day is finished. You will be much more energised and motivated the next time you open your work laptop.

+I personally love to read Science Fiction novels
+

I skip breakfast and lunch during the week. This means that on average, I intermittent fast on average 18-20 hours daily. It may sound odd to most people (who don't intermittent fast), but in a fasted state, I can be even more focused, thus helping me immerse myself in something even more. Not having breakfast and lunch also gives me back some time for other things (e.g. a nice walk, where I listen to podcasts or audiobooks or practise using my camera (street photography)). I relax my routine during the week ends, where I may enjoy a meal at any given time of the day.

+

It also helps a lot eat healthy. Healthy food makes your brain work more efficiently. But I won't go into more details here, as nothing is as contradictory as the health and food industry. Conduct your own research. Your opinion may be different from mine anyway, and everyone's body reacts to certain foods differently. What for one person works may not work for another person. But be aware that you will find a lot of wrong and also conflicting information on the internet. So always use multiple resources for your research.

+

Upside-down approach

+

It's easy to fall into the habit of "boxed" thinking, but creativity is exactly the opposite. Once in a while, make yourself think "Is A really required to do B?". Many assumptions are believed to be true. But are they really? A concrete example: "At work we only use the programming language L and framework F" and therefore, it is the standard we must use.

+

Another way to think about it is "Is there an alternative way to accomplish the desired result? What if there were no programming language L and framework F? What would I do instead?". Maybe you would use programming language X to implement your own domain-specific language, which does what framework F would have done but in exactly the way you want to + much more flexible than F! And maybe language X would be much better suitable than L to implement a DSL anyway. Conclusion: It never hurts to verify your assumptions.

+

Often, you will also find solutions to problems you never intended to solve and find new problems you never imagined to actually exist. That might not be a bad thing, but it might sidetrack you on your path to finding a solution for a particular problem. So be careful not to get sidetracked too much. In this case, just save a note for later reference (maybe your next Pet Project?) somewhere and go on with your actual problem.

+

Don't be afraid to think about weird and unconventional solutions. Sometimes, the most unconventional solution is the best solution to a problem. Also, try to keep to the basics. The best solutions are KISS.

+Keep it simple and stupid
+

A small additional trick: you can train yourself to generate new and unconventional ideas. Just write down 20 random ideas every day. It doesn't matter what the ideas are about and whether they are useful or not. The purpose of this exercise is to make your brain think about something new and unconventional. These can be absurd ideas such as "Jump out of the window naked in the morning in order to wake up faster". Of course, you would never do that, but at least you had an idea and made your brain generate something.

+

Don't be busy all the time

+

Especially as a DevOps Engineer, you could be busy all the time with small, but frequent, ad hoc tasks. Don't lose yourself here. Yes, you should pay attention to your job and those tasks, but you should also make some room for creativity. Don't schedule meeting after ad hoc work after meeting after Jira ticket work after another Jira ticket. There should also be some "free" space in your calendar.

+

Use the "free" time to play around with your tech stack. Try out new options, explore the system metrics, explore new tools, etc. Dividends will pay off with new ideas, which you would have never come up with if you were "just busy" like a machine.

+

Sometimes, I pick a Unix manual page of a random command and start reading it. I have a bash helper function which will pick one for me:

+
+❯ where learn
+learn () {
+  man $(ls /bin /sbin /usr/bin /usr/sbin 2>/dev/null | shuf -n 1) |
+    sed -n "/^NAME/ { n;p;q }"
+}
+❯ learn
+       perltidy - a perl script indenter and reformatter
+❯ learn
+       timedatectl - Control the system time and date
+

+

Conclusion

+

This all summarises advice I have, really.  I hope this was interesting and helpful for you.

+

I have one more small tip: I never published a blog post the same day I wrote it. After finishing writing it, I always wait for a couple of days. In all cases so far, I had an additional idea to add or to fine tune the blog post.

+

Another article I found interesting and relevant is

+Creative Paradise by The Sephist
+

Relevant books I can recommend are:

+
    +
  • Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press
  • +
  • Deep Work; Cal Newport; Piatkus
  • +
  • So Good They Can't Ignore You; Cal Newport; Business Plus
  • +
  • The Off Switch; Mark Cropley; Virgin Books
  • +
  • Ultralearning; Scott Young; Thorsons
  • +
+

E-Mail your comments to hi@paul.cyou :-)

+
+
+
+ + The release of DTail 4.0.0 + + gemini://foo.zone/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi + 2022-03-06T18:11:39+00:00 + + Paul Buetow + hi@paul.cyou + + I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. You can also read my previous post about DTail in case you wonder what DTail is: + +
+

The release of DTail 4.0.0

+

Published at 2022-03-06T18:11:39+00:00

+
+                              ,_---~~~~~----._
+                        _,,_,*^____      _____``*g*\"*,
+  ____ _____     _ _   / __/ /'     ^.  /      \ ^@q   f
+ |  _ \_   _|_ _(_) |   @f | @))    |  | @))   l  0 _/
+ | | | || |/ _` | | |  \`/   \~____ / __ \_____/    \
+ | |_| || | (_| | | |   |           _l__l_           I
+ |____/ |_|\__,_|_|_|   }          [______]           I
+                        ]            | | |            |
+                        ]             ~ ~             |
+                        |                            |
+                         |                           |
+

+

I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. You can also read my previous post about DTail in case you wonder what DTail is:

+DTail - The distributed log tail program
+

If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well):

+https://dtail.dev
+

So, what's new in 4.0.0?

+

Rewritten logging

+

For DTail 4, logging has been completely rewritten. The new package name is "internal/io/dlog". I rewrote the logging because DTail is a special case here: There are logs processed by DTail, there are logs produced by the DTail server itself, there are logs produced by a DTail client itself, there are logs only logged by a DTail client, there are logs only logged by the DTail server, and there are logs logged by both, server and client. There are also different logging levels and outputs involved.

+

As you can imagine, it becomes fairly complex. There is no ready Go off-shelf logging library which suits my needs and the logging code in DTail 3 was just one big source code file with global variables and it wasn't sustainable to maintain anymore. So why not rewrite it for profit and fun?

+

There's a are new log level structure now (The log level now can be specified with the "-logLevel" command line flag):

+
+// Available log levels.
+const (
+	None    level = iota
+	Fatal   level = iota
+	Error   level = iota
+	Warn    level = iota
+	Info    level = iota
+	Default level = iota
+	Verbose level = iota
+	Debug   level = iota
+	Devel   level = iota
+	Trace   level = iota
+	All     level = iota
+)
+

+

DTail also supports multiple log outputs (e.g. to file or to stdout). More are now easily pluggable with the new logging package. The output can also be "enriched" (default) or "plain" (read more about that further below).

+

Configurable terminal color codes

+

A complaint I received from the users of DTail 3 were the terminal colors used for the output. Under some circumstances (terminal configuration) it made the output difficult to read so that users defaulted to "--noColor" (disabling colored output completely). I toke it by heart and also rewrote the color handling. It's now possible to configure the foreground and background colors and an attribute (e.g. dim, bold, ...).

+

The example "dtail.json" configuration file represents the default (now, more reasonable default) color codes used, and it is free to the user to customize them:

+
+{
+  "Client": {
+    "TermColorsEnable": true,
+    "TermColors": {
+      "Remote": {
+        "DelimiterAttr": "Dim",
+        "DelimiterBg": "Blue",
+        "DelimiterFg": "Cyan",
+        "RemoteAttr": "Dim",
+        "RemoteBg": "Blue",
+        "RemoteFg": "White",
+        "CountAttr": "Dim",
+        "CountBg": "Blue",
+        "CountFg": "White",
+        "HostnameAttr": "Bold",
+        "HostnameBg": "Blue",
+        "HostnameFg": "White",
+        "IDAttr": "Dim",
+        "IDBg": "Blue",
+        "IDFg": "White",
+        "StatsOkAttr": "None",
+        "StatsOkBg": "Green",
+        "StatsOkFg": "Black",
+        "StatsWarnAttr": "None",
+        "StatsWarnBg": "Red",
+        "StatsWarnFg": "White",
+        "TextAttr": "None",
+        "TextBg": "Black",
+        "TextFg": "White"
+      },
+      "Client": {
+        "DelimiterAttr": "Dim",
+        "DelimiterBg": "Yellow",
+        "DelimiterFg": "Black",
+        "ClientAttr": "Dim",
+        "ClientBg": "Yellow",
+        "ClientFg": "Black",
+        "HostnameAttr": "Dim",
+        "HostnameBg": "Yellow",
+        "HostnameFg": "Black",
+        "TextAttr": "None",
+        "TextBg": "Black",
+        "TextFg": "White"
+      },
+      "Server": {
+        "DelimiterAttr": "AttrDim",
+        "DelimiterBg": "BgCyan",
+        "DelimiterFg": "FgBlack",
+        "ServerAttr": "AttrDim",
+        "ServerBg": "BgCyan",
+        "ServerFg": "FgBlack",
+        "HostnameAttr": "AttrBold",
+        "HostnameBg": "BgCyan",
+        "HostnameFg": "FgBlack",
+        "TextAttr": "AttrNone",
+        "TextBg": "BgBlack",
+        "TextFg": "FgWhite"
+      },
+      "Common": {
+        "SeverityErrorAttr": "AttrBold",
+        "SeverityErrorBg": "BgRed",
+        "SeverityErrorFg": "FgWhite",
+        "SeverityFatalAttr": "AttrBold",
+        "SeverityFatalBg": "BgMagenta",
+        "SeverityFatalFg": "FgWhite",
+        "SeverityWarnAttr": "AttrBold",
+        "SeverityWarnBg": "BgBlack",
+        "SeverityWarnFg": "FgWhite"
+      },
+      "MaprTable": {
+        "DataAttr": "AttrNone",
+        "DataBg": "BgBlue",
+        "DataFg": "FgWhite",
+        "DelimiterAttr": "AttrDim",
+        "DelimiterBg": "BgBlue",
+        "DelimiterFg": "FgWhite",
+        "HeaderAttr": "AttrBold",
+        "HeaderBg": "BgBlue",
+        "HeaderFg": "FgWhite",
+        "HeaderDelimiterAttr": "AttrDim",
+        "HeaderDelimiterBg": "BgBlue",
+        "HeaderDelimiterFg": "FgWhite",
+        "HeaderSortKeyAttr": "AttrUnderline",
+        "HeaderGroupKeyAttr": "AttrReverse",
+        "RawQueryAttr": "AttrDim",
+        "RawQueryBg": "BgBlack",
+        "RawQueryFg": "FgCyan"
+      }
+    }
+  },
+  ...
+}
+

+

You notice the different sections - these are different contexts:

+
    +
  • Remote: Color configuration for all log lines sent remotely from the server to the client.
  • +
  • Client: Color configuration for all lines produced by a DTail client by itself (e.g. status information).
  • +
  • Server: Color configuration for all lines produced by the DTail server by itself and sent to the client (e.g. server warnings or errors)
  • +
  • MaprTable: Color configuration for the map-reduce table output.
  • +
  • Common: Common color configuration used in various places (e.g. when it's not clear what's the current context of a line).
  • +
+

When you do so, make sure that you check your "dtail.json" against the JSON schema file. This is to ensure that you don't configure an invalid color accidentally (requires "jsonschema" to be installed on your computer). Furthermore, the schema file is also a good reference for all possible colors available:

+
+jsonschema -i dtail.json schemas/dtail.schema.json
+

+

Serverless mode

+

All DTail commands can now operate on log files (and other text files) directly without any DTail server running. So there isn't a need anymore to install a DTail server when you are on the target server already anyway, like the following example shows:

+
+% dtail --files /var/log/foo.log
+

+

or

+
+% dmap --files /var/log/foo.log --query 'from TABLE select .... outfile result.csv'
+

+

The way it works in Go code is that a connection to a server is managed through an interface and in serverless mode DTail calls through that interface to the server code directly without any TCP/IP and SSH connection made in the background. This means, that the binaries are a bit larger (also ship with the code which normally would be executed by the server) but the increase of binary size is not much.

+

Shorthand flags

+

The "--files" from the previous example is now redundant. As a shorthand, It is now possible to do the following instead:

+
+% dtail /var/log/foo.log
+

+

Of course, this also works with all other DTail client commands (dgrep, dcat, ... etc).

+

Spartan (aka plain) mode

+

There's a plain mode, which makes DTail only print out the "plain" text of the files operated on (without any DTail specific enriched output). E.g.:

+
+% dcat --plain /etc/passwd > /etc/test
+% diff /etc/test /etc/passwd  # Same content, no diff
+

+

This might be useful if you wanted to post-process the output.

+

Standard input pipe

+

In serverless mode, you might want to process your data in a pipeline. You can do that now too through an input pipe:

+
+% dgrep --plain --regex 'somethingspecial' /var/log/foo.log |
+    dmap --query 'from TABLE select .... outfile result.csv'
+

+

Or, use any other "standard" tool:

+
+% awk '.....' < /some/file | dtail ....
+

+

New command dtailhealth

+

Prior to DTail 4, there was a flag for the "dtail" command to check the health of a remote DTail server (for use with monitoring system such as Nagios). That has been moved out to a separate binary to reduce complexity of the "dtail" command. The following checks whether DTail is operational on the current machine (you could also check a remote instance of DTail server, just adjust the server address).

+
+% cat check_dtail.sh
+#!/bin/sh
+
+exec /usr/local/bin/dtailhealth --server localhost:2222
+

+

Improved documentation

+

Some features, such as custom log formats and the map-reduce query language, are now documented. Also, the examples have been updated to reflect the new features added. This also includes the new animated example Gifs (plus documentation how they were created).

+

I must admit that not all features are documented yet:

+
    +
  • Server side scheduled map-reduce queries
  • +
  • Server side continuous map-reduce queries
  • +
  • Some more docs about terminal color customization
  • +
  • Some more docs about log levels
  • +
+

That will be added in one of the future releases.

+

Integration testing suite

+

DTail comes already with some unit tests, but what's new is a full integration testing suite which covers all common use cases of all the commands (dtail, dcat, dgrep, dmap) with a server backend and also in serverless mode.

+

How are the tests implemented? All integration tests are simply unit tests in the "./integrationtests" folder. They must be explicitly activated with:

+
+% export DTAIL_INTEGRATION_TEST_RUN_MODE=yes
+

+

Once done, first compile all commands, and then run the integration tests:

+
+% make
+.
+.
+.
+% go clean -testcache
+% go test -race -v ./integrationtests
+

+

Improved code

+

Not that the code quality of DTail has been bad (I have been using Go vet and Go lint for previous releases and will keep using these), but this time I had new tools (such as SonarQube and BlackDuck) in my arsenal to:

+
    +
  • Reduce the complexity of a couple of functions (splitting code up into several smaller functions)
  • +
  • Avoid repeating code (this version of DTail doesn't use Go generics yet, though).
  • +
+

Other than that, a lot of other code has been refactored as I saw fit.

+

Use of memory pools

+

DTail makes excessive use of string builder and byte buffer objects. For performance reasons, those are now re-used from memory pools.

+

What's next

+

DTail 5 won't be released any time soon I guess, but some 4.x.y releases will follow this year fore sure. I can think of:

+
    +
  • New (but backwards compatible) features which don't require a new major version bump (some features have been requested at work internally).
  • +
  • Even more improved documentation.
  • +
  • Dependency updates.
  • +
+

I use usually DTail at work, but I have recently installed it on my personal OpenBSD machines too. I might write a small tutorial here (and I might also add the rc scripts as examples to one of the next DTail releases).

+

I am a bit busy at the moment with two other pet projects of mine (one internal work-project, and one personal one, the latter you will read about in the next couple of months). If you have ideas (or even a patch), then please don't hesitate to contact me (either via E-Mail or a request at GitHub).

+

Thanks!

+

Paul

+

E-Mail your comments to hi@paul.cyou :-)

+
+
+
+ + Computer operating systems I use(d) + + gemini://foo.zone/gemfeed/2022-02-04-computer-operating-systems-i-use.gmi + 2022-02-04T09:58:22+00:00 + + Paul Buetow + hi@paul.cyou + + This is a list of Operating Systems I currently use. This list is in no particular order and also will be updated over time. The very first operating system I used was MS-DOS (mainly for games) and the very first Unix like operating system I used was SuSE Linux 5.3. My first smartphone OS was Symbian on a clunky Sony Ericsson device. + +
+

Computer operating systems I use(d)

+

Published at 2022-02-04T09:58:22+00:00; Updated at 2022-02-18

+
+              /(        )`
+              \ \___   / |
+              /- _  `-/  '
+             (/\/ \ \   /\
+             / /   | `    \
+             O O   ) /    |
+             `-^--'`<     '
+            (_.)  _  )   /
+             `.___/`    /
+               `-----' /
+  <----.     __ / __   \
+  <----|====O)))==) \) /====
+  <----'    `--' `.__,' \
+               |        |
+                \       /
+           ______( (_  / \______
+  (FL)   ,'  ,-----'   |        \
+         `--{__________)        \/   "Berkeley Unix Daemon"
+

+

This is a list of Operating Systems I currently use. This list is in no particular order and also will be updated over time. The very first operating system I used was MS-DOS (mainly for games) and the very first Unix like operating system I used was SuSE Linux 5.3. My first smartphone OS was Symbian on a clunky Sony Ericsson device.

+

Fedora Linux

+

Fedora Linux is the operating system I use on my primary (personal) laptop. It's a ThinkPad X1 Carbon Gen. 9. Lenovo which comes along with official Lenovo Linux support. I already noticed hardware firmware updates being installed directly through Fedora from Lenovo. Fedora is a real powerhouse, cutting-edge and reasonably stable at the same time. It's baked by Red Hat.

+

I also use Fedora on my Microsoft Surface Go 2 convertible tablet. Fedora works quite OK (and much better than Windows) on this device. It's also the perfect travel companion.

+

I use the GNOME Desktop on my Fedora boxes. I have memorized and customized a bunch of keyboard shortcuts. But the fact that I mostly work in the terminal (with tmux) makes the Desktop environment I use only secondary.

+

EndeavourOS

+

I installed EndeavourOS on my (older) ThinkPad X240 to try out an Arch based Linux distribution. I also could have installed plain Arch, but I don't see the point when there is EndeavourOS. EndeavourOS is as close as you can get to the plain Arch experience but with an easy installer. I am not saying that it's difficult to install plain Arch but it's, unless you are new to Linux and want to learn about the installation procedure, just waste of time in my humble opinion. Give Linux From Scratch a shot instead if you really want to learn about Linux.

+https://www.linuxfromscratch.org/
+

On EndeavourOS, I use the Xfce desktop environment which feels very snappy and fast on the X240 (which I purchased back in 2014). Usually, I have my X240 standing right next to my work laptop and use it for playing music (mainly online radio streams), for personal note taking and occasional emailing and instant messaging.

+

As this is a rolling Linux distribution there are a lot of software updates coming through every day. Sometimes, it only takes a minute until the next version of a package is available. Honestly, I find that a bit annoying to constantly catch up with all the updates. As for now I will live with it and/or automate it a bit more. It'll be OK if it breaks occasionally, as this is not my primary laptop anyway.

+

Arch Linux and EndeavourOS are community distributions. This means, that there is no big corporation in the backyard lurking around. They won't give you the firmware updates for cutting edge hardware out of the box, though, but they are still a very good choice for hobbyist and also for older hardware where future firmware updates are less likely to happen.

+

I am very happy with the package availability through the official repository and AUR.

+https://endeavouros.com/
+

FreeBSD

+

I have run FreeBSD in many occasions. Right after SuSE Linux, FreeBSD (around 4.x) was the second open source system I used in my life on regular basis. I didn't even go to university yet then I started using it :-). Also, a former employer of mine even allowed me to install FreeBSD on my main workstation (which I actually did and used it for a couple of years).

+

I remember it used to be a pain bootstrapping Java for FreeBSD due to the lack of pre-compiled binary packages. You had first to enable the Linux compatibility layer, then install Linux Java, and then compile FreeBSD Java with the bootstrapped Linux Java (yes, Java is mainly programmed in C++, but for some reason compiling Java for FreeBSD also required an installation of Java). Nowadays, there are ready OpenJDK binary packages you could install. So things have improved a lot since.

+

FreeBSD always had a place somewhere in my life:

+
    +
  • On a Desktop PC (personal and work)
  • +
  • On a Laptop
  • +
  • On a webserver, FTP server, DNS server, mail server
  • +
  • On a server offering FreeBSD jails to customers for rent
  • +
  • As an experiment running Debian GNU/kFreeBSD inside of jails
  • +
+

Debian GNU/kFreeBSD is now dead (same is my experiment)...

+https://www.debian.org/ports/kfreebsd-gnu/
+

...but I still have saved and old uname output :-):

+
+[root@saturn /usr/jail/serv14/etc] # jexec 21 bash
+root@rhea:/ # uname -a
+GNU/kFreeBSD rhea.buetow.org 8.0-RELEASE-p5 FreeBSD 8.0-RELEASE-p5 #2: Sat Nov 27 13:10:09 CET
+  2010 root@saturn.buetow.org:/usr/obj/usr/srcs/freebsd.src8/src/sys/SERV10 x86 64 amd64 Intel(R)
+  Core(TM) i7 CPU 920 @ 2.67GHz GNU/kFreeBSD
+

+

Currently, I use FreeBSD on my personal NAS server. The server is a regular PC with a bunch of hard drives and a ZFS RAIDZ (with 4x2TB drives) + a couple of external backup drives.

+https://www.FreeBSD.org
+

CentOS 7

+

While CentOS 8 is already out of support, I still use CentOS 7 (which will receive security updates until 2024). CentOS 7 runs in a cloud VM and is the home to my personal NextCloud and Wallabag installations. You probably know already NextCloud. About Wallabag: It is a great free and open source alternative to Pocket (for reading articles from the web offline later). Yes, you can pay for a Wallabag subscription, but you can also host it for free on your own server.

+NextCloud
+Wallabag
+

The reason I use Linux and not *BSD at the moment for these services is Docker. With Docker, it's so easy-peasy to get these up and running. I will have to switch to another OS before CentOS 7 runs out of support, though. It might be CentOS Stream, Rocky Linux, or, more likely, I will use FreeBSD. On FreeBSD there isn't Docker, but what can be done is to create a self-contained Jail for each of the web-apps.

+

I have been using FreeBSD Jails for LAMP stacks before I started using CentOS. The reason why I switched to CentOS (it was still CentOS 6 at that time) in the first place was, that I wanted to try out something new.

+https://www.centos.org
+

OpenBSD

+

I use two small OpenBSD "cloud" boxes for my "public facing internet front-ends". The services I run here are:

+
    +
  • HTTP server (serving this site via https://foo.zone)
  • +
  • Gemini server (serving this site via gemini://foo.zone)
  • +
  • MTA server (for receiving E-Mails to my hosts)
  • +
  • Authorative DNS server (for all of my "domains")
  • +
  • Some personal/private git repositories (accessible only via SSH)
  • +
+

OpenBSD is a complete operating system. I love it due to it's "simplicity" and "correctness" and the good documentation (I love the manual pages in particular). OpenBSD is also known for its innovations in security. I must admin, though, that most Unix like operating system would be secure enough for my personal needs and that I don't really need to use OpenBSD here. But nevertheless, I think it's the ideal operating system for what I am using it for.

+

The only softwares which were not part of the base system and I had to install additionally were the Gemini server (vger) and Git, which both were available as pre-compiled OpenBSD binary packages. So, besides of these two packages, it is indeed a pretty complete operating system for my use case.

+https://www.openbsd.org
+

macOS (proprietary)

+

I have to use a MacBook Pro with macOS for work. What else can I say but that this would have never been my personal choice. At least macOS is a UNIX under the hood and comes with a decent terminal and there are plenty of terminal apps available via Brew. Some of the inner workings of macOS were actually forked from the FreeBSD project.

+developer.apple.com: BSD in macOS/Darwin
+

I find the macOS UI rather confusing.

+

LineageOS (mobile)

+

At some point I got fed up with big tech, like Google and Samsung (or Apple, but personally I don't use Apple), spying on me. So I purchased a Google phone (a midrange Pixel phone) and installed LineageOS, a free and open source distribution of Android, on it. I don't have anything from Google installed on it (not even the play store, I install my apps from F-Droid). It's my daily driver since mid 2021 now.

+

So far the experience is not great but good. The main culprits are not having Google Maps, Google Gboard and the camera app. The latter lacks some features on LineageOS (e.g. No wide angle lens support). Also, I can't use my banking apps anymore. Sometimes apps crash for no apparent reason(s) but I get around it so far. I shouldn't spend so much time on my smartphone anyway! And the whole point of switching to LineageOS was to get away of big tech and therefore I should not complain :-). What I do like is that 95% the things I used to do on a proprietary mobile phone also can be done with LineageOS.

+Read also "The Midle Way" section of this blog post regarding smartphones.
+

There's also the excellent Termux app in the F-Droid store, which transforms the phone into a small Linux handheld device. I am able to run all of my Linux/Unix terminal apps with it.

+https://lineageos.org/
+https://termux.com/
+

Samsung's Stock Android (mobile proprietary)

+

Unfortunatley, I still have to keep my proprietary Android phone around. Sometimes, I really need to use some proprietary apps which are only available form the Google play store and also require the Google services installed on the phone. I don't carry this phone around all the time and I only use it intentionally for very specific use cases. I think this is the best compromise I can make.

+

iOS (mobile proprietary)

+

I have to use an iPhone for work. I like the hardware but I hate the OS (you can also call it spyOS), but it's the necessarries evil, unfortunately. Apple is even worse than Google here (despite claiming for themselves to produce the most secure phone(s)). I don't have it with me all the time or switched off when I don't need it. I also find iOS quite unintuitive to use.

+

Being on-call for work means to to be reachable 24/7. This implies that the phone is carried around all the time (in an switched-on state). 1984 is now.

+https://en.wikipedia.org/wiki/Nineteen_Eighty-Four
+

Other OSes

+

InfinyTime (smartwatch)

+

I use it on my PineTime smartwatch. Other than checking the time and my step count, I really don't do anything else fancy with it (yet).

+https://www.pine64.org/pinetime/
+https://infinitime.io/
+

motionEyeOS

+

I usually install an army of RaspberryPi 3's in my house before I travel for a prolonged amount of time. All Pi's are equipped with an camera and have motionEyeOS (Linux based video surveillance system) installed. There's a neat Android app in the F-Droid store which let's me keep an eye on everything. I make the Pi's accessible from the internet via reverse SSH tunnels through one of my frontend servers.

+https://github.com/ccrisan/motioneyeos
+

Kobo OS (proprietary)

+

I use a Kobo Forma as my e-reader device. I have started to switch off the Wifi and to only sideload DRM free ePubs on it. Even offline, it's a fully capable reader device. I wouldn't like the Kobo to call home to Rakuten. I would love to replace it one day with an open source e-reader alternative like the PineNote. There are also some interesting attempts installing postmarketOS Linux on Kobo devices. The latter boots already, but is far from being usable as a normal e-reader.

+The PineNote
+Kobo Clara HD becomes an e-ink Linux tablet
+

But as a fall-back, someone could still use the good old dead tree format!

+

Android TV (proprietary)

+

An Android TV box is used for watching movies and series on Netflix and Amazon Prime video (yes, I am human too and rely once in a while on big tech streaming services). The Android TV box is currently in the process of being replaced by OSMC, though. Most services seem to work fine with OSMC, but didn't get around tinkering with Netflix and Amazon there yet.

+https://osmc.tv/
+

Other OSes..

+

This section is just for the sake of having a complete list of all OSes I used for some significant amount of time. I might not use all of them any more...

+

NetBSD

+

I have been using NetBSD on an old Sun Sparcstation 10 as a student. I also have run NetBSD on a very old ThinkPad with 96MB!!! of RAM (even with X/evilWM). I also installed (but never really used) NetBSD on an HP Jornada 680. But that's all more than 10 years ago. I haven't looked at NetBSD for long time. I want to revive it on an "old" ThinkPad T450 of mine which I currently don't use.

+https://netbsd.org
+

Other OSes in use...

+SailfishOS - Nice mobile OS, but unfortunately includes proprietary components
+Red Hat Enterprose Linux - Only for some work stuff
+

Other OSes not used any more...

+SuSE Linux 5.3 - The first Linux OS I used
+SGI's IRIX - On a SGI Onyx 3200
+MeeGo - On a Nokia N9
+Microsoft Windows
+Microsoft DOS - With and without Windows 3.x
+Symbian - The first smartphone OS I used
+WearOS - On a Google smartwatch
+Debian GNU/Linux - Rock solid, but atm. I prefer Fedora/EndeavourOS
+Ubuntu Linux (based on Debian)
+Linux from scratch - The best way to learn Linux
+SUSE Linux Enterprise - Only for some work stuff
+

Other OSes I only had a glance at...

+OpenSolaris - Continuation of the open source version of Solaris
+