Threads for Nesh

  1. 7

    As I’ve got to understand some time ago, common language is just a tool to communicate ideas between individuals. Not the place where perfection needs to be attained at all costs. That’s especially hard for us programmers who normally work in a context or almost supernatural perfection.

    Sure saying “HTTP API” is technically better but if saying that we are going to build a RESTful API makes the concepts clear to the whole team (from the new intern to the snarky senior), that’s what we will use.

    As the article presents, since APIs implemented exactly as presented in the original paper (“trulu” RESTful) call themselves something else than REST, that means that there is no really confusion to begin with.

    This meand that if someone nowadays says REST API they actually mean HTTP API, that’s it.And if someone says Hydra, HyperMedia or ChockoMangoTM API then the other person might simply say “can you show me what you mean?” and move from there.

    1. 9

      saying that we are going to build a RESTful API makes the concepts clear to the whole team

      I feel like it doesn’t. Most people just think of HTTP methods bolted on to any kind of API. If you say HTTP API, and maybe clarify by saying “yknow, an API designed to respond to HTTP messages”, it would be considerably clearer since there’ll be no conflict between people’s varying understandings of REST.

      1. 7

        Right, exactly. If someone says a “REST API” I don’t know if they actually mean REST as originally defined or if they’re just using it to mean ‘any API that uses HTTP as a transport’.

        1. 9

          I made this mistake once. I was asked to design a REST API, and so I did. Turns out they wanted RPC over http.

          1. 2

            Turns out they wanted RPC over http.

            There are a ton of folks who seem to think that REST == JSON-over-HTTP, and honestly don’t understand why RPC with JSON-over-HTTP isn’t RESTful.

            1. 2

              LOL that made me dribble my drink i’m so sorry

            2. 2

              Definitely in the minority there though.

              Not to say that you are wrong but you are underestimating how many people actually think like that, at least from my own experience. This is supported even further by the fact that this post was even made in the first place.

        1. 1

          Premise is totally valid but then the list doesn’t seem useless or simply “for fun”. Almost comes across as bragging of what the author can tag as “just for the lolz”.

          1. 1

            i looked through the list and they’re all absolutely “for fun” projects. languages, game engines, etc. are the kind of thing that is really hard to make a full fledged, polished and production-ready version, but lots of fun to hack on a basic viable project.

          1. 1

            Definitely in the real of super high efficiency because that code is extremely unreadable.

            For fun, I would have XOR’d the two byte representations and just summed the 1’s to get the total.

            1. 2

              That’s impressive…but what device in 2021 needs to boot from a floppy? Today’s embedded devices are typically smaller than a floppy drive, and find something like microSD to be more appropriate, which also means having an absurd amount of storage available.

              1. 5

                I’m gonna guess “something old”

                1. 4

                  Because it’s fun.

                  1. 2

                    just pandering to a specific crowd being nostalgic with older things.

                  1. 2

                    One day I will also add a new job title to my list: home system administration.

                    P.S. your rack looks sexy 😘

                    1. 1

                      I get the point but I also managed to do absolutely everything I needed to do with text on a computer without that much frustration.

                      Yes, it should/could be better but isn’t that true for literally everything in the world? I believe that as long as I manage to get my task done in a non-frustrating way then it means it’s good enough.

                      That’s why I never bothered really learning vim: it’s too frustrating when you get stuck that I simply find it silly having to waste time with an editor that actually seems to hate me, if I mix-match arabic, chinese, emojis, skintone modifiers, and some software doesn’t get it perfectly right, I’m OK with that.

                      1. 4

                        Maybe I am the one not getting it but everyone in this thread seems to be reading this game as “these are good designs vs these are bad” instead for me it was taking a “base design” and making ever so slight modifications to see if the player “can see it” and once the game shows the difference then the player “can’t unsee”.

                        So it’s not a way to tell people they are right or wrong in their design choices but rather a tool for non-visual people to fine-tune their awareness of tiny visual differences and being able to point them out specifically. That’s my read of it at least.

                        1. 3

                          I understood it as this as well. I took it as, “This is how Facebook is set up. Can you detect it?” This perspective is also supported by clicking the “For Business” link at the bottom of the page, which says:

                          Use Can’t Unsee to measure attention to detail

                          Our data suggests that high scores in the Can’t Unsee game are correlated with high attention to detail.

                          You can use Can’t Unsee to screen designers, developers, QAs, product managers and other people who job with technology.

                          1. 3

                            If that was the case, choosing between two similar designs and being told you’re right or wrong doesn’t seem to fit. Like, I could tell the difference between the separator thickness, clicked the thicker one because I thought it looked better, and got a big cross in my face.

                            1. 1

                              But… the game literally tells you if you’re right or wrong in your choice, and you’re penalized if you’re wrong. It’s not a “spot the differences” type of game, where you get to click and highlight differences – you’re also supposed to pick the right choice.

                              In order to get a high score in the Can’t Unsee game, you don’t have to just spot the difference, you’re also supposed to point out which of the two variants is “right”. Spotting the difference isn’t enough.

                              1. 2

                                Whether or not the language of the game is effective at conveying its intent, information available on the website seems to suggest it. The use of the strange phrasing, “and other people who job with technology” tells me that maybe the designer’s mastery of English isn’t the best (or they’re making a joke, or they’re not as good with the proper use of words as they are with graphic design). It’s not a stretch to consider their use of the word “correct” within the exercise as meaning “aligned with the real website” given their specifically calling out the exercise as being related to attention to detail.

                                I get the sense from most of the replies here that people are upset at having felt like they failed a test, and now they’re expressing their frustration at that. I don’t think it’s unreasonable to feel this way. There is useful criticism in saying that the website does a poor job of laying out its intent (why isn’t it front and center on the first page, for instance?) but I think anybody being critical of it because they view the site as a value judgment about design features might be missing the point.

                                There’s very little language on the site, and it’s telling that people have pasted their own meaning of the phrase, “Select the design that’s most correct.” as either meaning “better than the other one” or “right by some objective measure of design” instead of simply the one that is actually present on the source material.

                                1. 1

                                  Their “for business” description makes it sound like one of those “spot the differences” games we had in comic books back when we were kids, but the game is not like that, and the fact that they insist it’s just like that doesn’t magically make it so. Those games only had you spot things like Mickey Mouse having a square belt buckle in the picture on the left, and a round belt buckle in the picture of the right. They only asked you to spot the differences, not pick the picture where Mickey Mouse is dressed right.

                                  This is a game that’s supposedly about attention to detail, but getting the right score – by which, in their “for business” package, you could pass or fail a job screening – requires not just attention to detail (i.e. spotting differences), but also making a quality judgement.

                                  For example, in the question related to colour tint, you’re not just supposed to spot that two buttons differ slightly in colour (which, by the way, says more about the quality of your monitor than about your attention to detail, but anyway) – you’re also supposed to pick the one with the correct colour. And you’re supposed to do that without any context. I could believe it was about attention to detail if, for example, the correct answer would be correct because the shade of red on the button matches the shade of red in other design elements of an app or a page. But that’s not the case. You’re just given two pictures, each of them including a single red button.

                                  Cynically, but I’ve been at it for a while and I wouldn’t be surprised if this were the case: they have to make the “official” desription of the commercial package about “attention to detail” rather than taste or design skills because otherwise it would be hard to sell. First, because if you make it about particular design choices, any recruiting consultant worth their money will ask you what good it’s going to be 12 months from now when design trends change, and now you gotta update it every six months. Second, because if it’s going to be marketed as a tool for screening and interviewing, it has to claim it measures objective metrics, otherwise corporate recruiters won’t want it, for a long list of reasons that starts with accountability and ends with legal risk – while small-time companies aren’t going to pay for that.

                            1. 7

                              The whole thing feels weirdly like an attack towards Signal and using this as an excuse.

                              It’s not like Cellebrite are the good guys here and their software is certainly in the greyest zone.

                              Also I find it weird that the author calls “Signal” the creator of the app itself, that makes things confusing.

                              1. 2

                                Interesting article but I guess more useful to people who just started doing HTML/JS as the pointers are rather obvious (at least to me).

                                1. 11
                                  1. One small and typical problem area is that the Bourne shell doesn’t have named function arguments
                                  1. “outsourced language elements”
                                  • test and expr functionality is all in Oil
                                  1. The third problem is that the Bourne shell lacks important language features that normally act to make coding errors less likely and contain and manage code complexity
                                  1. Lacking data structures does a number of bad things
                                  • Oil fixes both bash data structures (arrays and associative arrays) and has recursive Python/JS-like data structures, with better syntax

                                  If you already have 3400 lines of shell like dkms and don’t want to rewrite it [1], Oil is a good upgrade path. (It still needs to be faster though, working on it)


                                  If you don’t agree after trying it, send me some feedback:

                                  [1] trivia: I spent more than 2 years rewriting 10K lines of shell as 30K lines of Python early in my career :)

                                  1. 9

                                    This is an obvious promotion of the tool this person works on.

                                    1. 31

                                      Is that an issue?

                                      @andyc correctly points out what he thinks are weaknesses and how an open source software he’s been decimating all his free time is trying to solve.

                                      I find both the list of issues interesting and the attempt to fix them useful. Even if it feels like self-plug, I always learn from his posts (thanks for that @andyc btw).

                                      Some other people on Lobsters are always posting about how their favorite software is solving some issues. Since they aren’t the creator of the software, less people notice it and nobody seems to complain about that.

                                      1. 14

                                        It is for me. I constantly see posts from the dev (comments too) to the point where it feels like spam.

                                        On top of that, I’m constantly seeing very stuck up views about “fixing” issues with other languages and shells or making this “better”. Those are very subjective things, “better” and “fixing” are nowhere near the right words.

                                        1. 16

                                          The original post claims that these are problems, and I agree. If you disagree, then writing a top-level comment about it would be a useful contribution.

                                          Writing a disagreement to Oil is also useful – in fact that’s why I post the message, so people can disagree and the shell can become better. I explicitly ask for feedback.

                                          On the other hand, vague disagreements about “spam” aren’t useful.

                                          1. 9

                                            Allegations of spam can be useful if you reflect on them. These allegations are constructive criticism, not of your project itself but of the optics you’re giving it, which are also important for adoption.

                                            Here’s my anecdote. I looked at Oil shell a long time ago, decided that it wasn’t for me on so many levels that I didn’t even see a point in arguing with you. After that, I constantly saw your comments about your shell hijacking threads about shell scripting with self-promotions. After some point, I stopped reading comments authored by you altogether, as I expected them by default to contain some rehash of how you do error handling, or data structures, or whatnot, which I already knew about, having tried your shell and having read some earlier rehash. So, in a way, I react to your comments in the same way I react to spam, by skipping them, mildly annoyed.

                                            If, on the other hand, I expected your posts to provide some information that is not yet known to any regular reader of threads about shell scripts, I would be reading them, as you do provide interesting insights from time to time. So, in a way, if you posted more rarely and succinctly, I would know more about what happens with Oil, and maybe be more inclined to look at it again. As is, I have zero interest in hearing about it.

                                            I don’t claim at all that my anecdote is representative of all the potential readers, and I don’t claim that you need to change your behavior. I’m writing this because I believe that you’re being very unfair when dismissing feedback from other users of a site that you frequent: the impression that you leave does matter to your project. And I am sure that giving you that feedback took resolve and courage, as your behavior is obviously well-intended, and thus is difficult to criticize! Just looking at number of upvotes that @Phate6660’s post has may tell you that this criticism is something to consider, not disregard as vague.

                                            1. 6

                                              Thanks for the reasoned response. Yes I do appreciate that a number of people have found some comments offputting or arrogant.

                                              I suppose my best defense is that I have been a bit “short” in comments because I have had these conversations about “shell is not suitable for X” many many times, and I am building stuff to make it suitable for X. But yes I realize being “short” does not help the situation, so I will try to change that.

                                              However I also struggle to understand what else I should do differently, since I don’t understand the feedback. I do tend to dismiss “vague” criticism and I appreciate specific criticism more. For example:

                                              I looked at Oil shell a long time ago, decided that it wasn’t for me on so many levels that I didn’t even see a point in arguing with you. After that

                                              That’s fair but I don’t understand what the problem is. What are those levels? Why? Sometimes people don’t like things, sure, but it would help to know the substance of the disagreement.

                                              Reading between the lines, my guess is: Oil is an upgrade from bash and thus full of details that seem irrelevant, and I don’t want to learn them. That is fair, though my response is:

                                              1. It would be nice for people to state this explicitly, or state what the real problem is
                                              2. This is mostly a problem of the way it’s documented now – as an upgrade from bash. It’s also intended to be a “clean slate” language for Python or JavaScript programmers, and I think it’s succeeding. As mentioned there is an upcoming Tour of Oil that will address this.

                                              So, in a way, I react to your comments in the same way I react to spam, by skipping them, mildly annoyed.

                                              To me that is fair, not everyone is interested in all content, but the site already has mechanisms for filtering that. I’m not interested in many stories about Rust, and on occasion I simply “hide” them. That’s working as intended IMO.

                                              If people don’t like my comments and stories then they won’t upvote them. And to be fair I have taken feedback from the people upvoting the complaints.

                                              I’d be interested in complaints about specific comments rather than just complaints about frequency. IMO Oil is absolutely on topic for this thread. I did not reply with generic advertisements for Oil. I read the article and replied to exactly the OP’s complaints about shell, and responded with Oil’s solutions.

                                              Likewise in other topics I often point people to and the like – I don’t mention Oil only. I spent a lot of time making the wiki page so people know about alternatives. After surveying them, I think Oil is the more realistic upgrade path from bash – which this article is about!!! – but other people might have different criteria and choose something else.

                                              So bottom line is that I will try to be less short, and respond to specific complaints. But I’m still pretty opinionated about things – that is the nature of anyone building something – and I invite disagreements with those opinions.

                                              However I don’t find the “spam” comments actionable. To me that just means I am talking about something that a particular person doesn’t care about, and that’s fine – it can be downvoted or whatever. But I think such comments are valid use of the site.

                                              If someone responds in C++ threads about Rust that can be annoying, but often it’s a valid use of the site. I draw a distinction between vague boosterism, and informed comparisons. The latter are welcome, even if repetitive. For example, I even responded with Rust in a C++ thread here, because it’s absolutely relevant:


                                              So I predict you will hear more about Oil in more threads about shell, because it is relevant. I will take specific feedback and try to be more accomodating of the people who have a disagreement with Oil. So far I don’t understand what that is besides “it seems too complex”, and as mentioned I’m working on fixing that.

                                              1. 0

                                                Oil is an upgrade from bash and thus full of details that seem irrelevant, and I don’t want to learn them.

                                                Completely missed the mark here. I already know bash, its details don’t bother me.

                                                It’s also intended to be a “clean slate” language for Python or JavaScript programmers

                                                I am neither. My main language is Haskell, with a spec of Rust, which are, in a way, polar opposites of Python and JavaScript. The main qualities that I seek in languages are simplicity, orthogonality, and hand-holding; Python, bash, and JavaScript—and, likewise, your shell—are complex, cluttered and anything-goes. I can elaborate if you want me to, but you can probably guess what input to expect from people from my crowd.

                                                However I don’t find the “spam” comments actionable.

                                                A possible way to make your comments look less spammy is to make Oil less prominent in them and instead focus on the interesting parts of the problem that it solves. You, having the domain expertise, probably have more than enough interesting quirks to share.

                                                So, instead of

                                                Oil fixes shell’s error handling

                                                it could be “Fixing the error handling in shells is difficult, which is ensured by the legacy of the current shells. Usually, when a program finishes with a non-zero error code, it means that it failed—until it doesn’t mean that. Program writers became accustomed to error codes not having an immediate effect and use the error codes for all sorts of things. A prominent example is unzip, which mysteriously returns 1 when it encounters any warnings even if they are completely benign, but also when they are not benign at all. In essence, the authors of unzip rely on you reading the stderr anyway. So, enabling the equivalent of set -e by default in a modern shell could have bewildering consequences.”

                                                or “Even the error handling that bash has is broken, as it is possible for everything to finish successfully even with set -e. Always remember to at least enable pipefail, folks, and don’t do export and = on the same line! shellcheck warns about the latter, but you can use Oil for a more thorough check of whether your scripts can potentially lose errors!”

                                                This would give specific insights and specific reasons to try out Oil, gives credibility to your opinions and, by proxy, to your shell.

                                                If someone responds in C++ threads about Rust that can be annoying

                                                It can be, and sometimes it feels spammy as well to me. It can be also formulated to be useful for every participant if they highlight the ways for C++ programmers to structure programs in a more robust way. Instead of, “this is fixed in Rust”, it should be “a good way to avoid such errors is by the following pattern; by the way, Rust enforces that you employ it”. This way, instead for attempting to sway readers to go to a different ecosystem, everyone wins, gaining knowledge and insights about the problem area.

                                          2. 6

                                            The dev, having worked in this domain for a while with expertise in shell which I would reasonably presume to be far above the average hacker’s knowledge should, for what it’s worth, be able to describe shell design features or flaws that are better or needing to be fixed respectively - following through the links, andyc always explains with examples why such feature was added, changed and such and in what ways to keep Oil shell Bash-compatible. To me that seems like a valuable contribution to any discussion on Bash.

                                          3. 6

                                            Thanks, glad you you find the posts and comments useful!

                                            The main goal is to get more feedback in Oil. Some people might disagree about what the right behavior is, and that’s the point :) I want to hear the disagreement.

                                            So far I’ve heard mostly agreement, e.g. here today, but non-vague disagreement is valuable!

                                        2. 3

                                          You always mention the upgrade path thing, but the documentation doesn’t really make obvious how this works. I understand that osh is (almost completely) bash compatible. But where does one go after changing the shebang line?

                                          Do you have a doc for that?

                                          1. 4

                                            Good question, I will write something up and post it here!

                                            It will look something like this:

                                            1. Change the shebang line as you say. This may uncover some problems (e.g. found arithmetic expression bugs when running under OSH)
                                            • You can use a bunch of features like var, const, setvar, proc now
                                            1. Add shopt --set oil:basic to the top of your program. This may uncover more problems, and it will also unlock even more new features. Probably the biggest change is quoting / simple word eval.
                                            1. 3

                                              I started a doc here:

                                              Let me know what you think! There are three steps, and they are intended to be smooth, and give you immediate benefit in exchange for the work involved.

                                              1. 1

                                                This was great! I’m vastly more likely to try osh now

                                          1. 6

                                            How is this not an advertisement?

                                            1. 10

                                              I don’t work for, nor am I in any way affiliated with System76. I’m sharing this, because the hardware and software is open source, it a beautiful mechanical keyboard, and I thought there would be interest here.

                                              1. 2

                                                So, you’re advertising for them for free.

                                                1. 4

                                                  Isn’t that an oxymoron?

                                                  1. 5

                                                    The blunter way of putting it.

                                                    A spot on the Lobsters front page is worth a lot of money.

                                                    By posting product pages, we’re reinforcing to marketers/growth hackers “hey, come peddle your wares over here!”, and further we’re normalizing discussion of what are ultimately consumer product choices.

                                                    Neither of these has good long-term effects on the community.

                                                    1. 1

                                                      Sounds good. Thanks.

                                                      1. 1

                                                        No problem!

                                                        (Sorry if I came across a little short…it seems like an uptick for me, and I’ve been trying to fight this for years now.)

                                              2. 6

                                                This way, any service that has a paid plan couldn’t be mentioned here. I think this is a valuable information, because it’s about open source hardware.

                                                1. 3

                                                  A product which can only be bought is different than something which has also a paid plan. This is product placement directly to their target audience and not many people seem to care, while at the same time running all sorts of adblockers

                                                2. 1

                                                  It is but people can’t seem to be able to admit that they too are prone of advertising products.

                                                  I think this is why we will never have any way to flag them as such, just flag as “spam” and move on.

                                                1. 0

                                                  This must be definable as advertisement, right?

                                                  1. 1

                                                    I’m curious how much of this is perhaps driven to derail screen scraping.

                                                    1. 4

                                                      I’m scratching my head here. Do people actually screen-scrape Google Docs?

                                                      1. 3

                                                        Even if they did, why would Google want to disable this? Are there docs out there being accessed by thousands of bots at the same time?

                                                        1. 1

                                                          Answer is: probably

                                                      2. 4

                                                        Or adblocking.

                                                        1. 3

                                                          I am wondering if it is to get decent performance on low-spec Chromebooks.

                                                          1. 1

                                                            As someone who works on rich editors for the web (, this move makes complete sense for both performance and reliability. With Canvas/WebGL & a custom framework, Docs has much complete control over rendering, and render latency. They have much lower exposure to user agent differences. And, as a megacorp with infinite engineers, they can bear the much higher cost of building everything themselves.

                                                          1. 2

                                                            Gimme power to filter them all out! I support this new tag!

                                                            1. 4

                                                              Just a reminder: tags are exclusive, not inclusive. In general, the fewer the better.

                                                              1. 2

                                                                I think the more the better. If a post is also about something I don’t care, I’d love it to be to filtered.

                                                              1. 24

                                                                Is a full blockchain and contract engine really necessary for this? Trying to understand.

                                                                1. 6

                                                                  It’s probably a hackthon idea about blockchain/contracts that has been continued without much research on the customers.

                                                                  Good on them to open source it though :)

                                                                1. 2

                                                                  Such a great writeup, it almost makes me wish I needed something like that just for the pleasure of hacking it 😂

                                                                  1. 1

                                                                    If the divisor is a constant, just precalculate the inverse (1/n) and then multiply instead. Helps when you are doing it multiple times per seconds (games, simulations, camera stuff, etc.)