1. 3

    I am perhaps the very last person to adopt these newfangled rust-based versions of basic shell utilities…however I recently was forced to switch from gnu rgrep to rg by a large and unruly codebase I now work on. Wish I’d switched ages ago. rg is a lot quicker (largely I think because it carefully avoids digging through irrelevant stuff like node modules).

    What other ones should I look at?

    However…I only really call this stuff from emacs, so fzf is probably not much use to be as the emacs file finder is fine as it is. For context I hate change and it would require a minor miracle for me to use a piece of software not packaged in debian

    1. 4

      What other ones should I look at?

      bat is quite great, though its fanciness can get in a way (I mean specifically the line wrapping being done both by bat and by the terminal if you’d resize it).

      fd is great for simple file search (think: find(1)) though I’m not perfectly happy with its featureset.

      exa is a fancy ls(1) replacement. No comment here, it does exactly what’s on the lid.

      However…I only really call this stuff from emacs, so fzf is probably not much use to be as the emacs file finder is fine as it is.

      fzf is what you’d call a completing-read or “completion UI” in the Emacs world. fzf only filters what it’s given, defaulting to calling find(1) internally I believe. Inside Emacs you have the likes of Selectrum for that already.

      1. 1

        exa looks wonderful. Reminds me of tweaks I did on Emacs dired to achieve similar styling https://xenodium.com/showhide-emacs-dired-details-in-style

      2. 2

        fzf is packaged in Debian as of Buster (10), and has a backport for Stretch (9).

        1. 1

          rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc. https://github.com/phiresky/ripgrep-all

        1. 2

          I had no idea about & let alone &! — this is so handy. Thanks!

          1. 3

            A shameless plug if you want more less tips: https://blog.einval.eu/2018/09/less-can-do-more/

          1. 2

            I tried to use it a few years ago. I don’t know if it still holds true but back then it felt pretty rough around the edges. To anyone finding the concept interesting but the implementation lacking: try Darcs.

            1. 29

              One thing I don’t think I’m ever going to get is how much Go does in comments. In my mind, comments are a way to communicate something to other humans, or, sometimes, a way to communicate something to some external tool (such as a documentation generator). However, in Go, you configure whether the file should be built in comments, you write C code in comments with CGo, you write shell commands for code generation in comments, and, with 1.16, you embed data into your binary using comments.

              I’m all for a kind of extensible meta language; a way to have commands in the code which the compiler proper will skip, but which official tooling might interpret. Something like a #pragma. But… in my mind, the official language toolchain shouldn’t extensively parse my comments.

              On the positive side though, I think what embed does is really cool. More languages should have a way to embed arbitrary data into the binary (without hacks).

              1. 17

                If it helps, you can consider the string //go: to be equivalent to the string #pragma and not think of it as a comment. Reusing the comment syntax has the advantage that parsers/formatters don’t have to worry about parsing anything other than comments. Much like how a shebang (#!/usr/bin/env bash) happens to be a comment in a bunch of scripting languages.

                1. 17

                  Yea, if it was only that, I wouldn’t have been too worried. However, you also have a case where a comment changes the semantics of the following import after the comment. The whole thing seems like a giant hack to me; like “changing the grammar is too much work, so we’ll just make the tooling parse your comments so we don’t have to change the compiler”. I’m not saying that’s how the process is; I’m saying that’s how it feels as an observer.

                  I would’ve probably done something like C, where lines starting with # are obviously going to be interpreted differently from other lines. The compiler could ignore all lines starting with #, so that the tooling could add new directives in a backwards-compatible way, and parsers/formatters could largely ignore them. It just would’ve been a structured thing instead of essentially parsing prose.

                  1. 10

                    The whole thing seems like a giant hack to me; like “changing the grammar is too much work, so we’ll just (…)

                    This is how I feel about imports as strings. I see no good reason why we need quotation marks around the import paths in Go, it should be obvious for a parser how to deal with a path there. In general the Go syntax is… inconsistent at best.

                    1. 3

                      I see no good reason why we need quotation marks around the import paths in Go

                      This is a guess, but it may be to make plumbing easier in Plan 9/Acme. Syntax like <something> and "something" is easier to match than just something.

                      1. 1

                        I think the comment you’re replying to is arguing that it’s not just "something" vs. something, but import "something" vs. import something.

                        1. 3

                          Yeah, I know, but multiple imports still need quotation marks to be plumbable:

                          import (
                              "path/to/package1"
                              "path/to/package2"
                          )
                          

                          works, whereas

                          import (
                              path/to/package1
                              path/to/package2
                          )
                          

                          wouldn’t.

                          1. 2

                            Not sure why that would be the case. the plumber gets the whole string either way, expanded out to the surrounding whitespace if there’s no selection.

                            1. 4

                              But the plumber has to know somehow that it is a Go import path. The quotation mark syntax in Go (and C) makes that clear.

                              For example, should test, without quotes, really be treated as a Go/C import path? Wouldn’t that be too broad a rule?

                              1. 1

                                The plumber also gets a bunch of context, like the place you plumbed from. It should use that.

                      2. 3

                        I thought the same at first, but it’s simpler for the lexer/tokenizer to not have to know what mode it’s in. It’ll (presumably) just output a STRING token, and it’s only the parser that has to know that it’s in an import directive. Go is partly about keeping parsing (and lexing) simple and fast.

                      3. 6

                        It’s not my most favourite syntax either, but using #pragma or //go: seems like a really minor issue. I’m not sure what the motivation was for choosing //go: over # or #pragma.

                        a case where a comment changes the semantics of the following import after the comment

                        I assume you mean package foo // import "bar" type comments? That one, in particular, was a mistake IMO. But also kind of obsoleted by modules, and not really related to //go: directives.

                        1. 1

                          I don’t know what package foo // import "bar" does. Could you elaborate on it?

                          I was talking mostly about CGo, where you have a giant comment with a mix of C code and #cgo pseudo-directives followed by a line with import "C", where the comment (minus the #cgo lines) is compiled by a C compiler and linked with the binary.

                          1. 3

                            It enforces that the package is imported as bar; often used for “vanity paths”; e.g. lobste.rs/mypkg instead of github.com/lobsters/mypkg. This prevents some problem where one dependency might use the lobste.rs path, and the other the github.com path. It’s a bit of a hack, and you can do the same with a go.mod file now.

                            cgo is kind of a tricky beast, yeah; but also fairly rare. And since you can write any C code in that comment, I’m also not sure how else to do it? Overall, it seems to work fairly well and in the grand scheme of things, it seems like a fairly minor issue to me.

                    2. 37

                      But it’s a great way to pretend that it’s a small language with few reserved words.

                      1. 7

                        Even with the comment syntax, Go has fewer reserved words than C.

                        1. 7

                          While I agree with your comment, it’s a non sequitur. Having fewer reserved words and being a smaller language are two different things. LISP has 0 reserved words, therefore it must be the smallest language, right?

                          1. 4

                            Go is still a small language.

                      2. 3

                        This is the long-standing rationale for not having comments in JSON, and I think it stands the test of time (and complaints of programmers).

                        1. 16

                          This was just paternalistic nonsense on Crockford’s part. While I don’t really understand the Go author’s decision to use comments for pragmas, I would never in my life give up all comments to put a stop to it. An absolute textbook example of cutting off one’s nose to spite one’s face.

                          1. 16

                            I think it makes perfect sense for JSON’s intended usage as a data interchange format with good interoperability between all sorts of different environments. Extensions have made this much harder than it needs to be on more than a few occasions in the past.

                            Now, if you want to use JSON for your config files then sure, it’s annoying. But that wasn’t the intended usage. If you’re driving a square peg through a round hole then you shouldn’t really complain about the peg shape but get a different peg instead.

                            1. 7

                              I still don’t buy it. If we’re considering the intended usage, one of the goals that gets thrown around is that it is “easy for humans to read and write” – just as long as they never need to convey something to another human being in the form of a comment!

                              There are so many other under-specified parts of JSON, like what to do with large integers, or what happens when a document contains duplicate keys. It is extremely frustrating that comments were intentionally and unnecessarily stripped out, while the hard problems were apparently just ignored.

                              1. 8

                                HTTP or SMTP are easy for humans to read and write, and don’t have comments either because in the intended usage space it’s not really needed. Like those data formats, JSON is primarily intended to send text from one program to the other, and the “easy for humans to read and write” is more as a debugging and testing aid than anything else.

                                There are so many other under-specified parts of JSON, like what to do with large integers, or what happens when a document contains duplicate keys. It is extremely frustrating that comments were intentionally and unnecessarily stripped out, while the hard problems were apparently just ignored.

                                Sure, it could be improved, maybe, but as you mention these are not easy things to define in a compatible way since different languages deal with these things in different ways. But I don’t think that’s a good reason to introduce more interoperability issues.

                        2. 2

                          The comment syntax is mainly used together with cgo. Including a header instead of inlining C makes it feel less hacky and allows for syntax highlighting of the C code for a larger range of editors: // #include "project.h".

                          1. 2

                            IIRC there was discussion of adding pragma syntax, but it was decided that it’s not worth it to add yet another syntax, since there already existed comment-based pragmas that would have to be kept because of the go 1 compat promise.

                          1. 2

                            As part of our standard toolkit, we provide each developer at Skroutz with a writable database snapshot against which she can develop.

                            I understand that historically we used to use the masculine pronouns in gender-neutral statements but this “revenge equality” of using the feminine pronouns now is silly when we have a perfectly good “they” in English.

                            What I mean… When I see “he” in such cases, I understand that it’s most likely just the old convention used unconsciously. When I see “they”, I acknowledge they use the modern convention. But when I see “she”, I see it as an unhealthy revenge for people using “he” for such a long time. Can’t we just switch to the neutral pronouns directly?

                            Disclaimer: I’m not a native speaker of English and not a speaker of Greek at all, so it may be more of a cultural thing instead.

                            1. 7

                              I generally prefer neutral pronouns, but the idea that it’s a “revenge” seems pretty weird to me.

                              More charitably, when you read ‘she’ and think ‘are they trying to make a point’, that’s a perfect opportunity to consider how others feel about the constant, far-more-widespread use of ‘he’ (Poe’s law - are people using ‘he’ making a point that mostly only men can code? Because I guarantee that’s a real opinion people express in private).

                              1. 3

                                But when I see “she”, I see it as an unhealthy revenge for people using “he” for such a long time.

                                IMO this has nothing to do with the author and a lot to do with biases.

                                Many books written 2015-onwards use he/she interchangeably in the examples. Very well known, respected practice. I try to avoid the conundrum by using a noun e.g. “the engineer <…>”.

                              1. 17

                                You can pass a List<int> to a function that wants a List<int?>.

                                It’s worth pointing out that this is not always sound. For example, this results in a runtime type error:

                                addNull(List<int?> xs) {
                                  xs.add(null);
                                }
                                
                                main() {
                                  List<int> blah = [];
                                  addNull(blah);
                                }
                                

                                Of course, it’s valid to decide that this is an acceptable price to pay. TypeScript does this (with no runtime errors since the types basically just disappear), and I guess Dart does it as well.

                                1. 8

                                  Isn’t this basically type covariance vs type contravariance? Some languages (notably Scala) allow to explicitly specify which is desirable.

                                  1. 4

                                    If the List type constructor was contravariant instead (i.e. List<int?> was a subtype of List<int>), then you would have analogous problem with the types swapped:

                                    oops(List<int> xs) {
                                      int x = xs[0];
                                      // do something with x
                                    }
                                    
                                    main() {
                                      List<int?> blah = [null];
                                      oops(blah);
                                    }
                                    

                                    So it doesn’t seem that this dichotomy is relevant here.

                                    1. 14

                                      An immutable list is covariant in its type parameter. A mutable list is invariant, neither covariant or contravariant. The proper solution is for List<A> and List<B> to be unrelated types in the sub typing relation.

                                      1. 3

                                        It is relevant. The covariance/contravariance of the type depends on whether it’s in the “input” position or the “output” position. But generally speaking, List is neither contravariant nor covariant.

                                        Kotlin gets this correct with its in and out qualifiers on generic parameters.

                                    2. 1

                                      “Valid” is a measured tradeoff between convenience and potential for errors. Because, it can cause runtime errors.

                                      function addString<a>(lst: (a | string)[]) {
                                          lst.push("oh no")
                                      }
                                      
                                      let xs: number[] = [1, 2, 3]
                                      addString(xs)
                                      
                                      // straightforward function contract, returns a number
                                      function sum(lst: number[]): number {
                                          return lst.reduce((a, b) => a + b)
                                      }
                                      
                                      console.log(sum([2, "bar"]))  // <- this produces a type error
                                      console.log(sum(xs))          // <- this doesn't, but it doesn't return a number
                                      
                                      // will this behave as it looks like it will?
                                      for (let i = 0; i <= sum(xs); i++) {
                                          console.log("hi")
                                      }
                                      

                                      The alternative is explicit variance specification, or seriously weakening subtyping relations.

                                    1. 11

                                      To me this is like voter fraud. The amount of “stupid light” software I actually encounter is statistically zero — especially relative to “stupid heavy” software, which is far more pernicious. And so efforts to stamp it out or whatever wind up catching predominately “smart light” software, and do more harm than good.

                                      1. 12

                                        I think a lot of suckless projects count as “stupid light”, or at least have major subsystems that count. The complete lack of basic config without recompilation across almost all their projects is an example.

                                        1. 3

                                          Suckless stuff is entirely opt-in, and so not really germane.

                                          1. 1

                                            Opt-in, as in you can opt to use the software or not, or what specifically do you mean?

                                            1. 1

                                              Right. “Stupid light” is a subjective classification, what’s stupid light for you might not be for me. If you find Suckless software stupid light then you wouldn’t use it, and (presumably) everyone using it doesn’t find it stupid light.

                                          2. 2

                                            The complete lack of basic config without recompilation across almost all their projects is an example.

                                            Does the actually cause a problem for anyone in the target audience for those tools? The dwm config.h is better documented and easier to read than half the other configuration file formats I have to work with. Sure, I have to type “make” after I edit the file, but that’s hardly a hardship – restarting my X environment is more annoying than typing “make”

                                            1. 5

                                              Sure, when it’s just re-configuration it isn’t much more difficult than typical configuration patterns. However when it gets to managing patch sets for features, I believe it becomes “stupid light.” Because now I must decide on which patch sets I want, ensure they work together, that I’m including them correctly, etc. That is a ton of extra work when compared to some_feature = true|false in a config.

                                              Small nit, source that’s better documented than a config isn’t an argument for using source as the config. Nothing is stopping anyone from documenting a config to the same extent.

                                              1. 2

                                                Small nit, source that’s better documented than a config isn’t an argument for using source as the config. Nothing is stopping anyone from documenting a config to the same extent.

                                                Absolutely. My point was that the header file is a perfectly fine config file, not that it was magically better documented because of that.

                                                However when it gets to managing patch sets for features, I believe it becomes “stupid light.”

                                                I don’t necessarily disagree, however I would point out that the patches for suckless projects exist to represent rejected features, not optional ones. If you’re using more than one or two at most you’re building a divergent fork, a new project, not configuring withing the scope of the original project.

                                          3. 5

                                            This comes off a bit as “the other side is worse, so what’s the problem?” I don’t think it’s “statistically zero” either; for example in the Go community sometimes people get a bit too carried away with this IMHO. The whole math.Round() saga is a somewhat famous example of this.

                                            1. 4

                                              That saga sounds interesting. Do you have a link handy for reading more?

                                              1. 4

                                                Not the OP but here’s what I’ve found: https://github.com/golang/go/issues/20100

                                          1. 3

                                            I think this is the best visualization of the Emacs undo system I’ve ever seen.

                                            1. 1
                                            1. 6

                                              A quite interesting idea. I find it quite aesthetically pleasing that this whole 3x3 block of keys gets used with AltGr now. Personally I have no issue with AltGr+{n,l,o} as my keyboard (Planck) has its AltGr in a very comfortable place but I know some keyboards—especially in laptops—have it MUCH worse and I struggle with entering Ł or Ń when I need to work with them.

                                              1. 2

                                                I am also Planck user and what I have done is to make space key behave like AltGr on hold while still working as space on tap. It makes working with Polish text much nicer.

                                                1. 1

                                                  Can you share where do you have your AltGr key? :D I just bought Planck and I set it in place where left arrow is in default layer, but it’s not ideal for me.

                                                  1. 1

                                                    Two keys to the right of the spacebar, so probably the same place as you now.

                                                    In general you can find my config here: https://github.com/vifon/qmk_firmware/blob/personal/keyboards/planck/keymaps/vifon/keymap.c

                                                    Feel free to snatch some ideas.

                                                1. 50

                                                  To whomever downvoted this as off-topic:

                                                  • It’s about cryptography, security, and privacy
                                                  • The source code examples are written in JavaScript

                                                  …so which topic is it off-?

                                                  1. 37

                                                    It’s probably an expression of political distaste for overt references to furrydom rather than an authentic opinion that this article’s content is off-topic. I think this is absolutely topical content myself, but I’ve seen plenty of articles posted that I also thought were entirely topical (some of which I posted myself), that had off-topic or other flags because they were triggering to the political sensiblities of other users.

                                                    1. 53

                                                      Just posting in support of this.

                                                      Folks, this is a nice high-effort post about implementing security, with code and references and the whole shebang. It isn’t shilling a service, it isn’t navel-gazing on politics, it isn’t even some borderline case of spamming a blog to get more views without care for the community.

                                                      Anybody who flagged this as off-topic either didn’t read the article or is a tremendous asshole.

                                                      Anyone who flagged this as spam either didn’t read the article or is a tremendous asshole.

                                                      If the reference to furries in the title rustled your jimmies, despite the site policy here being to use the original title as close as possible, and you were unable to evaluate the quality of the article on its own merits, you’re a tremendous asshole.

                                                      1. 26

                                                        I get off topic downvotes for my posts with Mara too. Some of the graybeards here really dislike furries for some reason I can’t comprehend. I hope they can find something better to do that downvote furry adjacent content. Anyways, keep up the good work!

                                                        1. 46

                                                          I’m that kind of a person, though I don’t have a gray beard. To me it’s just cringe (for lack of a better word), just like an unironic “euphoric” atheist, a gun-obssessed anarcho capitalist, a “My Little Pony” Fanboy or a western-anime otaku. I honestly don’t see what the difference is.

                                                          Any blog that tries to mix that kind of usually fringe subculture is fine by itself, people are strange, but I have my doubts how relevant it is to a general-public site like Lobsters.

                                                          That being said, I didn’t flag it, I’ll just be hiding it.

                                                          1. 16

                                                            Setting aside how cringe or not it is, we should evaluate the article on its technical merits.

                                                            1. 14

                                                              In principle, yes, but we often have discissions on the form of sites (don’t post twitter threads, avoid medium, not loading without JS, too low contrast, automatically playing videos), and interspersing a page with furry imagary is just something that some people are used to (apparently this is an american thing), and others are not.

                                                              1. 5

                                                                It’s not an American thing.

                                                                I don’t know why you think it is.

                                                                Eurofurence, Nordic Fuzz Con, and FurDU are just a few of the international furry conventions that attract thousands of attendees every year (COVID notwithstanding).

                                                                1. 16

                                                                  Honestly that comes of as saying that McDonalds isn’t an american thing, because they have joints all over the world. Have you ever wondered why we are writing in English? I think everyone knows that american culture has a kind of dominance that no other culture has, because of hollywood, TV series and media in general. It’s always the de facto standard, and almost anything that is a thing in the US has following somewhere else. That has only intensified with the internet. But if anywhere in this thread, this is the point where we would be crossing over into off-topic territory, so I’d sugest we agree to disagree.

                                                                  And regarding

                                                                  I don’t know why you think it is.

                                                                  First of all, Wikipedia says

                                                                  The furry fandom has its roots in the underground comix movement of the 1970s, a genre of comic books that depicts explicit content.[5] In 1976, a pair of cartoonists created the amateur press association Vootie, which was dedicated to animal-focused art. Many of its featured works contained adult themes, such as “Omaha” the Cat Dancer, which contained explicit sex.[6] Vootie grew a small following over the next several years, and its contributors began meeting at science fiction and comics conventions.

                                                                  So it literally comes from the US. But setting that aside, even if I didn’t know that, it’s something so inherintly american, that I would have been really suprised that something that at the same time desexualizes bestiality (by removing the inherent link) and sexualizes animals (by giving them human cues of attractivness and anatonomy) could come from anywhere else.

                                                                  Edit: Also I was curious and looked it up, “Nordic Fuzz Con” has 1499 atendees in 2020, but considering how many contries these people came from, it’s approximatly 0.000008% of the population. It’s common that when people are too online, they overestimate how large their bubble really is. “Eurofurence” with almost twice as many atendees isn’t much better of.

                                                                  1. 2

                                                                    That’s super off topic for the discussion, but I’ve recently changed my mind about “american culture”. I now feel that a significant part of it is just universal, liberal culture, and not specifically American (hamburgers, pizzas and sushi being fun gastronomical examples). This post changed the way I think about this.

                                                                  2. 2

                                                                    I don’t know why you think it is [an American thing].

                                                                    Probably due to mako’s comment, which said they “always considered it an American subculture”. I hadn’t heard of it being American before… thanks to your comment I’ll unlearn that.

                                                              2. 12

                                                                Lobsters is general public? :-)

                                                                I think you could tack on just about any group and the content would be pretty much the same. “…for punks,” “…for people with a pulse,” or whatever. I’ve no strong opinion on furries. As long as their hobbies are not hurting anybody, I’ll just file it in the “not my thing, but not hurting me” bucket and see if the rest of what they have to say is interesting or not.

                                                                1. 11

                                                                  Technology doesn’t exist in a vacuum. Practitioners, users, researchers, and creators are people whose experiences of technology will be informed by their lifestyle preferences, race, gender, queerness (or not), positionality in society, past experiences, mental health, hobbies, friends and so on.

                                                                  It’s ridiculous and downright depressing to me that anyone would consider a blog off topic because the writer chose to make their technical narrative their own. It strikes me as the kind of narrow thinking that leads the tech industry to not be a very accessible or diverse place in general.

                                                                  Divorcing technology from the real world leads to isolation and atrophy (to borrow the words of Courant). It reduces diversity, leads to moral atrophy, and systems built without empathy for users.

                                                                  And it leads to gatekeeping. Don’t do that.

                                                                  1. 8

                                                                    The cringe is a reaction of your own, not the content itself. I would avoid downvoting a post just because of my relationship to it, so I’m glad you made the same call.

                                                                    1. 11

                                                                      Lobste.rs caters to a very specific subculture that exists in the IT sector that is in itself part of a broader subculture of technology creators and maintainers. It’s just that you think your subculture is important enough to be let in and others are not.

                                                                      1. 11

                                                                        You’re right that “technology” is a subculture, but my claim is that we are perpendicular/stochastically independent to “furry culture”.

                                                                        It’s just that you think your subculture is important enough to be let in and others are not.

                                                                        I would very kindly ask you not not be this elitist about this, this is explicitly a techonology site, with no further designations. The community has it’s tendencies, this way or another, but that doesn’t change the fact that the average to something as obscure as a “furry” will be recieved with some hesitation. This isn’t anything personal, I can imagine that if I went to some “normal” site like Facebook and started talking about the need Free Software that most people would consider me crazy.

                                                                        1. 8

                                                                          It’s the exact opposite of being elitist, it’s about being inclusive. You call “technological community” a thing that is aligned to your culture and values and it’s just a very small fraction of the people that produce digital technology. You universalize it because you cannot conceive that there might be different ways than yours of producing technology together. You believe your way is THE way and you reject other ways.

                                                                    2. 11

                                                                      I don’t think it’s greybeards, rather non-Americans. I’m in the UK, London, and if there’s a furry subculture here it is so microscopic that I’m not aware of it. I’ve always considered it an American subculture, and possibly mostly silicon valley, but certainly for non-Americans I think it’s very obscure. I didn’t vote either way, and have no idea what the furry thing is about, just glimpse it once in a while.

                                                                      1. 11

                                                                        For what it’s worth, in America you don’t just see people walking around expressing as furries while they shop for groceries. Most of us have never run across the culture in person. I think it’s not that this is an American phenomenon but that online spaces are safer, so that’s where you (and we) see them.

                                                                        1. 3

                                                                          just how microscopic would it have to be for you to not be aware of it? do you keep tabs on all… culture… in London?

                                                                          1. 1

                                                                            It’s honestly not very hard.

                                                                        2. 10

                                                                          I really enjoy most of the aesthetic of your pages, and the technical content! I just don’t like the random stuff being jammed in between it. I don’t need a bunch of reading space occupied by a full color, artistic, glorified selfie 6 times. Or in the case of Mara’s first appearance, 16 times.

                                                                        3. 19

                                                                          I’m not going to flag it, but the „for furrys“ bit certainly is off topic

                                                                          1. 39

                                                                            Furry is my blog’s aesthetic and theme, and a significant chunk of the content, but the focus is 99% encryption. The parts that are furry-relevant are:

                                                                            1. A lot of tech workers are furries (or furry-adjacent).
                                                                            2. I’ve found that furries are generally more comfortable with the abstraction of “identity” from “self” than non-furries. I generally attribute this to the prevalence of roleplay in our culture. (I remarked on this detail in the post.)
                                                                            3. Implied but never stated in this particular article: Since roughly 80% of furries are LGBTQIA+, and queer folks are likely to be discriminated against in many locales, improving furry technology will likely have a net positive impact on queer privacy in oppressive societies.

                                                                            This page isn’t so much for furries than it is from a furry, published on a furry blog, and with a bad furry pun in the title.

                                                                            1. 27

                                                                              You don’t actually need to entertain anti-furry sentiment. And do not worry either, there’s also people who appreciate this. I’d rather see furries than most common traits of the modern web.

                                                                              1. 19

                                                                                A lot of tech workers are furries

                                                                                For certain values of “a lot”. I’d guess that this kind of stuff is more popular in the US than in India.

                                                                                1. 28

                                                                                  The main problem with this kind of title phrasing is the forced communication of a political/sexual/whatever message, which is off-topic for the site, and most people don’t care, and don’t want to care for it.

                                                                                  Anybody visiting the link would see that the page has a furry aesthetic. Then they would have the chance to read the article, or close the page. This way a message is promoted on the main page. I think identity politics are already too emphasized and destructive in discussions, and have a bad effect on communities and society. Consider seeing things like a Heterosexual christian father’s guide to unit testing on the front page. Without judging anybody’s identity, this is not the place and form for that topic and that kind of statements.

                                                                                  1. 15

                                                                                    I wonder why the simple reminder of a group’s existence bothers you so.

                                                                                    1. 17

                                                                                      For some reason you failed to understand my point, and are accusing me with something instead of arguing my points. Most likely this is because of my inability of phrasing my point efficiently.

                                                                                      But in the same spirit: I wonder why do I even need to know anybody’s affiliation at all in context of a technical discussion?

                                                                                      1. 11

                                                                                        One could make the same argument to flag “Beej’s Guide to Network Programming” or any post about how company X solves their problems.

                                                                                        1. 10

                                                                                          And usually they do so, considering it as spam, a form of advertisement… Only not of the political, but of the business kind.

                                                                                          1. 4

                                                                                            I don’t think you are familiar with at least the first example.

                                                                                            1. 7

                                                                                              But at least I can be familiar with the second example…

                                                                                              Your style is not that of a Friendly engineer.

                                                                                              1. 6

                                                                                                There was a time he went by a different name…:p (angrysock)

                                                                                        2. 6

                                                                                          I wonder why do I even need to know anybody’s affiliation at all in context of a technical discussion?

                                                                                          Because the author decided, that their “affiliation” is relevant to their content, that’s it. You don’t need to follow that thinking, you can opt-out of reading their article, even hide it on sites like lobste.rs.

                                                                                          Any articel tells you something about the authors identity and cultural affiliations. And most of us just fill the blanks with defaults, where details are missing. i.e. an authors gender on technical content is often assumed to be male, if not stated otherwise. Most of us who grew up in societies with Christian majorities just assume that most guides to unit testing are a variation of the “Heterosexual christian father’s guide to unit testing”. That’s bad because it taints our perspective, even on the already factual diversity of tech and the net. So IMHO it’s a good thing, if more of us keep their affiliations explicit and maybe even reflect on how those influence their perspectives.

                                                                                          1. 3

                                                                                            Your points aren’t worth arguing. You assert several things (“most people don’t care,” “have a bad effect on communities”) without any supporting evidence. To the first about whether people care and “don’t want to care” – I don’t find that persuasive even if you can provide evidence that a majority of people don’t want to be confronted with the identities of people who’re considered outside the mainstream. But I also suspect you’re making an assertion you want to be right but have no evidence to back up.

                                                                                            Likewise, what even is a “bad effect on communities and society”?

                                                                                            You also express an opinion (“I think identity politics are already too emphasized”) which I heartily disagree with, but that’s your opinion and I don’t see any point arguing about that. OK, you think that. I think too many craft beers are over-hopped IPAs and not enough are Hefeweizens. The market seems to disagree with me, but you’re not going to convince me otherwise. :-)

                                                                                            1. 7

                                                                                              Your points aren’t worth arguing.

                                                                                              Start with a thought-terminating cliché. Then you start arguing my points. :) No problem.

                                                                                              To the first about whether people care and “don’t want to care” – I don’t find that persuasive even if you can provide evidence that a majority of people don’t want to be confronted with the identities of people who’re considered outside the mainstream.

                                                                                              I understand your points, but you didn’t really grasp what I wanted to phrase. IMHO “mainstream” and other identities should not confront each other here unless being technically relevant ones, about which technical discussion can be carried on. There are other mediums for those kind of discussions.

                                                                                              Lucky someone has managed to phrase my ideas better than I could above:

                                                                                              https://lobste.rs/s/mn1am1/going_bark_furry_s_guide_end_end#c_xndsrl

                                                                                          2. 14

                                                                                            As I understand @kodfodrasz, they were bothered not inherently by the reminder of the group’s existence, but by the broadcasting of that reminder to the Lobsters front page. When an article title on the front page asserts the author’s voluntary membership of a group, that is not only a reminder that the group exists—it’s also implicitly an advocation that the group is a valid, normal, defensible group to join. One can agree with the content of such advocacy while also disliking the side effects of such advocacy.

                                                                                            What side effects would those be? @kodfodrasz said that “identity politics are already too emphasized and destructive in discussions, and have a bad effect on communities and society”. I think they are referring to way advocacy for an identity can encourage an “us vs. them” mindset. Personally, I see the spread of that mindset as a legitimate downside which, when deciding whether to post such advocacy, must be balanced against the legitimate upside that advocacy for a good cause can have.

                                                                                            1. 9

                                                                                              ^ this

                                                                                              My assertion is that currently I see a trend where legitimate topics are not discussed because some participants in the discussion have specific opinions on other topics than the one discussed. Dismissing some on-topic opinions for off-topic opinions is an everyday trend, and if bringing our off-topic identities to the site would gradually become more accepted, then that trend would also creep in from other parts of the society, where it has had done its harm already.

                                                                                              I hold this opinion as a guide for every off-topic identity. I think of it with regards to this forum a bit similarly to the separation of church and state has happened in most of the western world.

                                                                                              1. 6

                                                                                                by the broadcasting of that reminder to the Lobsters front page

                                                                                                The submitter (author in this case) has one “vote” in promoting their content on this site. Usually one net upvote keeps stuff in /new and outside the front page. What’s promoted this content to the front page is the site’s users, who have upvoted it enough to appear on it.

                                                                                                At time of my writing this comment, the current standing is

                                                                                                50, -7 off-topic, -4 spam
                                                                                                

                                                                                                Also note that comments themselves contribute to visibility, so everyone commenting complaining about this being off-topic and “in your face” aren’t helping their cause…

                                                                                                1. 5

                                                                                                  When an article title on the front page asserts the author’s voluntary membership of a group, that is not only a reminder that the group exists—it’s also implicitly an advocation that the group is a valid, normal, defensible group to join.

                                                                                                  Are you (or @kodfodrasz) implying that identifying as a furry is in some way so dangerous as to be suppressed by society at large?

                                                                                                  1. 2

                                                                                                    One can agree with the content of such advocacy while also disliking the side effects of such advocacy.

                                                                                                2. 4

                                                                                                  Would you be fine with a BDSM-themed blog post on a tech topic?

                                                                                                  1. 10

                                                                                                    It depends how the theme is explored.

                                                                                                    If it uses BDSM culture to explore the nuances of consent in order to explain a complicated technical point, I’m all for it.

                                                                                                    1. 3

                                                                                                      What if it’s just interlaced with drawings of BSDM activities, like that old GIMP splash screen? I wouldn’t be caught dead scrolling that (nor opening GIMP) at work.

                                                                                                      1. 8

                                                                                                        If you work at a place that cares more about some bullshit policing of imagery than technical merit, that’s a yikes from me.

                                                                                                        1. 5

                                                                                                          There’s an inherent sexual quality to BDSM that isn’t inherent to furry culture.

                                                                                                          You do realize that, correct?

                                                                                                          1. 6

                                                                                                            Strictly speaking that isn’t necessarily true about BDSM.

                                                                                                            1. 3

                                                                                                              Oh? This is news to me.

                                                                                                              1. 16

                                                                                                                Yep. There are people, for example, for whom submission is not a sexual thing but instead about being safe and there are people for whom having a little (in the subcategory of dd/lg) is about having somebody to support and take care of and encourage in self-improvement.

                                                                                                                That’s not everyone, the same way that there are in fact furries who are all about getting knotted.

                                                                                                                My point is just that if you want to go Not All Furries, you should be similarly rigorous about other subcultures.

                                                                                                                1. 6

                                                                                                                  o/ I’m asexual but still very into BDSM (and also a furry!). I know what something being sexualised feels like — took a while to get here — and while a lot of people do link the two intimately (as many do for furry things), they aren’t dependently linked.

                                                                                                        2. 6

                                                                                                          Actually, I know a real example. There is a Python-related French blog named Sam et Max. The technical articles are generally considered high-quality by the French-speaking Python programmers. But there are also BDSM- and sex-related articles alongside the Python articles. Even within a Python-related article, the author sometimes makes some references about his own fantasies or real past experience.

                                                                                                          1. 4

                                                                                                            As long as there’s no overt pornography, sure. I’d read a good article on crypto that had “by someone currently tied up” on it. What’s the point of writing if you get shamed for putting your personality in it.

                                                                                                            1. 3

                                                                                                              Already mentioned elsewhere but it’s my understanding that being a furry isn’t inherently sexual / about sex, though there can be that aspect. I certainly wouldn’t mind a post that was something like “a lesbian’s guide to…” or “a gay person’s guide to..” because those identities encompass more than sexual practices. (Someone elsewhere says that BDSM isn’t strictly speaking sexual, which … is news to me, but I admit my ignorance here. If there’s a non-sexual aspect to BDSM identity then sure, I’m OK with a BDSM-themed post on tech.)

                                                                                                          2. 5

                                                                                                            Consider seeing things like a Heterosexual christian father’s guide to unit testing on the front page.

                                                                                                            That goes without saying, because that’s the default viewpoint.

                                                                                                            The way the author clarifies and establishes their viewpoint does not make their technical content anymore off topic than someone submitting something titled “A Hacker’s Guide to MFA” or “A SRE’s Guide to Notifications”. The lens that they are using to evaluate a technical topic is an important piece of information that we often-times forget in tech with disastrous outcomes.

                                                                                                            1. 13

                                                                                                              No, it is not necessarily the default. But even if it would be, articulating that off-topic identity on the front-page would be unnecessarily divisive, and I’m pretty convinced, that people of other identities would flock the comment section claiming that the post is racist (sic!), and is not inclusive, hurts their feeling, and I think they’d be right (on this site).

                                                                                                              Hacker or SRE are on-topic tech identities themselves, while sexuality, political stand, religion are not really.

                                                                                                              1. 5

                                                                                                                Hacker is a political identity. For instance, it’s one that I find really degrading when associated to the whole profession. The nerd identity or the general infatilizing of programmers is degrading as well. These are tolerated because they are the majority’s identity in this specific niche and presented as “neutral” even though they are not.

                                                                                                                1. 4

                                                                                                                  Well I see some positive vibe about the hacker word in the IT sector, if you remember there was some hacker glider logo thingie around the millennia. I’m not one of them, and agree with you, I also find hacker somewhat negative, and not because of the “evil hacker”, but of the unprofessional meanings of the phrase (eg. quick hack). Still lots of fellow professionals don’t agree on this one with us.

                                                                                                                  Regarding Nerd: I also find the phrase degrading, and I don’t understand those who refer to themselves as nerds in a positive context.

                                                                                                                  1. 7

                                                                                                                    I don’t understand those who refer to themselves as nerds in a positive context.

                                                                                                                    The best way of removing the degrading conotation of a word is to rewrite its meaning. The best way to do that is to unironically use it in a neutral-to-positive context.

                                                                                                                    1. 1

                                                                                                                      yeah but the problem is what you want to appropriate. The word “slut” has been reappropriated to defend the right for men and women to have sex freely without judgement. The word “nigger” has been reappropriated because black people are proud of being black. But the word “nerd”? “nerd” means being obsessed with stuff and have very poor social skill and connections. Reappropriating the word flirts very closely with glorifying social disfunctions, exclusion and individualism.

                                                                                                                      1. 4

                                                                                                                        Reappropriating is done because there are negative connotations that we want to take out of focus; that’s the whole point.

                                                                                                                        1. 1

                                                                                                                          but Nerd is imho all negative. The positive connotations, like being dedicated and consistent on a practice is not exclusive to being a nerd. Being nerd is not even stigmatized anymore: now it’s cool to be nerd and still it’s degrading, like being a circus freak. You reappropriate a word to remove a stigma towards a category, but the stigma is already gone and what is left is a very distorted portrayal of knowledge workers.

                                                                                                                          1. 4

                                                                                                                            That the stigma is gone is precisely because people took the term and ran with it.

                                                                                                                            Besides, I have no problem with assholes (whose opinion of me is no concern of mine) considering me a circus freak: it makes them keep themselves at a distance which means less work for me to get the same desirable result.

                                                                                                                            (Also: I disagree with the term “nerd” glorifying “social dysfunction” - normalizing, maybe, but that’s a very inclusive stance, especially when these “dysfunctions” are called by their proper name: neurodiversity. And what precisely is the problem with individualism again? And another tangent: knowledge workers aren’t necessarily nerds and nerds aren’t necessarily knowledge workers)

                                                                                                                            1. 1

                                                                                                                              I agree with all your values but it doesn’t seem like this is what’s happening in the real world. Inclusion of neurodiversity is happening only in small bubble in USA/NE: if anything, neurodiverse people are just more aware of being different. Good for coping, not that good for social inclusion. Really neurodiverse people are still rejected by the society at large and at best they get tokenized and made into heroes but not really included. Also this appropriation of the word detached the concept of nerd from neurodiversity that if it was ever a thing, it’s not a thing now. Today being nerd is wearing glasses and a checkered shirt. Then if you flirt flawlessly with girls, entertain complex social networks and work as a hair dresser, it’s enough to say your hobby is building radios and boom, you’re a nerd. I don’t see how this process would help neurodiverse people and I don’t see how it is good to have to live up to this stereotype to be included in the IT industry (because in most places, if you are not some flavor of nerd/geek, you’re looked at with suspicion)

                                                                                                          3. 15

                                                                                                            A lot of tech workers are furries (or furry-adjacent).

                                                                                                            I don’t doubt that a lot of furries (or furry-adjacent) might be tech workers, but I’m not sure your statement is accurate, given just how many tech workers there are.

                                                                                                            1. 7

                                                                                                              For most people, “Furries” is “that weird sex thing”. I can see a lot of people wanting to make it clear that sexual references are out of place in order to make tech a more comfortable and welcoming place for everyone. I suspect that famous Rails ‘pr0n star’ talk has (rightly) made people feel uncomfortable with sexual imagery in tech.

                                                                                                              I’ve upvoted because the content is good, but I’m also not really one for keeping things milquetoast. I’d like to see more content like this. The technical parts are worth reading, even though I have no interest whatsoever in furries, and mildly dislike the aesthetic.

                                                                                                              And yes – I’ve discovered today via google that it’s only a sex thing for 30% to 50% of the people in the subculture, but as an outsider, the sexual aspect is the only aspect I had ever heard people mention.

                                                                                                              Going forward, I’d just suggest ignoring the downvotes and moving on – they’ll always be there on anything that’s not boring corporate talk, and the threads like these just suck the air out of interesting conversation.

                                                                                                              1. 3

                                                                                                                [edit: content moved to different post, this was accidentally off-by-one click]

                                                                                                              2. 12

                                                                                                                Yiff it bothers you, why not just read it without the images? Firefox reader view works great fur me.

                                                                                                                1. 9

                                                                                                                  It doesn’t claim to be for furries, it claims to be by one.

                                                                                                                  1. 5

                                                                                                                    Is it, though? If it was written as “a teacher’s guide to end-to-end encryption” would anybody be flagging it or carping about the title just because the intended / primary audience was teachers but the content could be abstracted to anybody who cared about end-to-end encryption?

                                                                                                                    1. 11

                                                                                                                      That’s a good type of question to ask, but your example title “A Teacher’s Guide …” is not equivalent. The author being a teacher could be highly relevant to the content of the article; for example, the article might especially focus on the easy-to-teach parts of encryption. The author being a furry, however, is likely to affect only the theme.

                                                                                                                      Analogous titles would change “furry” to another subculture that is not innately connected to tech and that people choose rather than being born with. Two examples:

                                                                                                                      • “Hide my Waifu: An Otaku’s Guide to End-to-End Encryption”
                                                                                                                      • “Communication is Key: A Polyamorous Person’s Guide to End-to-End Encryption”

                                                                                                                      Would people complain about those titles? I predict that yes, some people would, though fewer than those who are complaining about the furry-related title.

                                                                                                                  2. 5

                                                                                                                    Obviously it’s great that someone wants to give us this information. In return we should give them respect and thanks.

                                                                                                                    Showcasing their identity not only gives personal color to the post, it also donates some of the credit to the community they identify with, rather than to some default security engineer type we might imagine.

                                                                                                                    Thanks to this personal touch, some readers can no longer say furries are unintelligent, or never did anything for them.

                                                                                                                    1. 4

                                                                                                                      Belatedly, but I’m following up on these flags. I missed this story and am reading through it now.

                                                                                                                    1. 7

                                                                                                                      From the title, I expected a VCS for audio files. That would be cool.

                                                                                                                      1. 17

                                                                                                                        I expected a VCS transmitted with speakers and a microphone.

                                                                                                                      1. 6

                                                                                                                        Between this and the recent home-manager post, I think I’ve found a new blog worth subscribing.

                                                                                                                        1. 14

                                                                                                                          That’s very kind, but you’re in for disappointment! I hardly ever write anything.

                                                                                                                          1. 16

                                                                                                                            all the better, less cost to subscribe

                                                                                                                        1. 8

                                                                                                                          Ok, now bring back phones with an integrated hardware keyboard like the HTC desire Z.

                                                                                                                          1. 4

                                                                                                                            My experience is that a fold-out bluetooth keyboard is much more comfortable and better.

                                                                                                                            1. 6

                                                                                                                              I guess it depends on your use case. If you have a proper table you’re right. If you want to have a purely hand held device for places like a crowded subway an integrated keyboard would be superior, I guess.

                                                                                                                              1. 2

                                                                                                                                I do tend to use various phones for multiple tasks as well. That being said, bluetooth fold-out keyboards were never a viable option for me (starting with some early folding ones for Palm handhelds etc up to the current Logitech Key-To-Go that isn’t foldabe but portable). My biggest problem with all of them was, that I use mobile devices mainly via commuting and it is just not really usable on your lap without the phone falling out or it being really shaky. A builtin keyboard might not be as comfortable as a separate bluetooth one, but it is fixed on your phone.

                                                                                                                                A notable exclusion of the “external keyboards don’t work when commuting” is the ipad Pro with a Smart Keyboard - the magnets are holding it in place as good as a fixed one. (Can’t say anything about the magic keyboard but I assume similar) edit: i actually wrote about my experience using the iPad here - not really using it “fullblown” with a VM and stuff ondevice like you do but rather as a remote shell: https://www.shift-2.com/journal/my-current-setup-learning-and-developing-rust

                                                                                                                                1. 1

                                                                                                                                  Is it possible to use the one you linked on one’s laps? Or would I need a proper desk for that?

                                                                                                                              1. 2

                                                                                                                                Doesn’t the dog/cat example violate the strict aliasing rule?

                                                                                                                                1. 4

                                                                                                                                  I’m not sure — is the rule taking effect at the time of pointer creation, or use?

                                                                                                                                  In either case, if compilers accept that code, by Hyrum’s Law, it doesn’t matter what the standard thinks about it.

                                                                                                                                  1. 2

                                                                                                                                    An object can only have its stored value accessed via an lvalue of a compatible type. (C99 s. 6.5 p 7)

                                                                                                                                    It is perfectly fine to merely copy the value of a pointer into an lvalue of an incompatible type as long as it is never dereferenced – although I cannot think of a reason why you would.

                                                                                                                                    1. 3

                                                                                                                                      There’s no requirement in C that sizeof(X*) and sizeof(Y*) are the same, so this might not be possible. char* and void* must be large enough to hold pointers to anything, but C on a sufficiently weird architecture pointers may be different sizes depending on the size of the values. On machines that have word-addressable memory, most types are just addresses but char* and void* are both an address plus a mask or offset.

                                                                                                                                      This doesn’t matter for any mainstream architectures.

                                                                                                                                      1. 2

                                                                                                                                        I won’t call it good practice, but you can do this to store a pointer-to-X in a pointer-to-Y as long as you know that the latter is never dereferenced as such. I.e. you always convert it back to pointer-to-X before dereferencing it. You could for example (ab)use an unused structure member to hold a different kind of pointer than its declared type.

                                                                                                                                    2. 2

                                                                                                                                      That rule is commonly misunderstood. It’s permissible to convert a pointer to one type to a pointer to another type, it’s not permissible to dereference a pointer if it points to an “object” (that’s the terminology of the standard) of the wrong type (with some exceptions/allowances).

                                                                                                                                      If I remember rightly converting a pointer from one type to another results in an implementation-defined value anyway, i.e. it doesn’t even necessarily point into the same object. Of course, with your typical compiler, it does.

                                                                                                                                    1. 12

                                                                                                                                      I’d be really hesitant to link a Slack thread in a commit message. Even permissions aside, Slack limits the history access on some plans so this link may soon become invalid.

                                                                                                                                      1. 4

                                                                                                                                        I prefer analysis and notes go in a bug tracker for a variety of reasons (e.g., you can amend it later if URLs change or to make it clear the analysis was somehow incorrect) – but, yes, whether in bug notes or in the commit message itself, it definitely feels better to paraphrase, summarise, or even just copy and paste the salient details rather than just link to a discussion in some other potentially ephemeral mechanism or something volatile like a gist.

                                                                                                                                        1. 1

                                                                                                                                          Agreed, IMHO details and discussion should all be in the bug tracker - not in Slack or in commit messages. The commit message should have a short ”what does this change do” explanation and a reference to the bug tracker where more details can be found if needed. I don’t agree with the need to put an entire essay in the commit message that seems to be popular on the Internet.

                                                                                                                                          1. 16

                                                                                                                                            My 12-year-old codebase is on it’s fourth bug tracker. None of the links in commit messages still work, but the repository kept history when it got converted to git, so 12-year-old commit messages still carry useful context.

                                                                                                                                            1. 2

                                                                                                                                              As other comments mention, commit history has a longer lifetime than bug trackers. Of course, you can port your tickets when you change trackers, but will you?

                                                                                                                                              1. 2

                                                                                                                                                Yes, of course. Not migrating your hard earned knowledge would be an incredible destruction of time and money, especially in a commercial setting.

                                                                                                                                                1. 2

                                                                                                                                                  Commits are for non commercial settings as well, and sometimes migration can’t be done e.g. when you rehome but don’t move a GitHub repository (if for example original access controls were vested in single humans who then apparently vanished).

                                                                                                                                                  Keeping content in an issue tracker is nice, but it’s always worth duplicating knowledge into the git commit.

                                                                                                                                                  Catastrophic data loss can always happen, even in commercial settings.

                                                                                                                                            2. 1

                                                                                                                                              I mostly agree here. But I do think that links can belong in a commit message, like when referencing a design document. Since design docs are usually a snapshot of a design of a feature, that usually has context on motivations for some of the decisions that are too long to type out in a commit message, as well as discussions.

                                                                                                                                            3. 1

                                                                                                                                              Interesting point. It’s a trade-off between providing context easily and future proofing. I was assuming a paid plan, which has no historical limits. I don’t think free slack is a good fit for this, because of the memory hole.

                                                                                                                                              1. 2

                                                                                                                                                I’m fine with linking to a fully fledged bugtracker we know we’ll keep using (yeah…) but something like Slack feels far to flimsy to me. It’s not clear where the context begins and where it ends as the discussion often evolves and drifts away to other related topics. A chat platform just isn’t a fit here in my opinion.

                                                                                                                                            1. 2

                                                                                                                                              My only real complaint with Hugo is the difficulty in making your own themes. I did not find their documentation for theme-makers to be very helpful at all.

                                                                                                                                              I understand the concepts of partials and that they piece the page together into different “puzzles” by using variants of a partial, but I don’t understand how to change which page gets which assembled “puzzle”.

                                                                                                                                              1. 5

                                                                                                                                                The first comment on the lwn post has a reference to a themeless setup for Hugo. The themeless theme sets up a barebones Hugo site. It might be helpful in learning theming because there is very little in the templates and css files to it is easier to work with them than more established themes.

                                                                                                                                                1. 2

                                                                                                                                                  I actually found creating my own theme pretty straightforward, especially after trying to do it in Pelican. In a simple case you need only two templates (“list” and “single”), as opposed to a dozen in Pelican. Because of this it’s also easier to create a non-blog in Hugo, as many templates required by Pelican stop making any sense when you don’t create a typical blog.

                                                                                                                                                  1. 2

                                                                                                                                                    I think I just need to start fresh as I think I went about it wrong after looking at what @eb commented. I did some very dirty solutions to get things working early on and I think that is contributing to the current issues.

                                                                                                                                                    1. 1

                                                                                                                                                      That’s not true at all, in Pelican you only need index and page templates, everything else can be empty. Explicit is better than implicit so if empty files bother you then you can hide them on your system file browser or something.

                                                                                                                                                    2. 2

                                                                                                                                                      My current site is built using Gatsby, which, while cool, is a nightmare to keep updated. I’d heard of Hugo, and figured porting my site would be fairly easy since it’s a single-digit number of blog posts and a super basic stylesheet.

                                                                                                                                                      After fighting with Hugo and their docs for at least three hours, I gave up and just wrote my own site generator. I’m sure Hugo is great for complex scenarios, as most static site generators probably are, but I wanted a home page, list of posts, a post page, and nice syntax highlighting. I couldn’t manage to get that with Hugo as easily as I thought it could be.

                                                                                                                                                      On the plus side, my site generator is the only one I’m aware of that uses the same syntax highlighting engine as VS Code, so all my code snippets are now super colorful!

                                                                                                                                                      1. 1

                                                                                                                                                        I’m using Hugo for several projects and have a similar experience. I still cannot confidently say I know how to solve the simplest tasks like list posts with some conditions or create an archive page. This is mostly my fault, but Hugo’s documentation does not help.

                                                                                                                                                        1. 1

                                                                                                                                                          Would you mind sharing a link to your generator if it is open source?

                                                                                                                                                          1. 2

                                                                                                                                                            I still need to get inlining of small assets working, but maybe I can use this as motivation to finish it soon! I’ll reply again once I’ve published it.

                                                                                                                                                        2. 2

                                                                                                                                                          Check out Pelican. It’s using Jinja2 for better templating and it’s a really nice templating engine also used by Django.

                                                                                                                                                          1. 3

                                                                                                                                                            Django doesn’t actually use Jinja2 (at least not by default, you can configure it to do so) but it’s own templating engine. They are however very similar since Jinja2 is actually modelled after the Django templating engine.

                                                                                                                                                        1. 26

                                                                                                                                                          inheritance is something that makes your code hard to understand. Unlike function, which you can read just line by line, code with inheritance can play “go see another file” golf with you for a long time.

                                                                                                                                                          This isn’t an argument against inheritance, it’s an argument against modularity: Any time you move code out of inline you have the exact same “problem” (to the extent it is a problem) and you can only solve it the same way, with improved tooling of one form or another. ctags, for example, or etags in Emacs.

                                                                                                                                                          1. 31

                                                                                                                                                            Inheritance has this problem to a much larger degree because of class hierarchies. Tracing a method call on a class at the bottom of the tree, requires checking every parent class to see if its overridden anywhere. Plain function calls don’t have that problem. Theres only a single definition.

                                                                                                                                                            1. 7

                                                                                                                                                              Plain function calls don’t have that problem. Theres only a single definition.

                                                                                                                                                              Unless we start using higher order functions when the function is passed around as a value. Such abstraction creates the exact same problem, only now it’s called “where does this value originate from”.

                                                                                                                                                              1. 5

                                                                                                                                                                Yes, which is why higher order functions are another tool best used sparingly. The best code is the most boring code. The most debuggable code is the code that has the fewest extension points to track down.

                                                                                                                                                                This is, of course, something to balance against debugging complicated algorithms once and reusing them, but it feels like the pendulum has swung too far in the direction of unwise extensibility.

                                                                                                                                                                1. 4

                                                                                                                                                                  For extra fun, use higher-order functions with class hierarchies!

                                                                                                                                                                2. 4

                                                                                                                                                                  The best is python code where the parent class can refer to attributes only created in child classes. There are equivalents, but less confusing, in languages like Java.

                                                                                                                                                                  1. 1

                                                                                                                                                                    Isn’t the example in the linked article doing exactly that?

                                                                                                                                                                    1. 2

                                                                                                                                                                      Okaaaay… what’s self.connect doing? Ah, it raises NotImplementedError. Makes sense, back to SAEngine:

                                                                                                                                                                      Not exactly. :)

                                                                                                                                                                      1. 1

                                                                                                                                                                        Check out Lib/_pyio.py (the Python io implementation) in CPython for lots of this.

                                                                                                                                                                    2. 1

                                                                                                                                                                      The overrides is mostly for modularity and reduce code duplication. Without classes, you might either end up with functions with tons of duplicated code, or tons of functions having a call path to simulate the “class hierarchies”. And yes, it’s going to make the code harder to read in some cases, but it also makes the code much shorter to read.

                                                                                                                                                                      1. 6

                                                                                                                                                                        Without classes, you might either end up with functions with tons of duplicated code

                                                                                                                                                                        Why? There is literally no difference in code re-using between loading code through inheritance vs function calls, apart from possibly needing to pass a state to a function, that could otherwise be held in class instances (aka objects). this is certainly less than class definition boilerplates.

                                                                                                                                                                        or tons of functions having a call path to simulate the “class hierarchies”

                                                                                                                                                                        The call chain is there in both cases. It’s just that in the class-based approach it is hidden and quickly becomes a nightmare to follow. Each time you call a method statically or access a class atribute, you are basically pointing to a point in your code that could be hooked to different points in the hierarchy. This is a problem. People don’t think it is a big deal when they write a simple class and know it well, because the complexity is sneaky. Add another class and all of the sudden you brought in a whole other hierarchy into the picture. Each time you read “this” or “instance.something”, you’re up for am hunt. And each other hierarchy you bring into the picture increases complexity geometrically. Before you know, the project is unmanageable, the ones writing it went on to some green field project, doing a similar mess again for some poor soul to struggle with after them.

                                                                                                                                                                        And yes, it’s going to make the code harder to read in some cases, but it also makes the code much shorter to read

                                                                                                                                                                        It doesn’t really. People fall for this because you can instantiate a class and get a bunch of hidden references that are all available to you at will without you need to explicitly pass them to each method, but you only get this through defining a class, which is way more verbose than just passing the references you need.

                                                                                                                                                                        All that said, what classes do offer in most languages is a scope that allows for fine grain control of data lifecycle. If we remove inheritance, then class members are akin to use global variables in non-OOP languages. But you can create as many scopes as you want. I which languages like python would do this as, for the same reason as OP, I suffer from working with OOP codebases.

                                                                                                                                                                        1. 4

                                                                                                                                                                          You make it sound like inheritance is the only way to reduce code duplication. In my experience that is simply not true, you can always use composition instead. E.g. Haskell doesn’t support inheritance or subtyping and you still get very compact programs without code duplication.

                                                                                                                                                                          1. 5

                                                                                                                                                                            Without classes, you might either end up with functions with tons of duplicated code, or tons of functions having a call path to simulate the “class hierarchies”

                                                                                                                                                                            This is only true in my experience if you’re trying a functional approach with an OO mindset. There are other ways to solve problems, and many of them are far more elegant in languages designed with functional programming as the primary goal.

                                                                                                                                                                        2. 5

                                                                                                                                                                          When you move a bit of code out of your file it’s not going to call back function from the first file. You going to even make sure this is the case, that there is no circular dependency, because it makes (in cases when a language allows to make you one) code harder to read. In case of inheritance, those games with calling everything around is just normal state of things.

                                                                                                                                                                          Of course, example in the article is small and limited, because pulling a monster from somewhere is not going to make it more approachable, but surely you’ve seen this stuff in the wild.

                                                                                                                                                                          1. 4

                                                                                                                                                                            You might do that, in the same way that you might carefully document your invariants in a class that allows inheritance, mark methods private/final as needed, etc. But you also might not do that. It sounds a bit as if you’re comparing well-written code without inheritance to poorly written code with it.

                                                                                                                                                                            Not that there isn’t lots of terrible inheritance based code. And I’d even say inheritance, on balance, makes code harder to reason about. However, I think that the overwhelming issue is your ability to find good abstractions or ways of dividing up functionality–the choice of inheritance vs. composition is secondary.

                                                                                                                                                                            1. 2

                                                                                                                                                                              It’s just that without inheritance it’s easier to make good abstractions. Inheritance affords you to do wrong thing easily, without any friction - just read a good article about that few weeks ago.

                                                                                                                                                                          2. 4

                                                                                                                                                                            Interesting article from Carmack about inlining everything:

                                                                                                                                                                            http://number-none.com/blow/blog/programming/2014/09/26/carmack-on-inlined-code.html

                                                                                                                                                                            1. 4

                                                                                                                                                                              This isn’t an argument against inheritance, it’s an argument against modularity: Any time you move code out of inline you have the exact same “problem” (to the extent it is a problem) and you can only solve it the same way, with improved tooling of one form or another. ctags, for example, or etags in Emacs.

                                                                                                                                                                              Not really, including code via accessing a class or object member forces you to manually go figure out which implementation is used, or where the implementation in a web of nested namespaces. In the case of function, each symbol is non-ambiguous. This is a big deal. If you have types A and B, with A having an attribute of the type B, each of these types containing a 3 level hierarchy, and you call A.b.some_b_method(). That could be defined in 9 different places, and if it is, you need to figure out which that symbol resolves to. This is a real problem.

                                                                                                                                                                              1. 2

                                                                                                                                                                                This isn’t an argument against inheritance, it’s an argument against modularity:

                                                                                                                                                                                Yeah, all code should be in a single file anyway. No more chasing of method definitions across multiple files. You just open the file and it’s all there…

                                                                                                                                                                                1. 2

                                                                                                                                                                                  Any form of modularity should be there to raise the level of abstraction. ie. Become a building block, that is solid (pun intended) firm and utterly reliable, that you can use to understand the higher layers.

                                                                                                                                                                                  You can peer inside the building block if you need to, but all you need to understand about it, to understand the next level up, is what it does, not how it does it.

                                                                                                                                                                                  Inheritance is there to allow you to know that “all these things IS A that”. ie. I can think of them and treat all of them exactly as I would treat the parent class. (ie. The L in SOLID)

                                                                                                                                                                                  I can utterly rely on the fact that the class invariant for the superclass holds for all subclasses. ie. The subclasses may guarantee other things, but amongst the things they guarantee, is that the super class’s class invariant holds.

                                                                                                                                                                                  I usually write a class invariant check for every class I write.

                                                                                                                                                                                  I then invoke it at the end of the constructor, and the beginning of the destructor, and at the start and end of every public method.

                                                                                                                                                                                  As I become more convinced of the correctness of what I’m doing, I may remove some for efficiency reasons. As I become more paranoid, I will add some.

                                                                                                                                                                                  In subclasses, the class invariant check always invokes the parent classes invariant check!

                                                                                                                                                                                1. 23

                                                                                                                                                                                  I think we should either get the tag distributions or package management as a general category before considering adding more specialized tags.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    I prefer going towards a generalization instead (there’s similar technologies like Guix, PowerShell DSC, OSTree, Silverblue, etc.) - the problem is what that generalization is because Nix covers a lot of ground; package management, desired-state, etc.

                                                                                                                                                                                    1. 6

                                                                                                                                                                                      the problem is what that generalization is because Nix covers a lot of ground; package management, desired-state, etc.

                                                                                                                                                                                      Nix does, but a specific post not likely. My bet would be on using a tag appropriate to the post, not the technology it’s about as a whole.

                                                                                                                                                                                    2. 1

                                                                                                                                                                                      I think that package management, or maybe something generally enough to also categorize stuff like Flatpack and Docker would be good, distro is too linux specific, and linux already is a tag.

                                                                                                                                                                                    1. 4

                                                                                                                                                                                      Does this still let you require that you must touch the Yubikey to use it? That’s the only safe way to use SSH agent forwarding

                                                                                                                                                                                      1. 3

                                                                                                                                                                                        I just tried it and yes, it does.

                                                                                                                                                                                      1. 6

                                                                                                                                                                                        I switched away from Fish (after using it for several years) because I couldn’t get used to it’s non-POSIX syntax…

                                                                                                                                                                                        1. 13

                                                                                                                                                                                          That’s the reason I picked it; for day to day usage, it’s a lot less warty, and if I need a bunch of POSIXy stuff, I can just exec bash.

                                                                                                                                                                                          1. 1

                                                                                                                                                                                            You are correct in that exec bash is a useful way to run POSIXy stuff. Unfortunately (to my knowledge), shell functions, aliases, etc. must be translated into fish. I depend on being able to source POSIX shell scripts in order to bring my functions and aliases to remote servers and containers.

                                                                                                                                                                                            1. 2

                                                                                                                                                                                              From my experience, 90% of shell functions and aliases can (and should) be rewritten as standalone scripts. Unless you indeed modify the current shell’s environment or even the argument handling (like noglob in zsh), there is no reason to hoard functions.

                                                                                                                                                                                              1. 1

                                                                                                                                                                                                Funny; I did just that mere hours before you posted your comment. Took three commits to my dotfile repo (1, 2, 3).

                                                                                                                                                                                                There is one other benefit to using shell functions and aliases: it’s easy to view them all at once by running functions && alias; the result can be written to a file, giving you a single file with all your custom commands.

                                                                                                                                                                                              2. 1

                                                                                                                                                                                                That’s a different use case, yeah. For me, I have two computers I ever interact with, so.

                                                                                                                                                                                                1. 1

                                                                                                                                                                                                  Yeah, that’s unfortunately why I have to use bash at work even though I use fish everywhere else. Sad; fish is way nicer for shell scripting.

                                                                                                                                                                                              3. 5

                                                                                                                                                                                                I switched away from Fish, despite much preferring its obviously better syntax and other UI improvements, because I still had to work with old bash and posix shell scripts day-to-day anyway.

                                                                                                                                                                                                1. 4

                                                                                                                                                                                                  For the folks in this thread who found Fish was not compatible with their POSIX scripts: do you have a lot of functions that modify your shell’s state/environment, then? For me that’s limited to a few scripts related to virtualenv, changing directories, and setting the prompt. The other 95% does just fine as standalone scripts with #!/bin/sh as the hashbang.

                                                                                                                                                                                                  To avoid misunderstanding, I’m not really asking “why do/don’t you use X”. It is me wanting to see all the things folks do with their shell that could not be done as a script, so please Share All The Things That Come Under That Heading And That You Feel LIke Sharing :D

                                                                                                                                                                                                  1. 3

                                                                                                                                                                                                    The biggest offenders are the version-switchers for various languages–virtualenv, chruby/rvm/rbenv, nvm, etc. For some of these things, there are fish equivalents, but it remains a point of friction.

                                                                                                                                                                                                    The other annoyance with fish is that any time I have any problem with a shared script at work that works for everybody else, everyone assumes fish is the problem (which is rarely-to-never the case).

                                                                                                                                                                                                    But it’s still a great shell and I continue to use it.

                                                                                                                                                                                                  2. 4

                                                                                                                                                                                                    I’m just writing scripts for zsh or a non-shell language when I want to do more than one thing.

                                                                                                                                                                                                    fish has made 99% of my interactions at a shell prompt ‘just work’ with practically zero config, learning curve, or slowness.