diff options
| author | Paul Buetow <paul@buetow.org> | 2022-12-10 12:55:32 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-12-10 12:55:32 +0200 |
| commit | e8985e54de3e7dcda3d5f0ea5c28d5c650af63d8 (patch) | |
| tree | fe4444543d79893ac38193c53f800bc55796ef14 | |
| parent | 8ea96fa0987e33c08c716b415c161cdd71b4d2d4 (diff) | |
| parent | 8a8e28f6268cbc46c37f26e2ea6bf0ea93d7a489 (diff) | |
merge
39 files changed, 296 insertions, 50 deletions
diff --git a/gemfeed/2008-06-26-perl-poetry.gmi b/gemfeed/2008-06-26-perl-poetry.gmi index 556ea961..40b04fff 100644 --- a/gemfeed/2008-06-26-perl-poetry.gmi +++ b/gemfeed/2008-06-26-perl-poetry.gmi @@ -1,6 +1,6 @@ # Perl Poetry -> Published by Paul at 2008-06-26, last updated at 2021-05-04 +> Published by Paul at 2008-06-26 23:43:51 CEST, last updated at 2021-05-04 ``` '\|/' * diff --git a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.gmi b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.gmi index a134cae3..3d6dbd68 100644 --- a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.gmi +++ b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.gmi @@ -1,6 +1,6 @@ # Using my Nokia N95 for fixing my MTA -> Published by Paul at 2008-12-29, last updated at 2021-12-01 +> Published by Paul at 2008-12-29 11:10:41 CEST, last updated at 2021-12-01 ``` diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.gmi b/gemfeed/2010-04-09-standard-ml-and-haskell.gmi index 294f8490..56940158 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.gmi +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.gmi @@ -1,6 +1,6 @@ # Standard ML and Haskell -> Published by Paul at 2010-04-09 +> Published by Paul at 2010-04-10 00:57:36 CEST I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already knew a little Haskell, I could not help myself, and I also implemented the same exercises in Haskell. diff --git a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.gmi b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.gmi index d342a904..b4922523 100644 --- a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.gmi +++ b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.gmi @@ -1,6 +1,6 @@ # Lazy Evaluation with Standard ML -> Published by Paul at 2010-05-07 +> Published by Paul at 2010-05-07 10:17:59 CEST ``` diff --git a/gemfeed/2010-05-09-the-fype-programming-language.gmi b/gemfeed/2010-05-09-the-fype-programming-language.gmi index a89a60e7..c9c1f250 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.gmi +++ b/gemfeed/2010-05-09-the-fype-programming-language.gmi @@ -1,6 +1,6 @@ # The Fype Programming Language -> Published by Paul at 2010-05-09, last updated at 2021-05-05 +> Published by Paul at 2010-05-09 14:48:29 CEST, last updated at 2021-05-05 ``` ____ _ __ diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.gmi b/gemfeed/2011-05-07-perl-daemon-service-framework.gmi index bd0ea3d0..dd3d9530 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.gmi +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.gmi @@ -1,6 +1,6 @@ # Perl Daemon (Service Framework) -> Published by Paul at 2011-05-07, last updated at 2021-05-07 +> Published by Paul at 2011-05-08 00:26:02 CEST, last updated at 2021-05-07 ``` a'! _,,_ a'! _,,_ a'! _,,_ diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.gmi b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.gmi index ca22592b..99ffec86 100644 --- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.gmi +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.gmi @@ -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 23:32:53 CEST, 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/2015-12-05-run-debian-on-your-phone-with-debroid.gmi b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.gmi index b07e2723..56b7a6fc 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.gmi +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.gmi @@ -1,6 +1,6 @@ # Run Debian on your phone with Debroid -> Published by Paul at 2015-12-05, last updated at 2021-05-16 +> Published by Paul at 2015-12-05 18:12:57 CEST, last updated at 2021-05-16 ``` ____ _ _ _ diff --git a/gemfeed/2016-04-03-offsite-backup-with-zfs.gmi b/gemfeed/2016-04-03-offsite-backup-with-zfs.gmi index e30fb502..67ae1241 100644 --- a/gemfeed/2016-04-03-offsite-backup-with-zfs.gmi +++ b/gemfeed/2016-04-03-offsite-backup-with-zfs.gmi @@ -1,6 +1,6 @@ # Offsite backup with ZFS -> Published by Paul at 2016-04-03 +> Published by Paul at 2016-04-04 00:43:42 GMT ``` ________________ diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi index a46fabef..9990bc7b 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi @@ -1,6 +1,6 @@ # Jails and ZFS with Puppet on FreeBSD -> Published by Paul at 2016-04-09 +> Published by Paul at 2016-04-09 20:29:47 GMT ``` __ __ diff --git a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.gmi b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.gmi index ee7af53b..aa44f81e 100644 --- a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.gmi +++ b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.gmi @@ -1,6 +1,6 @@ # Offsite backup with ZFS (Part 2) -> Published by Paul at 2016-04-16 +> Published by Paul at 2016-04-17 00:43:42 GMT ``` ________________ diff --git a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi index b94dbf28..3f998293 100644 --- a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi +++ b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi @@ -1,6 +1,6 @@ # Spinning up my own authoritative DNS servers -> Published by Paul at 2016-05-22 +> Published by Paul at 2016-05-22 20:59:01 GMT ## Background diff --git a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.gmi b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.gmi index 015843e6..7918f109 100644 --- a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.gmi +++ b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.gmi @@ -1,6 +1,6 @@ # Object oriented programming with ANSI C -> Published by Paul at 2016-11-20, updated 2022-01-29 +> Published by Paul at 2016-11-21 00:10:57 GMT, updated 2022-01-29 ``` ___ ___ ____ ____ diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi index 7aa4a5ee..1bac6007 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi @@ -1,6 +1,6 @@ # Realistic load testing with I/O Riot for Linux -> Published by Paul at 2018-06-01, last updated at 2021-05-08 +> Published by Paul at 2018-06-01 16:50:29 GMT, last updated at 2021-05-08 ``` .---. diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi index 05fe86f4..df32cf03 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi @@ -1,6 +1,6 @@ # DTail - The distributed log tail program -> Published by Paul at 2021-04-22, last updated at 2021-04-26 +> Published by Paul at 2021-04-22 21:28:41 GMT, last updated at 2021-04-26 => ./2021-04-22-dtail-the-distributed-log-tail-program/title.png DTail logo image diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi b/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi index d5210ff4..4ce84a88 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi @@ -1,6 +1,6 @@ # Welcome to the Geminispace -> Published by Paul at 2021-04-24, last updated at 2021-06-18, ASCII Art by Andy Hood +> Published by Paul at 2021-04-24 21:28:41 GMT, last updated at 2021-06-18, ASCII Art by Andy Hood Have you reached this article already via Gemini? It requires a Gemini client; web browsers such as Firefox, Chrome, Safari, etc., don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is: diff --git a/gemfeed/2021-05-16-personal-bash-coding-style-guide.gmi b/gemfeed/2021-05-16-personal-bash-coding-style-guide.gmi index 7602f295..38440c87 100644 --- a/gemfeed/2021-05-16-personal-bash-coding-style-guide.gmi +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.gmi @@ -1,6 +1,6 @@ # Personal Bash coding style guide -> Published by Paul at 2021-05-16 +> Published by Paul at 2021-05-16 16:51:57 GMT ``` .---------------------------. diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi index 4b50c98b..2b2227e7 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi +++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi @@ -1,6 +1,6 @@ # Gemtexter - One Bash script to rule it all -> Published by Paul at 2021-06-05 +> Published by Paul at 2021-06-05 21:03:32 GMT ``` o .,<>., o diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist.gmi b/gemfeed/2021-07-04-the-well-grounded-rubyist.gmi index 66fcc334..3e837e59 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist.gmi +++ b/gemfeed/2021-07-04-the-well-grounded-rubyist.gmi @@ -1,6 +1,6 @@ # The Well-Grounded Rubyist -> Published by Paul at 2021-07-04 +> Published by Paul at 2021-07-04 12:51:23 GMT When I was a Linux System Administrator, I have been programming in Perl for years. I still maintain some personal Perl programming projects (e.g. Xerl, guprecords, Loadbars). After switching jobs a couple of years ago (becoming a Site Reliability Engineer), I found Ruby (and some Python) widely used there. As I wanted to do something new, I decided to give Ruby a go. diff --git a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.gmi b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.gmi index 474d391e..5993dd65 100644 --- a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.gmi +++ b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.gmi @@ -1,6 +1,6 @@ # On being Pedantic about Open-Source -> Published by Paul at 2021-08-01 +> Published by Paul at 2021-08-01 10:37:58 GMT ``` __ diff --git a/gemfeed/2021-09-12-keep-it-simple-and-stupid.gmi b/gemfeed/2021-09-12-keep-it-simple-and-stupid.gmi index b647888c..d910bb51 100644 --- a/gemfeed/2021-09-12-keep-it-simple-and-stupid.gmi +++ b/gemfeed/2021-09-12-keep-it-simple-and-stupid.gmi @@ -1,6 +1,6 @@ # Keep it simple and stupid -> Published by Paul at 2021-09-12, last updated at 2022-04-21 +> Published by Paul at 2021-09-12 09:39:20 GMT, last updated at 2022-04-21 ``` _______________ |*\_/*|_______ diff --git a/gemfeed/2021-10-22-defensive-devops.gmi b/gemfeed/2021-10-22-defensive-devops.gmi index 42e8e033..3d0482db 100644 --- a/gemfeed/2021-10-22-defensive-devops.gmi +++ b/gemfeed/2021-10-22-defensive-devops.gmi @@ -1,6 +1,6 @@ # Defensive DevOps -> Published by Paul at 2021-10-22 +> Published by Paul at 2021-10-22 10:02:46 GMT ``` c=====e diff --git a/gemfeed/2021-11-29-bash-golf-part-1.gmi b/gemfeed/2021-11-29-bash-golf-part-1.gmi index cc2a8369..587f21ed 100644 --- a/gemfeed/2021-11-29-bash-golf-part-1.gmi +++ b/gemfeed/2021-11-29-bash-golf-part-1.gmi @@ -1,6 +1,6 @@ # Bash Golf Part 1 -> Published by Paul at 2021-11-29, last updated at 2022-01-05 +> Published by Paul at 2021-11-29 16:06:14 GMT, last updated at 2022-01-05 ``` diff --git a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.gmi b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.gmi index 0673a882..12c3dda6 100644 --- a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.gmi +++ b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.gmi @@ -1,6 +1,6 @@ # How to stay sane as a DevOps person -> Published by Paul at 2021-12-26, last updated at 2022-01-12 +> Published by Paul at 2021-12-26 14:02:02 GMT, last updated at 2022-01-12 ``` ) diff --git a/gemfeed/2022-01-01-bash-golf-part-2.gmi b/gemfeed/2022-01-01-bash-golf-part-2.gmi index b46ca3f7..f2979742 100644 --- a/gemfeed/2022-01-01-bash-golf-part-2.gmi +++ b/gemfeed/2022-01-01-bash-golf-part-2.gmi @@ -1,6 +1,6 @@ # Bash Golf Part 2 -> Published by Paul at 2022-01-01, last updated at 2022-01-05 +> Published by Paul at 2022-01-02 01:36:15 GMT, last updated at 2022-01-05 ``` diff --git a/gemfeed/2022-01-23-welcome-to-the-foo.zone.gmi b/gemfeed/2022-01-23-welcome-to-the-foo.zone.gmi index 0ed76093..96af31a4 100644 --- a/gemfeed/2022-01-23-welcome-to-the-foo.zone.gmi +++ b/gemfeed/2022-01-23-welcome-to-the-foo.zone.gmi @@ -1,6 +1,6 @@ # Welcome to the foo.zone -> Published by Paul at 2022-01-23 +> Published by Paul at 2022-01-23 18:42:04 GMT ``` __ diff --git a/gemfeed/2022-02-04-computer-operating-systems-i-use.gmi b/gemfeed/2022-02-04-computer-operating-systems-i-use.gmi index 5d6a6527..dc0c3dbb 100644 --- a/gemfeed/2022-02-04-computer-operating-systems-i-use.gmi +++ b/gemfeed/2022-02-04-computer-operating-systems-i-use.gmi @@ -1,6 +1,6 @@ # Computer operating systems I use(d) -> Published by Paul at 2022-02-04, updated 2022-02-18 +> Published by Paul at 2022-02-04 11:58:22 GMT, updated 2022-02-18 ``` /( )` diff --git a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi index 609bd255..015c01ad 100644 --- a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi +++ b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi @@ -1,6 +1,6 @@ # The release of DTail 4.0.0 -> Published by Paul at 2022-03-06 +> Published by Paul at 2022-03-06 20:11:39 GMT ``` ,_---~~~~~----._ diff --git a/gemfeed/2022-04-10-creative-universe.gmi b/gemfeed/2022-04-10-creative-universe.gmi index 01adf7fa..0c232b21 100644 --- a/gemfeed/2022-04-10-creative-universe.gmi +++ b/gemfeed/2022-04-10-creative-universe.gmi @@ -1,6 +1,6 @@ # Creative universe -> Published by Paul at 2022-04-10, last updated at 2022-04-18 +> Published by Paul at 2022-04-10 12:09:11 GMT, last updated at 2022-04-18 ``` . + . . . . . . diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi b/gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi index 95dba9a4..913ea598 100644 --- a/gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi +++ b/gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi @@ -1,16 +1,16 @@ # Perl is still a great choice -> Published by Paul at 2022-05-27, Comic source: XKCD +> Published by Paul at 2022-05-27 09:50:12 GMT, Comic source: XKCD => ./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: => ./2022-05-27-perl-is-still-a-great-choice/googletrendsperl.jpg -So why is that? Once the de-facto standard super-glue language for the web nowadays seems to have a bad repetition. Often, people state: +So why is that? Once the de-facto standard super-glue language for the web nowadays seems to have a bad reputation. Often, people state: * Perl is a write-only language. Nobody can read Perl code. * Perl? Isn't it abandoned? It's still at version 5! @@ -66,7 +66,7 @@ So it means that Perl and Raku now exist in parallel. They influence each other, => https://www.OpenBSD.org The OpenBSD Operating System => https://news.ycombinator.com/item?id=23360338 Why does OpenBSD still include Perl in its base installation? -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) reputation. => https://www.perl.com/article/announcing-perl-7/ Announcing Perl 7 => http://blogs.perl.org/users/psc/2022/05/what-happened-to-perl-7.html What happened to Perl 7? (maybe have to use "use v7;") @@ -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/ diff --git a/gemfeed/2022-06-15-sweating-the-small-stuff.gmi b/gemfeed/2022-06-15-sweating-the-small-stuff.gmi index a3d438ef..e951904d 100644 --- a/gemfeed/2022-06-15-sweating-the-small-stuff.gmi +++ b/gemfeed/2022-06-15-sweating-the-small-stuff.gmi @@ -1,6 +1,6 @@ # Sweating the small stuff - Tiny projects of mine -> Published by Paul at 2022-06-15, last updated at 2022-06-18 +> Published by Paul at 2022-06-15 10:47:44 GMT, last updated at 2022-06-18 ``` _ |
