Threads for jks

  1. 11

    Great that threads were added. A shame that they are slack-threads and not zulip/email/reddit -threads

    1. 2

      I haven’t used Slack in years, what is the difference between their threading model and others?

      1. 4

        IIUC, Slack threads branch only from a top-level message in a channel. Subthreads aren’t really a thing.

        1. 3

          I haven’t tried Matrix/Element threads but I too prefer Zulip’s threading model to Slack’s.

          You can reply to a Slack message in a thread, and the replies will be hidden from the main channel - the original message will have an extra line saying “10 replies” which you can click to view the thread in a sidebar. If you reply to a thread (or specifically subscribe to it) you get notifications for new replies, otherwise the thread is pretty much invisible once the original message scrolls out of view. I’m on some channels where people try to keep all conversations in threads, but the natural thing to do is to simply reply in the channel. If you want to add to a specific discussion once the main conversation has moved to another topic, you can either reply in a thread (and no-one will notice) or reply in the main channel (which means you are trying to change the subject back).

          In Zulip, all messages in a channel (called a “stream”) belong to threads (“topics”) but the messages are also shown in the stream, ordered by time. Topics have names, kind of like email subject lines, and they are visible in a side bar with separate unread counts. You can click on a message to zoom into that topic. If you accidentally attach a message to a wrong topic, you can move it to another one.

        2. 1

          I believe the decision stems from how the conversation is conceptualized to be represented in the chat thread.

          Slack (and now element) conceptualize the threads to be “secondary” to the main conversation. Maybe you want to reply to an older message after the main thread has moved on or you have a one off comment to a message that doesn’t need to break up the main conversation. In this model, there is a 1:1 relationship between the channel topic and the conversation within. Threads give the option to branch off from this in a somewhat clunky way.

          Zulip takes a different approach in conceptualizing conversations and threads. In their model, each conversation revolves around a topic (within a channel). This way to organize conversations is more akin to how mailing lists or forums organize content. This breaks up conversations into subtopic containers.

          Both approaches have merits and drawbacks. But the main difference stems from wanting to model in the chat platform a “water cooler” conversation vs a billeting board.

        1. 24

          Then there’s a whole different help document in the man file.

          1. 19

            Sometimes --help opens a pager with the man file.

            Then there’s the GNU info system; info cat is a whole different document than man cat.

            1. 5

              “Modern” software doesn’t tend to come with a man page IME, and most of the new package managers don’t even have a mechanism for packages to provide man pages. Increasingly, documentation websites and a --help/-h/-help/help flag/subcommand is the only documentation you’ll get.

              1. 12

                I think this is because people can lie to themselves that their website is adequate documentation, but it’s harder to be equally self deluded when you have to write a text only man page. A couple exhortations and an example look so much less impressive stripped of hero graphics.

                1. 4

                  Yes. I basically agree with this trend. Man is one too many ways to do it. Everything should just support -h/--help and include a prominent URL at the top if there’s more help than can fit in there.

                  1. 26

                    I’m exactly the opposite. My first instinct is always man <command> generally because I want more info than -h/--help should provide. I always get very annoyed when a tool doesn’t come with manpages. --help isn’t sufficient imo.

                    1. 10

                      Especially when the site disappears from the web a few years later.

                      1. 1

                        I don’t want the accessibility of documentation to depend on an external program.

                        1. 1

                          I’m confused, are you referring to a web browser or man(1) here? Or both, and you’re advocating plain text docs?

                          1. 2

                            I guess both, but it was primarily aimed at man. If the program just spits out its help, you can pipe it into your favorite pager and be happy. Having a man page creates a dependency and limits to program to being installed by the system package manager.

                      2. 20

                        No, please don’t do that. I spend most of my day working on an air-gapped system and going to a URL simply isn’t straightforward. Don’t just assume people have an Internet connection. Also, the version of a man page will always match the version of the installed software.

                        It’d be better if there were usage and version commands that would be like man but output basic usage only and version details, respectively.

                        1. 4

                          There’s tldr. No idea if it works behind an air gap, but I guess you could download the database locally.

                        2. 3

                          If I had to give a one word advice on how to become a hacker, that would be “manpages”. Unix mastery of those who red manpages is a whole other level than those who think piping to grep with simple string matching isnan advance hack.

                        3. 1

                          Is there a manpage writing flow that you prefer? Every time I’ve wanted to write a manpage I’ve shied away. I usually settle with writing Markdown or HTML documentation and just shipping that instead.

                          1. 3

                            You can use pandoc to convert from Markdown to man pages. It grabs some of the details from a magic title line (search for pandoc_title_block on the page).

                            1. 1

                              I’ve done that in the past but usually end up just converting it to HTML instead. I wish there was a version of man that didn’t rely on troff/groff and didn’t use man’s somewhat baroque section system, but there’s not much else in its place. I have really enjoyed using CHM files in the past for offline documentation. For long trips without connectivity (e.g. train, plane) I’ve downloaded language and library docs in the past and chugged along on projects.

                            2. 2

                              I tend to just write mandoc directly and use the lint option of mandoc to check it (I have now started adding it to CI, so man pages get checked on commit) but LLVM uses Sphinx to generate the man pages. The Sphinx docs are a lot easier to edit than mandoc (troff macros) and seem to generate good output, but they require a separate toolchain to build the man pages so you either need that as part of your build flow or you need to commit the generated pages to your source repo.

                        1. 2

                          Emacs shows matching parentheses by default

                          It seems that show-paren-mode no longer has to be enabled?

                          If so, that’s great. I’m trying to use most tools with as many defaults as possible.

                          After 20 years on Emacs, my .emacs / init.el is very small, just a few use-package invocations.

                          I wish make-backup-files defaulted to nil or that Emacs shipped with some mode that flipped those few variables that many people alter, such as that one, to more modern defaults.

                          1. 1

                            I agree that the tilde backup files are annoying, but they have saved my ass a few times. I think they are turned off when using a version-control mode and the file is under version control.

                            1. 7

                              I used to turn them off as well, until I discovered backup-directory-alist.

                              (setq backup-directory-alist '(("." . "~/.cache/emacs/backup")))
                              

                              Now they don’t clutter my directories, but they’re still available when I need them.

                              1. 1

                                I’m not on 28 yet, but Emacs (with vc-mode, 99% defaults) does create the backup files even for files in version control for me. I’ve sort of learned to ignore them mentally.

                                1. 1

                                  In my Emacs 27.2, vc.el has this commented-out code:

                                     ;; (unless vc-make-backup-files
                                     ;;   (make-local-variable 'backup-inhibited)
                                     ;;   (setq backup-inhibited t))
                                  

                                  …with a preceding comment claiming that this is somehow wrong. I must have learned this behavior on an earlier version of Emacs where that code was still active. Now I’m using Magit and I do have backup-inhibited set in version-controlled files, so I presume Magit is doing that.

                                  1. 1

                                    I just checked on emacs -Q (27.2) and backup-inhibited is still t on my version-controlled files. A quick (rip)grep didn’t find anything relevant though, but something must be setting it, and it’s not Magit.

                              2. 1

                                I honestly expect that a lot of old…experienced Emacs users will complain about this, as with most other changes to the old defaults that’s been done.

                                But I agree, it’s great that it’s on by default now! One thing less to enable as a standard.

                                1. 10

                                  As someone whose .emacs file is older than some of my junior devs, I say attack those defaults with a chainsaw. I can fix the defaults I don’t like, but new devs can’t, so the opinions of my fellow foggies shouldn’t count when making these changes.

                                  1. 2

                                    I thought that the guiding philosophy for improvements to the out-of-box defaults is that the old settings are still available there and experienced users will know how to revert to them if they wish (whereas new users may have more trouble going the other way). And as an Emacsen user for nearly [mumble!?] years now, I’m perfectly fine with that!

                                1. 7

                                  To be fair, the corporate announcement probably being alluded to used code that looked like

                                  (reader | tee tempfile) && deploy tempfile
                                  

                                  where set -o pipefail would have helped. But I totally agree about the overall sentiment that shell scripting is full of traps and it’s hard to write and review scripts. Not even shellcheck warns about that line.

                                  1. 6

                                    The first version of the blog post did not however, it was updated after a discussion on lobste.rs with the author of the post, https://lobste.rs/s/5ldmtp/pipefail_how_missing_shell_option_slowed#c_i9kaaf

                                  1. 2

                                    On RHEL 8 has anyone made sense of the new dnf modules stuff? There is a python39 package but they don’t seem consistent with the way it is done for other modules like ruby and subversion. When I’ve attempted to upgrade to newer modules, I’ve invariably got things into a complete mess and all the necessary downstream dependencies from, e.g. EPEL end up being missing. It looks like it may work fine if you’re only hosting your own web service with clearly defined dependencies but we’ve got a hundred desktop systems running all sorts of stuff.

                                    1. 1

                                      This is my experience as well. The base OS includes Python 3.6 which works, and you can get 3.9 in a module but it’s not well integrated into the rest of the system. You could just as well run a self-compiled Python 3.9 or run your Python applications in containers.

                                    1. 10

                                      As someone who works with an EBCDIC platform, the default US EBCDIC codepage (CCSID 37, at least on i) is capable of representing accents.

                                      1. 7

                                        According to the bank’s lawyer accents weren’t possible in 1995, when the system put in service, and that they “have been added since”. In 1995 it was “technically impossible to use accents”.

                                        A quick search however reveals that e.g. codepage 01047 was published in 1991, so I’m calling bullshit. They also store names in all-caps by the way, and I’m fairly sure you could at least do lower-case letters before that. The also pull the “it’s based on punch cards!” Technically correct, but so is ASCII and by extension UTF-8. We still have the delete control character in that weird position because delete meant “punch all the holes”.

                                        I suspect they just migrated from a previous IBM system and that this is the real reason.

                                        From the article:

                                        Look, I’m not a lawyer (sorry mum!) so I’ve no idea whether this sort of ruling has any impact outside of this specific case.

                                        It sets a precedent in Belgium, not in other countries.

                                        1. 7

                                          In the mainframe/legacy world, it’s totally plausible they couldn’t update their systems to use the new codepage between ’91 and ‘95. It’s not so much about updating a table that stores the customer’s name.

                                          There are probably hundreds of tables that store the customer’s name, and thousands of data feeds and interfaces that would need to be updated: first to be aware of codepages in the first place, then to support the extended character sets.

                                          And yeah, 100% guaranteed they migrated from an older system. That’s what mainframes do.

                                          1. 5

                                            Precedents de jure do not exist in EU law. It’s a civil and not a common law system. Not even another court in Belgium is bound by this ruling. They exist de facto though, in that courts are encouraged to look at other rulings. Which means this ruling can indeed and reasonably be used to interpret the GDPR in another country.

                                            See: https://academic.oup.com/icon/article/12/3/832/763797

                                            It’s a legal corner case though and to my view, every customer would need to sue. (IANAL, etc.) So it may be feasible to just eat the cost.

                                            1. 1

                                              Mabe “precedent” isn’t exactly the right word, but previous ruling are usually considered AFAIK; there are a bunch of references to previous ones in this ruling as well. And while not entirely legally binding in the same way as in e.g. the US, this ruling does empower Belgian consumers in similar to some degree.

                                              1. 6

                                                Here’s a bit of precedent from Finland: the Parliamentary Ombudsman found in 2018 that the population register using ISO-8859-1 violated the Sami people’s rights because not all Sami names can be expressed in that encoding and it would have been possible to use Unicode. https://www.oikeusasiamies.fi/en/web/guest/-/vaestorekisterikeskus-laiminloi-saamelaisten-oikeudet

                                        1. 2

                                          What I really want is something like Python (or like Haskell, depending on the circumstances) where running shell commands is a “first-class” language construct, with ergonomic piping of stdout/stdin/files. Oil seems much-improved compared to Bash, but it (intentionally, for good reason) borrows many of the same bad design choices with regard to control flow and cryptic naming schemes.

                                          The best solution I’ve found so far is to call subprocess.run from a Python script and use string interpolation to pass arguments to the commands I want to run. But this is far from ideal.

                                          1. 8

                                            Why not Perl? It’s the obvious choice for a language where shell commands are a “first-class” language construct.

                                            1. 3

                                              Totes agreed!

                                              I find shell logic and data structures impenetrable and error prone, so I write all my “shell scripts” in Perl. It’s easy to pull shell output into Perl data structures using backticks, e.g. print the names of files in $TMPDIR iff they are directories

                                              chomp(my @out = `ls $ENV{TMPDIR}`); for (@out) { print "$_\n" if -d qq[$ENV{TMPDIR}/$_]; }
                                              

                                              For non-perl users, the backticks above mean “run this shell command”, chomp removes the newlines, qq[] means “wrap this in double quotes and handle the annoying escaping for me”, and $ENV{X} is how you access env var X, etc.

                                              The book Minimal Perl for UNIX and Linux People has a lot of information about how perl can be used to do everything on unices that awk, grep, sed, etc. can do

                                              also with Perl you get a real debugger (see also perldoc perldebtut or the book Pro Perl Debugging)

                                              1. 3

                                                I think it easily gets overlooked these days, since it is no longer hip and therefore less on the frontpage news

                                                1. 5

                                                  Apropos of “no longer hip”, tcl is a nice scripting language with a clean syntax.

                                                  1. 1

                                                    I used to mess with tcl scripts all the time in the early 2000s when I ran eggdrop irc bots. Good old days…

                                                    1. 4

                                                      Sqlite started as a tcl extension and still has a good tcl interface: https://sqlite.org/tclsqlite.html

                                                      1. -2

                                                        TIL!

                                              2. 3

                                                Depending on your use cases, have you ever tried Fish, or more on the programming side, Raku/Perl? Raku is awesome for shell-style scripting.

                                                1. 2

                                                  Hm what do you mean by control flow? I’m working on more docs so it probably isn’t entirely clear, but control flow looks like this

                                                  if test --dir $x {
                                                    echo "$x is a dir"
                                                  }
                                                  

                                                  And you can use expressions with ()

                                                  if (x > 0) {
                                                    echo "$x is positive"
                                                  }
                                                  

                                                  For loops are like bash with curly braces

                                                  for x in a b c { echo $x }  # usually written on 3 lines, being compact here
                                                  for x in *.py { echo $x }
                                                  for x in @(seq 3) { echo $x }  # explicit splitting rather than $(seq 3)
                                                  

                                                  I’m also interested in feedback on naming. Oil has long flags like test --dir instead of test -d. I am trying to get rid of all the one letter obscureness (or at least ALLOW you to avoid it if desired).


                                                  It’s accurate to describe Oil as “Python where running shell commands is first class” (and pipelines and more).

                                                  Although I would take care to call it perhaps the “David Beazley” subset of Python :) That is a prominent Python author who has been lamenting the complexity of Python.

                                                  He writes some great code with just numbers, strings, lists, dicts, and functions. Oil is like Python in that respect; it’s not like Python in the sense that it has a meta-object protocol (__iter__ and __enter__ and __zero__ and all that).

                                                  I’m interested in language feedback and if that matches your perception of Oil :) Does the code look cryptic?

                                                  1. 3

                                                    I’ve only had a cursory look at Oil, so forgive me if I have the wrong idea :). I really admire the effort, and I can really relate to what you’ve written about your motivations for creating Oil!

                                                    Oil is also aimed at people who know say Python or JavaScript, but purposely avoid shell

                                                    It seems like Oil will be great for people who spend a lot of time maintaining shell scripts and want to work with something a little more sane. However, the Oil docs impression that Oil will be just as confusing as Bash for someone like me who wants to spend as little time as possible writing / reading / maintaining shell scripts and who only finds occasion to do so once every few months. For someone like me, I wish there were some syntax-level construct in Python or Haskell for running shell commands that lets me take advantage of my existing knowledge of the language, rather than having to learn something entirely new.

                                                    I took another look at the Oil docs, and the control flow actually seems ok, even if minimal. It would be cool to see some more tools to map / flatmap / fold commands, especially when I have a bunch of parameters that are used to generate a sequence of commands.

                                                    I think the biggest improvement a new shell-scripting language can offer is an alternative syntax for specifying command-line flags. Now that I think of it, this is actually the main reason I wrap all my CLI calls in Python scripts. For instance, here are some commands I had to run at work last week:

                                                    docker run -itd --name container_name --rm -e CUDA_VISIBLE_DEVICES=0 -e API_KEY="..." -v /home/ben:/ben/ -v /data/v2/:/data image_name
                                                    
                                                    docker exec -d container_name sh -c 'mkdir -p /ben/train/train_2021-05-16_144614 && python /ben/project_name/train.py \
                                                                    --batchSize 16 --loadSize 160 \
                                                                    --alpha 1.0 \
                                                                    --annotations /data/project_name/sourceA/v3/really_long_name.txt \
                                                                    --annotations /data/project_name/sourceB/v1/really_long_name.txt \
                                                                    --annotations /data/project_name/sourceC/v4/really_long_name.txt \
                                                                    --data-path /data/project_name/images \
                                                                    --output-path /ben/train/train_2021-05-16_144614/checkpoints \
                                                                    --gpu_ids 2 \
                                                                    2>&1 > /ben/train/train_2021-05-16_144614/log_2021-05-16_144614_outer.txt'
                                                    

                                                    I actually had to run the exec command four different times with different arguments. I wrote a Python script to generate the Python command, wrap it in the docker command, and pass in all the necessary parameters with string interpolation. But to me this seems like a pretty silly to glue together different programs, when we already have familiar syntax for function calls! I would love to write instead:

                                                    var env_variables = [
                                                      CUDA_VISIBLE_DEVICES=0,
                                                      API_KEY="..."
                                                    ];
                                                    
                                                    var volumes = [
                                                      /home/ben/:/ben/,
                                                      /data/commondata/v2, /data
                                                    ];
                                                    
                                                    docker.run(
                                                      flags="interactive, tty, remove",
                                                      env=env_variables,
                                                      name="container_name",
                                                      image="image_name",
                                                      volume=volumes
                                                    );
                                                    
                                                    ...
                                                    
                                                    image_annotations=[ /data/project_name/sourceA/v3/really_long_name.txt, ... ]
                                                    
                                                    python_command=python(train.py,
                                                      batchSize=16, loadSize=160, alpha=1.0,
                                                      annotations=image_annotations,
                                                      data-path=/data/project_name/images,
                                                      output_path=...
                                                      gpu_ids=2,
                                                    )
                                                    
                                                    docker.exec(
                                                      detached=True,
                                                      container=container_name,
                                                      command=python_command
                                                    )
                                                    

                                                    This should work, automatically, for ANY command line interface, not just docker. It should work without writing any custom wrapper code. Without actually running the command, I want some kind of TypeScript-style static type-checking to know if the flag/argument I provided does not match what the CLI expects.

                                                    1. 1

                                                      Thanks this is useful feedback!

                                                      Yes I understand that Oil feels like it’s for the “shell expert” now. Because I do frame many things in terms of an upgrade path from bash, and that requires knowing bash (lots of people don’t!).

                                                      But it’s absolutely the goal for a Python/JS programmer to be able to pick up Oil with minimal shell knowledge. You have to understand argv, env, stdin/stdout/stderr, and exit code, and that’s it hopefully. Maybe file descriptors for the advanced.

                                                      I have an upcoming “Tour of Oil” doc that should help with this. It will document Oil without the legacy stuff.

                                                      It would be cool to see some more tools to map / flatmap / fold commands, especially when I have a bunch of parameters that are used to generate a sequence of commands.

                                                      Yes, great feedback, there is a pattern for this but it’s probably not apparent to newcomers. In shell map / flatmap are generally done by filtering streams of lines, and I think that pattern will help.

                                                      https://github.com/oilshell/oil/issues/943

                                                      There is also splicing of arrays, which are natural for command line args

                                                      var common = %( --detached=1 --interactive )
                                                      var args1 = %( --annotations /data/1 )
                                                      var args2 = %( --annotations /data/2 )
                                                      
                                                      # Run 2 variants of the command
                                                      docker run @common @args1
                                                      docker run @common @args2
                                                      
                                                      # Run 4 variants
                                                      for i in @(seq 4) {
                                                        docker run @common --index=$i
                                                      }
                                                      

                                                      Does that make sense as applied to your problem? You can also apply to env vars with “env”:

                                                      var env_args = %( PYTHONPATH=. FOO=bar )
                                                      env @env_args python -c 'print('hi')
                                                      

                                                      There is no static checking, but Oil’s philosophy is to give errors earlier in general. It will be possible to write your own argv validators if you like.

                                                      A useful pattern will be to define “subsets” of Docker as “procs”. As in, you can just accept the flags you use and validate them:

                                                      proc mydocker {
                                                         argparse @ARGV %OPT {   # not implemented yet
                                                            -v --verbose "Verbose flag"
                                                         }
                                                         docker @myarray
                                                      }
                                                      mydocker --oops  # syntax error
                                                      

                                                      Thanks for the feedback, let me know if that makes sense, and if you have other questions. And feel free to follow the issue on Github!

                                                  2. 1

                                                    Golang exec’s module is much better for piping in the classic shell way. You might consider that.

                                                    1. 1

                                                      The best solution I’ve found so far is to call subprocess.run from a Python script and use string interpolation to pass arguments to the commands I want to run. But this is far from ideal.

                                                      I do a similar thing. What sort of improvements can you envision?

                                                    1. 5

                                                      Awesome! I going to use this to write the RSS reader that I always visualized. I’m using Miniflux right now, but I just wish it were more information dense.

                                                      1. 6

                                                        Have you tried the reminiflux frontend? It has a more traditional three-pane layout that is quite dense.

                                                        1. 1

                                                          Woah, I didn’t know this was a thing! Neato.

                                                      1. 2

                                                        I once wondered why some Google API returned structures like {'lo': 123, 'hi': 0} instead of just the number 123, and realized that the numbers probably can grow beyond 2**53.

                                                        1. 12

                                                          One downside of using the normal Unix utilities for csv files is that handling quoted fields is complicated. If you have a comma inside a field, the field needs to be quoted.

                                                          I’ve used xsv table, and xsv includes other useful commands for csv files that you can pipe together: https://github.com/BurntSushi/xsv

                                                          1. 2

                                                            Yeah, quoting is one reason I started using TSV over CSV.

                                                            There’s an RFC that actually defines TSV not to contain tabs! So you can’t express them at all. But at least it’s consistent, unlike CSV. I have seen some really horrible things people call “CSV”, e.g. emitted by hardware!


                                                            So I have an extension planned which I’m now calling QTSV: https://github.com/oilshell/oil/wiki/TSV2-Proposal

                                                            It’s very simple in that you’re allowed to put QSN in cells: http://www.oilshell.org/release/latest/doc/qsn.html

                                                            So a QTSV file is syntactically a TSV file, and it will work fine with column, and be able to express tabs in fields.

                                                            1. 3

                                                              I wonder why tooling doesn’t emit the record separator and friends, which are specified by ASCII…

                                                              1. 2

                                                                I can think of a couple reasons:

                                                                • text editors don’t support them well. If tools don’t support them, then they might as well not exist. Imagine if text editors didn’t support the \n character to mean the end of line – would people still use it?
                                                                • ditto for terminals. It’s nice to be able to view a TSV or CSV file in a termial.
                                                                • grep doesn’t work anymore, since it’s inherently line-based.
                                                                • You still have an escaping problem. Just like TSV fields can’t contain tabs, the RS delimited files can’t have fields with RS. So it just shifts the problem around.

                                                                (QTSV doesn’t have these problems. Being able to just grep is a feature, but you could also make your own qtsv-grep, etc.)

                                                            2. 2

                                                              One downside of using the normal Unix utilities for csv files is that handling quoted fields is complicated. If you have a comma inside a field, the field needs to be quoted.

                                                              Yes, this is a classic problem. Fortunately CSV is one of formats supported by Relational pipes, so you can do e.g.

                                                              cat data.csv | relpipe-in-csv | relpipe-out-tabular | less -RSi
                                                              

                                                              and see the well-parsed CSV content. Or do some filtering or transformation using relpipe-tr-sql, relpipe-tr-awk, relpipe-tr-cut, relpipe-tr-grep, relpipe-tr-sed, relpipe-tr-scheme etc. You can also convert data from different formats to valid CSV using relpipe-out-csv.

                                                              1. 1

                                                                FWIW I’ve had relational pipes on my wiki for awhile:

                                                                https://github.com/oilshell/oil/wiki/Structured-Data-in-Oil

                                                                Although I don’t think the use of binary formats plays well with shell-like tools. Also it seems there is not a spec, e.g. how do you escape the record separator, etc.

                                                              2. 1

                                                                Any idea why we do not use escaping for commas that are not part of the field spec?

                                                                sentence, here is an escaped\, comma, and more

                                                                1. 1

                                                                  My guess is that someone had the idea to separate numeric and string fields by enclosing strings in double quotes. This is supported by a SuperCalc manual from 1983 (linked from the Wikipedia page for CSV).

                                                                  1. 1

                                                                    Quotes are also used to embed newlines into a field, so you’d need some mechanism for escaping those as well.

                                                                    1. 1

                                                                      Indeed. But I wonder if the same mechanism can be used

                                                                       sentence, here is an escaped\
                                                                       newline, and more
                                                                      
                                                                      1. 1

                                                                        Yeah, I think it could. There might be some trickiness involved in handling CRLF though.

                                                                1. 6

                                                                  A related idea: molly-guard asks you to input the hostname when you run shutdown over an ssh session.

                                                                  1. 3

                                                                    This is where the bad-keyboard MBPs are nice: they come with a retroactive four-year keyboard replacement guarantee, and because everything is glued together you don’t just get a new keyboard, you get a fresh battery and I’m sure they blow out the dust too. I’ve had the keyboard replaced twice now on my 2017 laptop, and there’s still time for one more refresh once the keys stop working.

                                                                    1. 1

                                                                      I just heard that the local Macbook repair company has been given stricter rules from Apple: apparently it used to be enough to say “the keyboard doesn’t work right”, but now you have to list the keys that aren’t working, and they’ll first try to clean them with pressurized air. There also can’t be any signs of intentional damage. I guess they suspect people have been abusing the replacement program to get new batteries.

                                                                      1. 1

                                                                        Yep, I had this repair done last week and the service report includes:

                                                                        Quote and Assessment Summary
                                                                        Verified issue reported: YES
                                                                        Symptom/s: Sticky > key
                                                                        Ran Apple diagnostic MRI: Passed
                                                                        Removed, Cleaned, and Replaced effected keycap, issue persists
                                                                        Visual inspection shows no evidence of liquid contact or corrosion
                                                                        Isolated to faulty keyboard
                                                                        Resolution: Replace Top Case
                                                                        Warranty Status: Service eligible under Apple Limited Warranty, AppleCare, and/or Australian Consumer Law.
                                                                        Quote to Repair device: $0.00 Customer Approved: Yes
                                                                        
                                                                      2. 1

                                                                        I didn’t know that, cheers!

                                                                      1. 18

                                                                        TIL. I would never expect right-click Open to do anything different to double-clicking the icon.

                                                                        1. 27

                                                                          Sometimes MacOS feels like the point-and-click adventure games of the 1990s. The way to see all the resolutions supported by an external display is to Option-click on a radio button in System Preferences.

                                                                          1. 6

                                                                            Oof, I just tried pressing Option in the Displays prefpane and a “Detect Displays” button magically appears and disappears. What else.

                                                                            1. 3

                                                                              Hold Option when clicking on “Scaled” in the resolution chooser. I think it only works on external displays.

                                                                          2. 6

                                                                            I feel like MacOS has a weird history of GUI actions being “special” in these weird ways. Reminds me a bit of how for a while Windows wasn’t great at offering good non-GUI alternatives for actions, with the added obfuscation that Apple doesn’t really need to do much for enterprise vendors relative to Microsoft

                                                                          1. 12

                                                                            I haven’t used it in production, but PostgREST uses the database-level access control features:

                                                                            PostgREST handles authentication (via JSON Web Tokens) and delegates authorization to the role information defined in the database. This ensures there is a single declarative source of truth for security. When dealing with the database the server assumes the identity of the currently authenticated user, and for the duration of the connection cannot do anything the user themselves couldn’t.

                                                                            https://github.com/PostgREST/postgrest

                                                                            1. 1

                                                                              I use it in a side project, and it’s great so far!

                                                                            1. 3

                                                                              Attending some of the JuliaCon workshops since I’ve been meaning to learn Julia and this seems like a good opportunity.