summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2022-12-08 10:06:50 +0200
committerPaul Buetow <paul@buetow.org>2022-12-08 10:06:50 +0200
commit4b03ab207ea54e8064890f41b8787c07223083ee (patch)
tree429350818620db57d47c07e67d957406da5b5c03
parent12869608482ae8202efaf7e6028eac60edc086c8 (diff)
fix
-rw-r--r--gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md2
-rw-r--r--gemfeed/2022-05-27-perl-is-still-a-great-choice.md10
-rw-r--r--gemfeed/2022-09-30-after-a-bad-nights-sleep.md2
-rw-r--r--gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md4
4 files changed, 9 insertions, 9 deletions
diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
index ef30c230..b45063f9 100644
--- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
+++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
@@ -1,6 +1,6 @@
# The fibonacci.pl.raku.c Polyglot
-> Published by Paul at 2014-03-24, last updated 2022-04-23
+> Published by Paul at 2014-03-24, last updated at 2022-04-23
In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it.
diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md
index b09a7c06..d5607395 100644
--- a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md
+++ b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md
@@ -4,7 +4,7 @@
[![./2022-05-27-perl-is-still-a-great-choice/regular_expressions.png](./2022-05-27-perl-is-still-a-great-choice/regular_expressions.png)](./2022-05-27-perl-is-still-a-great-choice/regular_expressions.png)
-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 (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:
@@ -66,7 +66,7 @@ So it means that Perl and Raku now exist in parallel. They influence each other,
[The OpenBSD Operating System](https://www.OpenBSD.org)
[Why does OpenBSD still include Perl in its base installation?](https://news.ycombinator.com/item?id=23360338)
-The renaming of Perl 6 to Raku has now opened the door for a future Perl 7. As far as I understand, Perl 7 will be Perl 5 but with modern features enabled by default (e.g. pragmas "use strict; use warnings; use signatures;" and so on. Also, the hope is that a Perl 7 with modern standards will attract more beginners. There aren't many Perl jobs out there nowadays. That's mostly due to Perl's bad (bad for no real reasons) repetition.
+The renaming of Perl 6 to Raku has now opened the door for a future Perl 7. As far as I understand, Perl 7 will be Perl 5 but with modern features enabled by default (e.g. pragmas `use strict;`, `use warnings;`, `use signatures;` and so on. Also, the hope is that a Perl 7 with modern standards will attract more beginners. There aren't many Perl jobs out there nowadays. That's mostly due to Perl's bad (bad for no real reasons) repetition.
[Announcing Perl 7](https://www.perl.com/article/announcing-perl-7/)
[What happened to Perl 7? (maybe have to use "use v7;")](http://blogs.perl.org/users/psc/2022/05/what-happened-to-perl-7.html)
@@ -75,7 +75,7 @@ The renaming of Perl 6 to Raku has now opened the door for a future Perl 7. As f
Here, common sense must be applied. I don't believe there is anything like "the perfect" programming language. Everyone has got his preferred (or a set of preferred) programming language to chose from. All programming languages come with their own set of strengths and weaknesses. These are the strengths making Perl shine, and you (technically) don't need to bother to look for "better" alternatives:
-* Perl is better than Shell/awk/sed scripts. There's a point where shell scripts become fairly complex. The next step-up is to switch to Perl. There are many different versions of shells and awk and sed interpreters. Do you always know which versions (mawk, nawk, gawk, sed, gsed, ...) are currently installed? These commands aren't fully compatible to each other. However, there is only one Perl 5. Simply: Perl is faster, more powerful, more expressive than any shell script can ever be, and it is also extendible through CPAN. Perl can directly talk to databases, which shell scripts can't.
+* Perl is better than Shell/AWK/SED scripts. There's a point where shell scripts become fairly complex. The next step-up is to switch to Perl. There are many different versions of shells and AWK and SED interpreters. Do you always know which versions (`mawk`, `nawk`, `gawk`, `sed`, `gsed`, `grep`, `ggrep`...) are currently installed? These commands aren't fully compatible to each other. However, there is only one Perl 5. Simply: Perl is faster, more powerful, more expressive than any shell script can ever be, and it is also extendible through CPAN. Perl can directly talk to databases, which shell scripts can't.
* Perl code tends to be compact so that it's much better suitable for "shell scripting" and quick "one-liners" than other languages. In my own experience: Ruby and Python code tends to blow up quickly. It doesn't mean that Ruby and Python are not suitable for this task, but I think Perl does much better.
* Perl 5 has proven itself for decades and is a very stable/robust language. It is a battle-tested and mature as something can ever become.
* Perl is the reference standard for regular expressions. Even so much that there is a PCRE library (Perl Compatible Regular Expressions) used by many other languages now. Perl fully integrates regular expression syntax into the language, which doesn't feel like an odd add-on like in most other languages.
@@ -100,9 +100,9 @@ Here are some reasons why not to chose Perl and look for "better" alternatives:
## Why all the sigils? It looks like an exploding ASCII factory!!
-The sigils $ @ % & (where Perl is famously known for) serve a purpose. They seem confusing at first, but they actually make the code better readable. $scalar is a scalar variable (holding a single value), @array is an array (holding a list of values), %hash holds a list of key-value pairs and &sub is for subroutines. A given variable $ref can also hold reference to something. @$arrayref dereferences a reference to an array, %$hashref to a hash, $$scalarref to a scalar, &$subref dereferences a referene to a subroutine, etc. That can be encapsulated as deep as you want. (This paragraph only scratched the surface here of what Perl can do, and there is a lot of syntactic sugar not mentioned here).
+The sigils `$ @ % &` (where Perl is famously known for) serve a purpose. They seem confusing at first, but they actually make the code better readable. `$scalar` is a scalar variable (holding a single value), `@array` is an array (holding a list of values), %hash holds a list of key-value pairs and &sub is for subroutines. A given variable $ref can also hold reference to something. `@$arrayref` dereferences a reference to an array, `%$hashref` to a hash, `$$scalarref` to a scalar, `&$subref` dereferences a referene to a subroutine, etc. That can be encapsulated as deep as you want. (This paragraph only scratched the surface here of what Perl can do, and there is a lot of syntactic sugar not mentioned here).
-In most other programming languages, you won't know instantly what's the "basic type" of a given variable without looking at the variable declaration or the variable name (If named intelligently, e.g. a variable name containing a list of socks is "sock_list"). Even Ruby makes some use of sigils (@ @@ an $), but that's for a different purpose than in Perl (in Ruby it is about object scope, class scope and global scope). Raku uses all the sigils Perl uses plus an additional bunch of twigils, e.g. $.foo for a scalar object variable with public accessors, $!foo for a private scalar object variable, @.foo, @!foo, %.foo, %!foo and so on. Sigils (and twigils) are very convenient once you get used to them. Don't let them scare you off - they are there to help you!
+In most other programming languages, you won't know instantly what's the "basic type" of a given variable without looking at the variable declaration or the variable name (If named intelligently, e.g. a variable name containing a list of socks is "sock_list"). Even Ruby makes some use of sigils (`@ @@` and `$`), but that's for a different purpose than in Perl (in Ruby it is about object scope, class scope and global scope). Raku uses all the sigils Perl uses plus an additional bunch of twigils, e.g. `$.foo` for a scalar object variable with public accessors, $!foo for a private scalar object variable, `@.foo`, `@!foo`, `%.foo`, `%!foo` and so on. Sigils (and twigils) are very convenient once you get used to them. Don't let them scare you off - they are there to help you!
[https://www.perl.com/article/on-sigils/](https://www.perl.com/article/on-sigils/)
diff --git a/gemfeed/2022-09-30-after-a-bad-nights-sleep.md b/gemfeed/2022-09-30-after-a-bad-nights-sleep.md
index c01cdca6..3d11534c 100644
--- a/gemfeed/2022-09-30-after-a-bad-nights-sleep.md
+++ b/gemfeed/2022-09-30-after-a-bad-nights-sleep.md
@@ -1,6 +1,6 @@
# After a bad night's sleep
-> Published by Paul at 2022-09-30, last updated 2022-10-12
+> Published by Paul at 2022-09-30, last updated at 2022-10-12
```
z
diff --git a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md
index 5c4c2154..fc862744 100644
--- a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md
+++ b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md
@@ -1,6 +1,6 @@
# I tried (Doom) Emacs, but I switched back to (Neo)Vim
-> Published by Paul at 2022-11-24, last updated 2022-11-26
+> Published by Paul at 2022-11-24, last updated at 2022-11-26
```
_/ \ _(\(o
@@ -85,7 +85,7 @@ I use "Dead Tree Mode" to organize my work and notes. Dead tree? Yeah, I use an
[Zathura](https://pwmt.org/projects/zathura/)
-On the road, I also write some of my notes in Markdown format to NextCloud Notes, which is editable from my phone and via NeoVim on my computers. Markdown is much less powerful than Org-mode, but I prefer it the simple way. There's a neat terminal application, `ranger,` which I use to browse my NextCloud Notes when they are synced to a local folder on my machine. `ranger` is a file manager inspired by Vim and therefore makes use of Vim keybindings and it feels just natural to me.
+On the road, I also write some of my notes in Markdown format to NextCloud Notes, which is editable from my phone and via NeoVim on my computers. Markdown is much less powerful than Org-mode, but I prefer it the simple way. There's a neat terminal application, `ranger`, which I use to browse my NextCloud Notes when they are synced to a local folder on my machine. `ranger` is a file manager inspired by Vim and therefore makes use of Vim keybindings and it feels just natural to me.
[Ranger - A Vim inspired file manager](https://github.com/ranger/ranger)
Did I mention that I also use my `zsh` (my default shell) and my `tmux` (terminal multiplexer) in Vi-mode?