<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>shell &amp;mdash; musicmatzes blog</title>
    <link>https://beyermatthias.de/tag:shell</link>
    <description></description>
    <pubDate>Thu, 03 Dec 2026 19:08:38 +0100</pubDate>
    <item>
      <title>The annoyance of programming language tutorials - or: Why learning rust feels amazing</title>
      <link>https://beyermatthias.de/the-annoyance-of-programming-language-tutorials-or-why-learning-rust-feels</link>
      <description>&lt;![CDATA[This article is about the annoyance of programming language tutorials. First, I&#xA;will argue why learning new programming languages always feels a bit like a pain&#xA;to me. And then I will tell you why learning Rust was different.&#xA;&#xA;!-- more --&#xA;&#xA;I know a few programming languages. I&#39;ve done things in C, Ruby, Java, Python,&#xA;PHP, C++, Bash, Lisp (Racket, actually), Haskell, LaTeX, Nix, Make, Lua and&#xA;JavaScript.&#xA;&#xA;small&#xA;    *: Only a bit, but still enough to say &#34;I&#39;ve done things in this language&#34;&#xA;/small&#xA;&#xA;When I started learning programming, I learned Java and shortly after that Ruby.&#xA;Both languages have their oddities, but besides their overall concept&#xA;(imperative programming and object orientated programming) they are both rather&#xA;easy to learn.&#xA;After that I learned C. Learning C was a new world for me back then, as I&#xA;only knew object orientation. I cannot remember which resources I&#39;ve been using&#xA;learning C, though I remember it was a pain. I had a good friend helping me,&#xA;which was awesome, though I struggled a lot with the new concept.&#xA;&#xA;After learning C, I did a fair amount of PHP. Learning PHP was simple (I&#xA;actually did it in one weekend and a few thousand lines), though it again was a&#xA;pain. It was a pain because of the tutorials and resources. And that&#39;s the point&#xA;I want to discuss here.&#xA;&#xA;All other programming languages I&#39;ve been learning so far were painful to learn.&#xA;Not because of their concepts (see Haskell, functional programming at all), but&#xA;because of the resources. Haskell is a really good example here. There is&#xA;exactly one resource I enjoyed while learning Haskell, and that&#39;s&#xA;&#34;Learn you a Haskell for great good&#34;.&#xA;And why? Because it takes your hand and shows you the new world. It is good&#xA;because the concept of functional programming is new for most people reading&#xA;this resource. Learning JavaScript, Bash, Lua or Python sucks because you&#xA;already know what an object is. You know what a function or method is and you&#xA;know that the basic syntax for arithmetic is the very same as in the languages&#xA;you&#39;ve been using by now. But all tutorials expect you start from zero - which&#xA;is fine if you&#39;re actually starting from zero, but most of the time you&#39;re not.&#xA;After learning Java and Ruby I understood what OOP is (actually not after&#xA;learning Java, but after learning Ruby, because Java isn&#39;t a fully object&#xA;oriented language in my opinion).&#xA;&#xA;So, learning Haskell was kinda amazing. Learn you a Haskell is a really great&#xA;book and if you want to learn Haskell, you really should read it. But what was&#xA;even a better experience was learning Rust.&#xA;&#xA;So why is that? It is because Rust is a new concept and the old concept&#xA;(imperative programming). Learning Rust is not like learning Python after&#xA;learning Ruby. It is like Learning Haskell after learning Racket. The concept&#xA;behind the language is kinda the same, though it is different in most details.&#xA;&#xA;Plus, the Rust tutorials and resources are freakin&#39; awesome. Let me repeat that.&#xA;The tutorials and documentation of the tools, libraries and everything, the&#xA;resources on how to do things, are awesome!&#xA;&#xA;Every documentation for each library looks exactly the same, which is a huge&#xA;advantage over other languages library documentations. cargo, the Rust&#xA;build-tool builds the documentation locally for you, if you want that. So&#xA;working offline after you fetched the dependencies or your project (also via&#xA;cargo) is no hassle. Building a new project with cargo is absolutely painless,&#xA;its literally just executing a command, editing a textfile and executing another&#xA;command (setting up the project, writing down dependencies and meta information&#xA;about the project and building the project, which fetches the dependencies).&#xA;&#xA;So really, if you want to learn a new programming language, check out Rust. I&#xA;haven&#39;t even talked about its language features, and I will not, as this is not&#xA;the goal of this article. This article is about resources and tutorials. And my&#xA;conclusion is:&#xA;&#xA;All programming language tutorials suck. Except the Rust language tutorial.&#xA;tags:  #programming #open source #bash #c #c++ #haskell #nix #racket #rust #shell&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>This article is about the annoyance of programming language tutorials. First, I
will argue why learning new programming languages always feels a bit like a pain
to me. And then I will tell you why learning Rust was different.</p>



<p>I know a few programming languages. I&#39;ve done things in C, Ruby, Java, Python<em>,
PHP, C++, Bash, Lisp</em> (Racket<em>, actually), Haskell</em>, LaTeX, Nix, Make, Lua* and
JavaScript*.</p>

<p><small>
    *: Only a bit, but still enough to say “I&#39;ve done things in this language”
</small></p>

<p>When I started learning programming, I learned Java and shortly after that Ruby.
Both languages have their oddities, but besides their overall concept
(imperative programming and object orientated programming) they are both rather
easy to learn.
After that I learned C. Learning C was a new world for me back then, as I
only knew object orientation. I cannot remember which resources I&#39;ve been using
learning C, though I remember it was a pain. I had a good friend helping me,
which was awesome, though I struggled a lot with the new concept.</p>

<p>After learning C, I did a fair amount of PHP. Learning PHP was simple (I
actually did it in one weekend and a few thousand lines), though it again was a
pain. It was a pain because of the tutorials and resources. And that&#39;s the point
I want to discuss here.</p>

<p>All other programming languages I&#39;ve been learning so far were painful to learn.
Not because of their concepts (see Haskell, functional programming at all), but
because of the resources. Haskell is a really good example here. There is
exactly <em>one</em> resource I enjoyed while learning Haskell, and that&#39;s
<a href="http://learnyouahaskell.com/">“Learn you a Haskell for great good”</a>.
And why? Because it <em>takes your hand and shows you the <strong>new</strong> world</em>. It is good
because the concept of functional programming is <em>new</em> for most people reading
this resource. Learning JavaScript, Bash, Lua or Python <em>sucks</em> because you
already know what an object is. You know what a function or method is and you
know that the basic syntax for arithmetic is the very same as in the languages
you&#39;ve been using by now. But all tutorials expect you start from zero – which
is fine if you&#39;re actually starting from zero, but most of the time you&#39;re not.
After learning Java and Ruby I understood what OOP is (actually not after
learning Java, but after learning Ruby, because Java isn&#39;t a fully object
oriented language in my opinion).</p>

<p>So, learning Haskell was kinda amazing. Learn you a Haskell is a really great
book and if you want to learn Haskell, you really should read it. But what was
even a better experience was learning Rust.</p>

<p>So why is that? It is because Rust is a new concept <em>and</em> the old concept
(imperative programming). Learning Rust is not like learning Python after
learning Ruby. It is like Learning Haskell after learning Racket. The concept
behind the language is <em>kinda</em> the same, though it is different in most details.</p>

<p>Plus, the Rust tutorials and resources are freakin&#39; awesome. Let me repeat that.
The tutorials and documentation of the tools, libraries and everything, the
resources on how to do things, are <em>awesome</em>!</p>

<p>Every documentation for each library looks exactly the same, which is a <em>huge</em>
advantage over other languages library documentations. <code>cargo</code>, the Rust
build-tool builds the documentation locally for you, if you want that. So
working offline after you fetched the dependencies or your project (also via
cargo) is no hassle. Building a new project with cargo is absolutely painless,
its literally just executing a command, editing a textfile and executing another
command (setting up the project, writing down dependencies and meta information
about the project and building the project, which fetches the dependencies).</p>

<p>So really, if you want to learn a new programming language, check out Rust. I
haven&#39;t even talked about its language features, and I will not, as this is not
the goal of this article. This article is about resources and tutorials. And my
conclusion is:</p>

<p>All programming language tutorials suck. Except the Rust language tutorial.
tags:  <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a> source <a href="https://beyermatthias.de/tag:bash" class="hashtag"><span>#</span><span class="p-category">bash</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a>++ <a href="https://beyermatthias.de/tag:haskell" class="hashtag"><span>#</span><span class="p-category">haskell</span></a> <a href="https://beyermatthias.de/tag:nix" class="hashtag"><span>#</span><span class="p-category">nix</span></a> <a href="https://beyermatthias.de/tag:racket" class="hashtag"><span>#</span><span class="p-category">racket</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:shell" class="hashtag"><span>#</span><span class="p-category">shell</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/the-annoyance-of-programming-language-tutorials-or-why-learning-rust-feels</guid>
      <pubDate>Sun, 31 Jan 2016 16:37:43 +0100</pubDate>
    </item>
    <item>
      <title>rate.sh -- Port to C++</title>
      <link>https://beyermatthias.de/rate-sh-port-to-c</link>
      <description>&lt;![CDATA[Some of you might know my little project&#xA;rate. It is a bash script to collect&#xA;a database of things you want to rate.&#xA;&#xA;What this means and why I started to reimplement in C++ - read it here!&#xA;&#xA;!-- more --&#xA;&#xA;So I started to write this application because I wanted to keep track of&#xA;animes I already watched, Bands I like but do not listen to that often and so&#xA;on and so forth. What the application does is really simple: You can enter&#xA;notes about a certain thing (in your favourite text editor, which is vim for&#xA;me) and attach tags to it and put it into a category. Then you can give it a&#xA;rating. The rating can be everything, from simply numbers to text to whatever&#xA;you like. But it is supposed to be a number between 1 and 10, of course.&#xA;That&#39;s also the way I use it.&#xA;&#xA;So how does it work? Well, that&#39;s really simple: The &#34;rate&#34; script creates a&#xA;directory structure in ~/.rate/collections/, whereas a folder is a&#xA;&#34;collection&#34; of things and a file is a rating. So, I have something like&#xA;&#34;movies/animes/&#34; as collections (they are nested, of course) and then a file&#xA;for each anime I watched. The filename is generated from the title I passed&#xA;&#34;rate&#34; when creating the entry. The file also contains a &#34;header&#34;, which&#xA;includes a unique ID (which you really should not change), a list of tags, the&#xA;title (the filename is the title, too, but as on linux you shouldn&#39;t include&#xA;whitespace in file names, it is not the title as you typed it) and a rating of&#xA;course. Custom fields could be added to the header, but this feature is not&#xA;implemented yet. After the header, you can put your description.&#xA;&#xA;That&#39;s basically it. &#34;rate&#34; provides some features to search this database,&#xA;for example you can grep for text in your entries, you can view your&#xA;entries, you can list your entries and you can attach more text to your&#xA;entries or edit them. As everything is git controlled in the ~/.rate&#xA;directory, you can reset if you (or the script,...) messed up somehow.&#xA;&#xA;There&#39;s no release by now, as it lacks of some features by now. For example I&#xA;want to be able to search for entries with a certain rating or within a&#xA;certain range of ratings. I also want to be able to search for entries with aspecial set of tags or within a certain collection (I can do this, though)&#xA;special set of tags or within a certain collection (I can do this, already)!&#xA;After these things are implemented, I will release my first version, which&#xA;would be 1.0 then. And, of course, I will package it for NixOS!&#xA;&#xA;So why C++&#xA;&#xA;Well, I have to learn C++ for my praxis semester. That&#39;s basically it. I&#xA;wanted to learn a new programming language for a relatively long time, and&#xA;that&#39;s my approach on learning C++. I was able to implement some things, but&#xA;not yet to run an application. My first step would be to parse my already&#xA;existing entries. Hope that works. As I stated in the github repos README.md&#xA;file, I do not want to use any frameworks for this. No Boost, no Qt, no other&#xA;libraries. I just want to use plain C++11 (or maybe 14 in future, not sure&#xA;about this, though).&#xA;&#xA;Also, C++ gives me way more posibilities when it comes to features. I can&#xA;refactor things really easy and maybe the C++ implementation will continue to&#xA;live whereas the bash implementation will die at some point. Who knows? The&#xA;point is, the bash implementation implements a file format which is&#xA;&#xA;really simple&#xA;forward compatible&#xA;&#xA;The file actually looks like this:&#xA;&#xA;key = value&#xA;other = value&#xA;another = another&#xA;---&#xA;&#xA;text&#xA;&#xA;and that&#39;s basically it. The three dashes mark the end of the header and&#xA;everything before the header is a key = value list, whereas each line is&#xA;only allowed to contain one key-value-pair. The value can be a list of values,&#xA;for example a list of Tags whereas tags are seperated by a whitespace&#xA;character (space) or a string, such as the title is. The bash implementation&#xA;&#34;knows&#34; which key has to be which value and the C++ implementation has to know&#xA;this, too, of course. But that&#39;s it.&#xA;&#xA;The commandline interface of the application needs some work, though. Maybe it&#xA;will get some REPL-like interface later on, or maybe something more&#xA;interactive. By now, it is simply an interface where you can do one thing per&#xA;call. I have no problem with that and I&#39;m planning to keep backward&#xA;compatibility with the bash implementation even if this one is not even&#xA;released! It is fun to write such a tool and I really like doing it.&#xA;&#xA;---&#xA;&#xA;Also, it is not a that complex thing to implement and that&#39;s a huge point to&#xA;me. I don&#39;t want to spend months and months in implementing a thing which only&#xA;one or two people on this planet actually use. For bigger projects, I&#xA;contribute to open source projects. That&#39;s a better way to produce large-scale&#xA;software, IMHO.&#xA;&#xA;tags:  #bash #programming #c++ #linux #shell #vim&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Some of you might know my little project
<a href="https://github.com/matthiasbeyer/rate">rate</a>. It is a bash script to collect
a database of things you want to rate.</p>

<p>What this means and why I started to reimplement in C++ – read it here!</p>



<p>So I started to write this application because I wanted to keep track of
animes I already watched, Bands I like but do not listen to that often and so
on and so forth. What the application does is really simple: You can enter
notes about a certain thing (in your favourite text editor, which is vim for
me) and attach tags to it and put it into a category. Then you can give it a
rating. The rating can be everything, from simply numbers to text to whatever
you like. But it is supposed to be a number between 1 and 10, of course.
That&#39;s also the way I use it.</p>

<p>So how does it work? Well, that&#39;s really simple: The “rate” script creates a
directory structure in <code>~/.rate/collections/</code>, whereas a folder is a
“collection” of things and a file is a rating. So, I have something like
“movies/animes/” as collections (they are nested, of course) and then a file
for each anime I watched. The filename is generated from the title I passed
“rate” when creating the entry. The file also contains a “header”, which
includes a unique ID (which you really should not change), a list of tags, the
title (the filename is the title, too, but as on linux you shouldn&#39;t include
whitespace in file names, it is not the title as you typed it) and a rating of
course. Custom fields <em>could</em> be added to the header, but this feature is not
implemented yet. After the header, you can put your description.</p>

<p>That&#39;s basically it. “rate” provides some features to search this database,
for example you can <code>grep</code> for text in your entries, you can view your
entries, you can list your entries and you can attach more text to your
entries or edit them. As everything is git controlled in the <code>~/.rate</code>
directory, you can reset if you (or the script,...) messed up somehow.</p>

<p>There&#39;s no release by now, as it lacks of some features by now. For example I
want to be able to search for entries with a certain rating or within a
certain range of ratings. I also want to be able to search for entries with aspecial set of tags or within a certain collection (I can do this, though)
special set of tags or within a certain collection (I can do this, already)!
After these things are implemented, I will release my first version, which
would be <code>1.0</code> then. And, of course, I will package it for NixOS!</p>

<h1 id="so-why-c" id="so-why-c">So why C++</h1>

<p>Well, I have to learn C++ for my praxis semester. That&#39;s basically it. I
wanted to learn a new programming language for a relatively long time, and
that&#39;s my approach on learning C++. I was able to implement some things, but
not yet to run an application. My first step would be to parse my already
existing entries. Hope that works. As I stated in the github repos <code>README.md</code>
file, I do not want to use any frameworks for this. No Boost, no Qt, no other
libraries. I just want to use plain C++11 (or maybe 14 in future, not sure
about this, though).</p>

<p>Also, C++ gives me <em>way</em> more posibilities when it comes to features. I can
refactor things really easy and maybe the C++ implementation will continue to
live whereas the bash implementation will die at some point. Who knows? The
point is, the bash implementation implements a file format which is</p>
<ol><li>really simple</li>
<li>forward compatible</li></ol>

<p>The file actually looks like this:</p>

<pre><code class="language-text">key = value
other = value
another = another
---

&lt;text&gt;
</code></pre>

<p>and that&#39;s basically it. The three dashes mark the end of the header and
everything before the header is a <code>&lt;key&gt; = &lt;value&gt;</code> list, whereas each line is
only allowed to contain one key-value-pair. The value can be a list of values,
for example a list of Tags whereas tags are seperated by a whitespace
character (space) or a string, such as the title is. The bash implementation
“knows” which key has to be which value and the C++ implementation has to know
this, too, of course. But that&#39;s it.</p>

<p>The commandline interface of the application needs some work, though. Maybe it
will get some REPL-like interface later on, or maybe something more
interactive. By now, it is simply an interface where you can do one thing per
call. I have no problem with that and I&#39;m planning to keep backward
compatibility with the bash implementation even if this one is not even
released! It is fun to write such a tool and I really like doing it.</p>

<hr>

<p>Also, it is not a that complex thing to implement and that&#39;s a huge point to
me. I don&#39;t want to spend months and months in implementing a thing which only
one or two people on this planet actually use. For bigger projects, I
contribute to open source projects. That&#39;s a better way to produce large-scale
software, IMHO.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:bash" class="hashtag"><span>#</span><span class="p-category">bash</span></a> <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a>++ <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:shell" class="hashtag"><span>#</span><span class="p-category">shell</span></a> <a href="https://beyermatthias.de/tag:vim" class="hashtag"><span>#</span><span class="p-category">vim</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/rate-sh-port-to-c</guid>
      <pubDate>Wed, 25 Feb 2015 16:37:30 +0100</pubDate>
    </item>
    <item>
      <title>My work on diary.sh</title>
      <link>https://beyermatthias.de/my-work-on-diary-sh</link>
      <description>&lt;![CDATA[I started a&#xA;fork of a diary application&#xA;which is written in bash, because I thought there are some things missing&#xA;and some features could be added - and the repository of the original&#xA;author was really old.&#xA;&#xA;I started to pretty it up and implement some 21st-century things so it becomes&#xA;a really nice note-taking application.&#xA;&#xA;!-- more --&#xA;&#xA;So, initially the application was called &#34;diary&#34; and developed on&#xA;sourceforge, by Jamie Briggs.&#xA;Someone created a fork, named&#xA;&#34;diary-f&#34;, which added some features.&#xA;&#xA;The lastest change in the original repository is from February 2013, which is&#xA;almost two years ago by now. The last change in the repository of the fork is&#xA;from three years ago - even longer, yes!&#xA;&#xA;So, the application per se is really good one. It is just a small shell&#xA;script, but it works really good for me. Anyways, I missed some features,&#xA;namingly:&#xA;&#xA;Multiple separate entries per day&#xA;Everything should be kept in git, so I know when I edited the articles&#xA;GPG encryption everywhere&#xA;&#xA;I started implementing multi-file support directly in the &#34;diary-f&#34;&#xA;repository, but then decided to create a fork, as it won&#39;t be compatible with&#xA;the original software anymore. By now, three things are done in the&#xA;repository: I refactored the codebase to fit my coding style (well, it is&#xA;still bash, isn&#39;t it?), mutli-file support as said and git support. I want to&#xA;implement gpg support next and maybe the ability to add attachements to&#xA;entries. And after these things are implemented, I want to be able to search&#xA;the entry repository for certain entries in a simple way, which could be&#xA;difficult, given the fact that everything is encrypted in there.&#xA;&#xA;---&#xA;&#xA;If you&#39;re interested in the application, I&#39;d welcome pull requests for almost&#xA;everything. Contributing guidelines are:&#xA;&#xA;Document your work, how do things work?&#xA;KISS&#xA;DRY&#xA;&#xA;That&#39;s basically it. I&#39;m looking forward to your patches!&#xA;tags:  #bash #git #open source #programming #shell #tools&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I started a
<a href="https://github.com/matthiasbeyer/diary.sh">fork of a diary application</a>
which is written in bash, because I thought there are some things missing
and some features could be added – and the repository of the original
author was <em>really</em> old.</p>

<p>I started to pretty it up and implement some 21st-century things so it becomes
a really nice note-taking application.</p>



<p>So, initially the application was called “diary” and developed on
<a href="https://sourceforge.net/projects/diary/">sourceforge, by Jamie Briggs</a>.
<a href="https://github.com/earshinov/diary-f">Someone created a fork</a>, named
“diary-f”, which added some features.</p>

<p>The lastest change in the original repository is from February 2013, which is
almost two years ago by now. The last change in the repository of the fork is
from three years ago – even longer, yes!</p>

<p>So, the application per se is really good one. It is just a small shell
script, but it works really good for me. Anyways, I missed some features,
namingly:</p>
<ul><li>Multiple separate entries per day</li>
<li>Everything should be kept in git, so I know when I edited the articles</li>
<li>GPG encryption everywhere</li></ul>

<p>I started implementing multi-file support directly in the “diary-f”
repository, but then decided to create a fork, as it won&#39;t be compatible with
the original software anymore. By now, three things are done in the
repository: I refactored the codebase to fit my coding style (well, it is
still bash, isn&#39;t it?), mutli-file support as said and git support. I want to
implement gpg support next and maybe the ability to add attachements to
entries. And after these things are implemented, I want to be able to search
the entry repository for certain entries in a simple way, which could be
difficult, given the fact that everything is encrypted in there.</p>

<hr>

<p>If you&#39;re interested in the application, I&#39;d welcome pull requests for almost
everything. Contributing guidelines are:</p>
<ul><li>Document your work, how do things work?</li>
<li>KISS</li>
<li>DRY</li></ul>

<p>That&#39;s basically it. I&#39;m looking forward to your patches!
tags:  <a href="https://beyermatthias.de/tag:bash" class="hashtag"><span>#</span><span class="p-category">bash</span></a> <a href="https://beyermatthias.de/tag:git" class="hashtag"><span>#</span><span class="p-category">git</span></a> <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a> source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:shell" class="hashtag"><span>#</span><span class="p-category">shell</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/my-work-on-diary-sh</guid>
      <pubDate>Sat, 31 Jan 2015 16:37:29 +0100</pubDate>
    </item>
    <item>
      <title>Too much languages to choose from</title>
      <link>https://beyermatthias.de/too-much-languages-to-choose-from</link>
      <description>&lt;![CDATA[I have a problem. I want to write a small application. It should be a&#xA;commandline application, but maybe I want to extend it later with a GUI or&#xA;even a web interface. But I don&#39;t know what language to write it in.&#xA;&#xA;!-- more --&#xA;&#xA;This article could also be named &#34;Which is the right tool for the job?&#34;&#xA;&#xA;The idea is simple: I want to write a journal-application, where one can take&#xA;notes, tag them, query the journal for entries, optionally provide filters&#xA;before printing them to print only some of them and so on.&#xA;&#xA;I want to be able to encrypt them with gpg and I want to write posts to the&#xA;journal with vim. I want to be able to configure these steps, of course, so I&#xA;can use a certain key for encrypting the journal or maybe another editor (for&#xA;these emacs lovers out there).&#xA;&#xA;It should be designed to be extensible, so I can add a GUI or web interface&#xA;later on. Or maybe a tex output, so I can compile a PDF out of it or&#xA;something. Posts should be written in standard markdown, so this wouldn&#39;t be a&#xA;big deal.&#xA;&#xA;But I don&#39;t know what language to write it in. The languages which I can or&#xA;would choose from are:&#xA;&#xA;C&#xA;C++&#xA;Haskell&#xA;Rust&#xA;Java (not really...)&#xA;Scala (not really either, it&#39;s still JVM)&#xA;Ruby&#xA;Python (by extending jrnl)&#xA;Racket&#xA;Lua&#xA;Bash (I really don&#39;t want to write it in bash, but it&#39;s still a possibility)&#xA;&#xA;As you can see, the first four languages are compiled languages, then Java and&#xA;Scala are (lets call it) Semi-Compiled languages and the others are scripting&#xA;languages. All of these languages have certain advantages over others.&#xA;&#xA;The compiled languages&#xA;&#xA;... have the advantages that they are fast. Haskell and Rust also have the&#xA;advantages that if the compiler does not fail compiling the sources, the&#xA;program just works (tm).&#xA;&#xA;Also, learning C++, Haskell or Rust would be a really great experience and may&#xA;be beneficial later in a job or something.&#xA;&#xA;The semi-compiled languages are also (kind of) fast, but they are&#xA;JVM-languages, so I won&#39;t look into them here...&#xA;&#xA;The scripting languages&#xA;&#xA;Writing the application in a scripting language would have some other&#xA;advantages: They would be much more flexible and I&#39;d be faster writing the&#xA;application (compared to Rust or Haskell, which I would need to learn with the&#xA;application). I don&#39;t need to learn Ruby, I know a fair bit of Racket and I&#xA;guess I can get productive with Python or Lua really fast.&#xA;&#xA;Bash is another option and I&#39;m actually an bash script for an almost similar&#xA;job right now. I could simply extend this script, that would be an option, of&#xA;course.&#xA;&#xA;So which is the right tool for the job?&#xA;&#xA;Can you tell me? I don&#39;t know which tool is the right tool for the job. After&#xA;all, I don&#39;t think I should write such an application from scratch. So, for&#xA;me, there are two options left: Extending&#xA;jrnl, which is an Python script, or&#xA;extending diary (I do not even find a link for this anymore), which is a bash&#xA;script. Extending the bash script would be an easy job, I guess. But it&#xA;wouldn&#39;t be as flexible as the Python tool is already.&#xA;tags:  #bash #c #c++ #haskell #programming #racket #rust #shell #tools&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I have a problem. I want to write a small application. It should be a
commandline application, but maybe I want to extend it later with a GUI or
even a web interface. But I don&#39;t know what language to write it in.</p>



<p>This article could also be named “Which is the right tool for the job?”</p>

<p>The idea is simple: I want to write a journal-application, where one can take
notes, tag them, query the journal for entries, optionally provide filters
before printing them to print only some of them and so on.</p>

<p>I want to be able to encrypt them with gpg and I want to write posts to the
journal with vim. I want to be able to configure these steps, of course, so I
can use a certain key for encrypting the journal or maybe another editor (for
these emacs lovers out there).</p>

<p>It should be designed to be extensible, so I can add a GUI or web interface
later on. Or maybe a tex output, so I can compile a PDF out of it or
something. Posts should be written in standard markdown, so this wouldn&#39;t be a
big deal.</p>

<p>But I don&#39;t know what language to write it in. The languages which I can or
would choose from are:</p>
<ul><li>C</li>
<li>C++</li>
<li>Haskell</li>
<li>Rust</li>
<li>Java (not really...)</li>
<li>Scala (not really either, it&#39;s still JVM)</li>
<li>Ruby</li>
<li>Python (by extending <a href="https://maebert.github.io/jrnl/">jrnl</a>)</li>
<li>Racket</li>
<li>Lua</li>
<li>Bash (I really don&#39;t want to write it in bash, but it&#39;s still a possibility)</li></ul>

<p>As you can see, the first four languages are compiled languages, then Java and
Scala are (lets call it) Semi-Compiled languages and the others are scripting
languages. All of these languages have certain advantages over others.</p>

<h1 id="the-compiled-languages" id="the-compiled-languages">The compiled languages</h1>

<p>... have the advantages that they are <em>fast</em>. Haskell and Rust also have the
advantages that if the compiler does not fail compiling the sources, the
program just works ™.</p>

<p>Also, learning C++, Haskell or Rust would be a really great experience and may
be beneficial later in a job or something.</p>

<p>The semi-compiled languages are also (kind of) fast, but they are
JVM-languages, so I won&#39;t look into them here...</p>

<h1 id="the-scripting-languages" id="the-scripting-languages">The scripting languages</h1>

<p>Writing the application in a scripting language would have some other
advantages: They would be much more flexible and I&#39;d be faster writing the
application (compared to Rust or Haskell, which I would need to learn with the
application). I don&#39;t need to learn Ruby, I know a fair bit of Racket and I
guess I can get productive with Python or Lua really fast.</p>

<p>Bash is another option and I&#39;m actually an bash script for an almost similar
job right now. I could simply extend this script, that would be an option, of
course.</p>

<h1 id="so-which-is-the-right-tool-for-the-job" id="so-which-is-the-right-tool-for-the-job">So which is the right tool for the job?</h1>

<p>Can you tell me? I don&#39;t know which tool is the right tool for the job. After
all, I don&#39;t think I should write such an application from scratch. So, for
me, there are two options left: Extending
<a href="https://maebert.github.io/jrnl">jrnl</a>, which is an Python script, or
extending diary (I do not even find a link for this anymore), which is a bash
script. Extending the bash script would be an easy job, I guess. But it
wouldn&#39;t be as flexible as the Python tool is already.
tags:  <a href="https://beyermatthias.de/tag:bash" class="hashtag"><span>#</span><span class="p-category">bash</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a>++ <a href="https://beyermatthias.de/tag:haskell" class="hashtag"><span>#</span><span class="p-category">haskell</span></a> <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:racket" class="hashtag"><span>#</span><span class="p-category">racket</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:shell" class="hashtag"><span>#</span><span class="p-category">shell</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/too-much-languages-to-choose-from</guid>
      <pubDate>Mon, 26 Jan 2015 16:37:29 +0100</pubDate>
    </item>
    <item>
      <title>irc_dump.sh</title>
      <link>https://beyermatthias.de/irc_dump-sh</link>
      <description>&lt;![CDATA[I really like to dump my brain into irc channels. You do, too? So, meet&#xA;ircdump.&#xA;&#xA;!-- more --&#xA;&#xA;ircdump.sh (the repo) / ircdump (the script-call) is a short shell script which&#xA;dumps your text in all joined irc channels you previously joined. It uses&#xA;ii as irc tool.&#xA;&#xA;If you want to paste something, you just invoke it:&#xA;&#xA;    ircdump I like trains&#xA;&#xA;and it dumps the text directly into all available IRC channels. Of course, you&#xA;must do some setup right before!&#xA;&#xA;You have to use ii to create/join the appropriate channels. You should create&#xA;them at /tmp/ircdump or set the appropriate path right in the script. Once you&#xA;connected to a server and joined the appropriate channels, the script does&#xA;everything else for you. Note that it doesn&#39;t paste to the server channel, just&#xA;to the channels you joined.&#xA;&#xA;Use it with care! You will paste to all/em IRC channels you joined with ii.&#xA;&#xA;People gonna hate you!&#xA;&#xA;Update: There is now a repo at my github account which contains utils when&#xA;dealing with ii: irctools.sh.&#xA;&#xA;tags:  #programming #chat #irc #shell&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I really like to dump my brain into irc channels. You do, too? So, meet
<a href="https://github.com/matthiasbeyer/iitools.sh/blob/master/iidump.sh">ircdump</a>.</p>



<p>irc_dump.sh (the repo) / ircdump (the script-call) is a short shell script which
dumps your text in all joined irc channels you previously joined. It uses
<a href="tools.suckless.org/ii">ii</a> as irc tool.</p>

<p>If you want to paste something, you just invoke it:</p>

<p>    ircdump I like trains</p>

<p>and it dumps the text directly into all available IRC channels. Of course, you
must do some setup right before!</p>

<p>You have to use ii to create/join the appropriate channels. You should create
them at <code>/tmp/ircdump</code> or set the appropriate path right in the script. Once you
connected to a server and joined the appropriate channels, the script does
everything else for you. Note that it doesn&#39;t paste to the server channel, just
to the channels you joined.</p>

<p>Use it with care! You will paste to _all</em> IRC channels you joined with ii.</p>

<h2 id="people-gonna-hate-you" id="people-gonna-hate-you">People gonna hate you!</h2>

<p>Update: There is now a repo at my github account which contains utils when
dealing with ii: <a href="https://github.com/matthiasbeyer/iitools.sh">irctools.sh</a>.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:chat" class="hashtag"><span>#</span><span class="p-category">chat</span></a> <a href="https://beyermatthias.de/tag:irc" class="hashtag"><span>#</span><span class="p-category">irc</span></a> <a href="https://beyermatthias.de/tag:shell" class="hashtag"><span>#</span><span class="p-category">shell</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/irc_dump-sh</guid>
      <pubDate>Mon, 22 Sep 2014 16:42:12 +0200</pubDate>
    </item>
  </channel>
</rss>