Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Friday February 08 2019, @05:14AM   Printer-friendly
from the it's-all-geek-to-me dept.

https://lwn.net/Articles/777595/

LWN (Linux Weekly News) provides a written account of Benno Rice's talk. The former FreeBSD core developer gives some context around systemd and what FreeBSD should learn from it. He compares the affair to a Greek tragedy which contains much suffering followed by catharsis. His attitude toward systemd is generally not negative, but I won't cherry-pick any specific sections; you'll have to actually read the article for once.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by MichaelDavidCrawford on Friday February 08 2019, @09:22AM (3 children)

    by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Friday February 08 2019, @09:22AM (#798238) Homepage Journal

    Consider such a command line as the following, which I use all the damn time:

    $ find . -name "index\.html" -exec grep -q "US-ASCII" {} \; -print

    I use such command lines as I bring all my sites into The UNICODE Reality.

    Note the backslash before the ".html". That's because the -name argument to find takes a regular expression; just "index.html" would slow the entire runtime down a bit.

    Consider what, were I - or you sorry lot - to lift but a finger:

    $ mdc_find . -fname -grep -q "US-ASCII" {} -print

    Now consider how much grep and find are run on all the boxes on the planet put together - _especially_ on mobile devices!

    It's this kind of stuff that leads me to assert that through no other means than straightforward - often trivial - code refactoring, us coders could save far far more energy than all the electrical engineers _combined_.

    Oddly, Kuro5hin's every member was so delusional as to regard _me_ as delusional for believing we could save any energy at all!

    "I'm a physicist and you're a computer scientist. Riddle me this, Batman? Why does your box have a power cord."

    Instead of systemd, we need stuff like "find -grep".

    Doubtlessly there already _is_ a "find -grep". What we so-desperately require is not systemd, but for "find -grep" to completely _replace_ what find is now.

    --
    Yes I Have No Bananas. [gofundme.com]
    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 1, Insightful) by Anonymous Coward on Friday February 08 2019, @05:47PM (1 child)

    by Anonymous Coward on Friday February 08 2019, @05:47PM (#798429)

    Sure, but that way madness lies.

    For instance, with -exec you're spawning a new process for every file found. That's woefully inefficient when many files are found. Were you to `find wherever | xargs grep search_string` you'd only invoke one grep process for every hundred or so files found (don't recall the default but it's configurable via xargs).

    Then were you to pass -F to grep to disable the regex you'd squeeze slightly more performance out of the process. Or, conversely, waste slightly less electricity running it.

    And all the machine time and electricity I've saved by dogmatically passing -F to my greps and using xargs where appropriate has probably been overshadowed by the time it took me to learn about those optimizations, type them out repeatedly (sometimes when unnecessary), and make posts like these were I to have just turned my computer off that much sooner instead.

  • (Score: 0) by Anonymous Coward on Sunday February 10 2019, @08:39AM

    by Anonymous Coward on Sunday February 10 2019, @08:39AM (#799042)

    That's because the -name argument to find takes a regular expression

    No, it does not. -name takes a shell pattern.

    Please at least learn some UNIX basics before trying to talk about whether something like systemd might be useful or not.
    Maybe even dare to read a man page or two.