Announcement

Collapse
No announcement yet.

GNU Shepherd 0.10.2 Service Manager Fixes Some Long-Standing Issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by gotar View Post

    Yeah, the GNU/choices are well known to be obscure (but ideologically compatible).

    Learning the entire programming language just to use and configure system - a new level of insanity. Is this some kind of compulsive disorder?

    Sorry, let me fix my myself, translating to GNU/speak:

    Learning the entire programming GNU/language just to use and configure GNU/system - a new level of GNU/correctness. Is this some kind of GNU/wake?
    GNU/Wake is when you ride a jet ski in the Lilypond.

    GNU/Woke is Stallman being fired.

    Comment


    • #12
      Originally posted by skeevy420 View Post

      That's how I feel about Scheme (never really looked into it until this). If it didn't use so many damn parentheses I'd be a lot more open towards it. For whatever reason, all those parentheses make it difficult for me to easily read it.
      I've used a lot of lisps and I admit I never got comfortable with the parentheses. The problem is that they labor the reader with additional parsing since the structure doesn't tell you anything about what you're looking at. It's why json is better than xml and why people hate the verbosity of java: There's a "usefulness ratio" of sorts in how the grammar and syntax and token work together with the rest of language (and use-cases) and all the real world lisp code bases I've seen were just a struggle to gork.

      But maybe it's just me.

      Comment


      • #13
        Woke is just an insult aimed by people on both sides of modern revolutionary thought applied to social strata other than economic status. GNU was woke by idiot modern definitions, and you could call people using woke as a derogatory term woke for their own crap logic.

        GNU's problem is its insistence on guile/scheme/lisp due to historic burdens and leadership dictates. The leadership is toxic and burdened with self-appointed literal Righteousness and thus you get a service manager with unreadable syntax.

        Look, bash isn't great but most *nix admins can look at an init script and figure it out. The same can be true for looking at a systemd unit file or even upstart. You might not know anything other than what the variable mean and the sections explain, then need a man page to fill in details.

        With this monstrosity you have to learn an entire language AND do that and then realize not one of your fellow admins has the desire to do that so you're alone managing this beast with the other two weirdos in your org (if its large enough to have two more than know guile well enough to do this.)

        One by one the GNU tools will be completely replaced by tools less burdened by its leadership, and when its done we'll be thanking GNU for the GPL and ideas, dropping a flower at the gate and slowly closing it, sad an era has come to an end but happy better things have replaced it.

        Comment


        • #14
          Originally posted by panikal View Post
          Look, bash isn't great but most *nix admins can look at an init script and figure it out. The same can be true for looking at a systemd unit file or even upstart. You might not know anything other than what the variable mean and the sections explain, then need a man page to fill in details.

          With this monstrosity you have to learn an entire language AND do that and then realize not one of your fellow admins has the desire to do that so you're alone managing this beast with the other two weirdos in your org (if its large enough to have two more than know guile well enough to do this.)
          I will be the last person to defend the FSF or GNU against stupid choices, but this doesn't look as bad as you make it sound. I'm familiar with neither Scheme nor Shepherd, but that service definition looks very understandable to me. I'd even say I like that they seem to have actual strings and arrays instead of having to deal with shell quoting madness.

          Comment


          • #15
            archkde I was a bit hyperbolic because of how esoteric most gnu tools are to use/configure, and you're right - that screenshot is about the most simple example I've seen. Here's the example from the shepard docs:
            Code:
            (let ((config (plain-file "syslogd.conf" "…")))
            (shepherd-service
            (documentation "Run the syslog daemon (syslogd).")
            (provision '(syslogd))
            (requirement '(user-processes))
            (start #~(make-forkexec-constructor
            (list #$(file-append inetutils "/libexec/syslogd")
            "--rcfile" #$config)
            #:pid-file "/var/run/syslog.pid"))
            (stop #~(make-kill-destructor))))​
            Its....readable. I have no idea what a lot of that does but I can guess. I couldn't make any change at all, but even though bash is ugly and systemd only marginally better, you can figure out pretty quickly the normal config stuff and make modifications. Systemd CAN get esoteric like this when you start to make changes to limits and preexec chains etc but most people would feel comfortable tweaking something if necessary, and most devs/admins know some bash...this is just not something I'd want to train on or train others on and have to rely on in a production environment, even if the underside is Solid.

            Edit: take a look at the *complex* examples here, where they define contact lists. https://guix.gnu.org/manual/en/html_...gurations.html
            Last edited by panikal; 18 July 2023, 01:16 PM. Reason: Added example at the end

            Comment


            • #16
              Originally posted by archkde View Post

              I'm familiar with neither Scheme nor Shepherd, but that service definition looks very understandable to me.
              Then write one. With more stanzas and logic (like other service, device or mountpoint dependencies, ordering, logging and resource thresholds, capabilities, permissions etc). With defaults being overridable by drop-ins, reliable service termination and cleanup (watch the timeouts), preparing the environment (runtime directories), security hardening (syscall filtering, various bind/overmounting), respawn rate limiting, fallbacks etc.

              And then create the second service with all of that.

              I guess you would end up writing this all over and over again in this funny language for yourself, for every service with little or no code reuse (until you'll learn to create some kind of modules or whatever there is supported, if any...).

              This example is barely readable being as trivial as possible - it's analogue to 3 lines in sh, as dumb respawning is nothing more than running service in and infinite loop. And the person who puts pidfile in /etc should be fired on spot (although they've "already" fixed the default).

              This system is backward by 15 years at least, capable of doing basically the same as "good" old SysV, just less customizable (due to the cryptic language choice).

              They could have used XML, it would be equally annoying, but at least declarative and machine parsable.

              Comment


              • #17
                Originally posted by waxhead View Post
                I am not familiar with shepperd at all but I too think the syntax seems messy and not very readable.

                Sure, this is a preference and one learned it might have many benefits for all I know, but as already proven such syntax might scare people away which may not be such a good design choice
                Lisp primary focus is not readability, but it's easier to refactor. And you should not use a very basic editor to edit such files.

                What I really like about it is that it's like containers you use on ships and trains and trucks, they have all 1 standard (s-expressions) and because they are standardized and not like before this containers became dominant you had 1000 different cargo-containers for different goods and had to transfer the goods from one container to a different when you switched from ship to a train.

                It's one container for everything you don't have to be familiar with lot's of syntax, if you want to give code meaning or make it easier to understand you actually can use documentation, that get parsed into help files.

                But refactoring is for that reason much cheaper (assuming you have good tooling like a paredit mode in one of your IDEs).

                Also the language has more better functions to make code more readable. Example instead of just if, you have also unless, and when and case and another one I just forgot so you understands what a condition does better by reading this words, so it uses more function names to make it more readable that way.
                Last edited by blackiwid; 18 July 2023, 03:01 PM.

                Comment


                • #18
                  Originally posted by c117152 View Post
                  It's why json is better than xml
                  ehm... would it be ok to start a flame war about this topic here?



                  Comment


                  • #19
                    Originally posted by panikal View Post
                    Edit: take a look at the *complex* examples here, where they define contact lists. https://guix.gnu.org/manual/en/html_...gurations.html
                    Code:
                    #$@(map ...
                    /me likes it, self-encrypting write-only language. I've grown on perl, writing things like (actual code):
                    Code:
                    @{$hosed{$objective->{'id'}}}=(-1,[],{map { $_ => $rewards->{$_} } grep $rewards->{$_}>0, keys %$rewards},'',-1,$objective->{'ts_end'});
                    This is real fun to write this, not so fun when one needs to read it a week later.
                    The great fun comes when somebody else offers to take a quick look at your code

                    No sane person would depend on this in money-generating systems though.

                    Comment


                    • #20
                      Originally posted by gotar View Post

                      Code:
                      #$@(map ...
                      /me likes it, self-encrypting write-only language. I've grown on perl, writing things like (actual code):
                      Code:
                      @{$hosed{$objective->{'id'}}}=(-1,[],{map { $_ => $rewards->{$_} } grep $rewards->{$_}>0, keys %$rewards},'',-1,$objective->{'ts_end'});
                      This is real fun to write this, not so fun when one needs to read it a week later.
                      The great fun comes when somebody else offers to take a quick look at your code

                      No sane person would depend on this in money-generating systems though.
                      "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Kernighan’s law


                      Comment

                      Working...
                      X