[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is perl still the No.1 language for sysadmin?



Jeffrey Walton wrote:

>> I saw many commands in /bin and /usr/bin are written by
>> perl. is perl still the first choice for sysadmin on linux?
>
> I am surprised this thread has not started a mini-flame war.

We are working on it ...

> About the best you can say is, Perl is one of the more
> popular scripting languages. Trying to pin down the "best"
> will fail because it is opinion based.

I think the true professional should be able to read/edit both
and be pretty fluent in at least one. (Here, by professional
I mean in terms of skills and dedication, not necessarily
making a living doing it.) Perl is cooler and more old-school,
maybe ultimately more powerful and creative from what you guys
say about it, but if you don't know either I think the ease of
learning it, development speed, the volume of people doing it
and available resources to help you with that online, that
favors Python as the 1st choice.

> Next, you might ask which is the best editor to use on Unix
> & Linux. That should really stir the pot :) Emacs for
> the win!

You better believe it. It is based on Lisp!

But I have respect for the Vi(m) people as well, for sure, not
sure exactly what the currently prefered Vim-style editor
implementation is? neovim?

Here are the most popular channels on Libera right now.
See arrows for editors, unless I missed someone.

Emacs (position 16) has 854, Vim (22) has 705 and neovim (41)
490. However combined Vim has 1195 which would be position 6 -
overlap not considered ...

I you like that table (the enumeration), I made it with this:

  https://dataswamp.org/~incal/emacs-init/enum.el [yanked last]

Note the `cl-loop' at line 27 - I mentioned it earlier, CL
functionality implemented in Elisp - and note especially the
"unlispy" syntax - this as someone touched upon, that in Perl
you can do the same thing in different ways - here we see
a miniature language (the unlispy syntax, which is
imperative/procedural in style, only better), replicating the
behavior of another language CL, implemented by and used
in Elisp!

Still not convinced? Okay, use Vim, really, it's cool ...

 1. #linux           2184
 2. #fedora          1696
 3. #python          1688
 4. #libera          1577
 5. #archlinux       1474
 6. #ubuntu          1146
 7. #networking      1035
 8. ##rust            968
 9. #ansible          894
10. #security         884
11. #gentoo           875
12. #bash             867
13. #git              857
14. #c                857
15. #postgresql       856
16. #emacs            854  <-- Emacs
17. #debian           843
18. ##programming     760
19. #go-nuts          718
20. #openbsd          717
21. #freebsd          714
22. #vim              705  <-- Vim
23. #thelounge        705
24. #hardware         702
25. #haskell          680
26. #wireguard        668
27. #weechat          649
28. #lobsters         623
29. #plasma-bigscreen 613 
30. ##math            609
31. #matrix           608
32. #raspberrypi      580
33. #znc              578
34. #C++              573
35. #docker           556
36. #monero           530
37. #systemd          525
38. ##electronics     510
39. #podman           499
40. ##chat            495
41. #neovim           490  <-- neovim
42. #hamradio         485

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/enum.el

(require 'cl-lib)
(require 'subr-x)

(defun enum (&optional beg end suf)
  "Enumerate each line from BEG to END, counting from one.
Use SUF as a suffix to the digits inserted.
BEG defaults to the beginning of the buffer,
END defaults to the end of the buffer,
SUF defaults to \". \""
  (interactive
   `(,@(if (use-region-p)
           (list (region-beginning) (region-end))
         (list nil nil) )
     ,(when current-prefix-arg
        (read-string "suffix: ") )))
  (or beg (setq beg (point-min)))
  (or end (setq end (point-max)))
  (or suf (setq suf ". "))
  (goto-char beg)
  (let*((lines   (count-lines beg end))
        (pad-len (length (number-to-string lines))) )
    (cl-loop
      for line from 1 to lines
      do (goto-char (line-beginning-position))
         (insert
           (format "%s%s"
                   (string-pad (number-to-string line) pad-len nil t) suf) )
         (forward-line) )))

(provide 'enum)

-- 
underground experts united
https://dataswamp.org/~incal


Reply to: