1.  

    Also in the “weird messaging” department, this comment on preemptible goroutines:

    [Programs that use syscall] will see more slow system calls fail with EINTR errors. Those programs will have to handle those errors in some way…

    I’m assuming this change didn’t break compatibility, so this means those programs should already be handling those errors, but getting EINTR on “more” of them may reveal bugs. Or is it saying you’ll get EINTR where you never could before? That “more” is confusing.

    1.  

      I think it’s an error code that you already should be handling, but programs may be assuming happy path on accident. Because preemption presumably uses signals to stop a goroutine on a thread you are now basically guaranteed to get occasional eintr.

      1.  

        Lots of people do not loop on EINTR, and if their syscalls are fast enough, they never run into it.

        This will create lots and lots of bugs in production code IMO. It’s unfortunate because I don’t think their API guaranteed anything else, but behavior of a popular enough API is your API, and that’s it.

      1. 8

        Reading this is like listening to a reissue of some old post-punk (say) LP and realizing how ahead of its time it was — how it was doomed to failure because listeners didn’t get it or because the band didn’t have the gear to make the sounds they heard in their heads; but how influential it was, and how it still sounds fresh.

        Like the old saying about the Velvet Underground: “only a few people listened to their music, but everyone who did started their own band.”

        NewtonScript was heavily inspired by Self, a radical streamlining of Smalltalk that introduced prototypes. JavaScript’s object model came from either NewtonScript or directly from Self. JSON came from Javascript, of course. So some aspects of the Newton data model have become ubiquitous.

        I’ve become fascinated by the Soup lately, partly through links posted here. Such a radical and necessary idea, to do away with the filesystem. To make on-disk data the same stuff as in-memory data, and structured enough to be shareable across applications. Now I find myself sketching designs for something similar. If the Newton could do it in 1994, albeit fatally hamstrung by primitive hardware, we can do it today.

        1. 4

          soups were indeed awesome. I think that many ideas from the newton were way ahead of its time and wish people would revisit them. You might enjoy Using a Prototype-based Language for User Interface:The Newton Project’s Experience (PDF) and Soups on the Newton

          1. 1

            Thanks! I read the second one a few days ago, but the paper is new to me.

            1. 1

              Do you know if any info has leaked out about the Newton OS internals? It sounds as though soups were memory-mapped, and the stored format of frames matched the in-memory format, so that NewtonScript could work directly with soup data without having to copy. I’ve been building some similar things, but I’d love to know more about how they did it.

              1. 4

                Just the papers, but I’m happy to answer questions.

                There were two different ways of storing objects: heaps and soups.

                An object in ROM or an application package was stored in the heap format (that is, the same as the runtime heap in RAM) so a direct pointer would work. With a couple of caveats…

                There were “magic pointers” for well-known ROM objects so you could build an application with, e.g., a proto slot pointing to the prototype button object, and have that work on different ROMs. Those were resolved by the object system on every reference. Application packages were stored in heap format that was divided into compressed 1k pages. The decompression process relocated the embedded pointers based on the current base address of the package.

                Soups were completely different. There was a low-level blob store that had several different implementations, notably RAM (only on the 1xx models), ROM, and NOR Flash. The latter was a transactional store and also had to handle all the crazy flash stuff about erasing pages, etc. The blob store just maintained a flat container of binary blobs, each with an opaque integer ID.

                The object store was implemented on top of the blob store interface. Each stored object had a top-level frame, which was serialized (deeply) into a compressed byte stream format (sort of like JSONB) and stored in a blob. The objects were indexed with B-trees, each node of which was a blob.

                In the heap, a stored object was represented by a “fault block” containing the store reference and ID of its serialized object. If the runtime needed to look inside a fault block, the stored object would be deserialized into heap objects. The fault block was still there but the frame get/set operations would recognize it and skip over it to the actual top-level frame. (See the swizzling paper for the general idea.)

                BTW, the heap and serialization formats are documented. The “streaming” format is nearly the same as the soup blob format. Main difference is symbols were stored separately in the soup so as not to waste space on common symbols.

          1. 6

            Author here — I already answered some questions on the orange site, and happy to answer more here if there are any.

            1. 15

              The Newton OS was based on some similar thinking to this, though not the networking part, because nobody had a network back then!

              In Newton OS you store the language-level objects (which are key/value containers kind of like JavaScript objects) directly in the not-a-filesystem object store and retrieve them (by content, not by name). Those stored objects could be executable — a function is just a simple object with a few slots, one of which is a blob of bytecode. We had some further ambitions for when the hardware got bigger that we didn’t get to realize.

              If you google for “persistent object systems” you can still see a bunch of the papers we were reading back then. It was a hot topic for a while.

              To quote my ancient overview paper:

              The object store has many advantages over a more traditional filesystem. Applications do not need to implement their own methods of translating objects between runtime form and persistent form, so they are smaller and easier to write. It is very easy for Newton applications to share data, since they all get the same high-level interface to it; we encourage developers to share their persistent data structures to foster the creation of highly cooperative applications.

              1. 4

                Thanks for reminding us of the Newton (and for your creation, NewtonScript). I really like the name for the object store… ‘soups’. I had a message pad 1000 and it was a system way ahead of its time.

                1. 2

                  I’ve read Object-Oriented Database Systems by Elisa Bertino & Lorenzo Martino (ISBN 978020162439), so I have some idea about object databases of the 90’s.

                  In Newton OS you store the language-level objects (which are key/value containers kind of like JavaScript objects) directly in the not-a-filesystem object store and retrieve them (by content, not by name). Those stored objects could be executable — a function is just a simple object with a few slots, one of which is a blob of bytecode. We had some further ambitions for when the hardware got bigger that we didn’t get to realize.

                  That sounds kinda similar to Self. I’ll have to look into that.

                  The Newton OS was based on some similar thinking to this, though not the networking part, because nobody had a network back then!

                  Didn’t Newton used Telescript for this? Edit: hah, it didn’t, sorry.

                  1. 4

                    The NewtonScript data model and language were certainly influenced by Self. The object store was probably most strongly influenced by Eliot Moss’s work at UMass (e.g., Working with Persistent Objects: To Swizzle or Not to Swizzle). There was also a lot of pondering of various single-address-space research, but we never got to the point of using it. Well, now that I think about it, we did use a variation of it (not as clever) for 3rd party application packages.

                1. 4

                  I love both computing history and weird hacks, so this article made my day.

                  it can do around 2 additions per second, which is more than I can do

                  Next time I want to throw my 2 GHz 8-core computer out the window, I’ll try to remember this.

                  1. 8

                    I didn’t expect something like this from Cadey, always seemed like a go advocate. (See also the fun hello-world compilation test with big functions.) I’ll still bet we’ll see another post about all the things that are (still) hard to get working in rust, in contrast to more mature ecosystems :)

                    1. 28

                      Expect the unexpected. I’m hitting a point in my career (and understanding of programming) where I really think that more elaborate tools are better. I gotta do a lot more with Rust to get fully up to speed on it, but so far I think it is a lot more fair to trade slower development time for more correctness.

                      1. 5

                        Nice to hear and wasn’t meant offensive. My second point was more from my own experience. Though it really depends on the use case.

                        1. 12

                          It does, but correctness is probably a lot more important than developer efficiency. At least if you don’t want to wake people like me up at 3 AM :)

                          1. 15

                            I hold a slightly different belief: correctness enables developer efficiency. In all its forms (type systems, test suits, formal proofs, module invariants, &c.), it enables developers to stop worrying about different things. The more background cycles you can free up to work on the actual problem, the more productive your developers become.

                            1. 10

                              Types both direct me towards solutions AND check my solutions, at the SAME TIME.

                              1. 8

                                I think the phrase “slow is smooth and smooth is fast” is applicable here.

                                1. 3

                                  IMO Correctness costs early, and pays off later. Maintenance is always easier the more explicit everything is, because you’re always shuffling different contexts in and out of your meat cache, and when you can’t see information in the code you’re looking at, you have to constantly stop and go hunting for it.

                                  1. 3

                                    Having coded rust for a while and used typical GC-based langs as well, I can totally see both sides. Especially when you also add the ecosystem into the mix. For some it’s faster to build stuff and also remove it fast again, the overhead to get it truly right isn’t worth it. I personally strive for the opposite but sometimes it’s really hard to sell this.

                                    1. 7

                                      I spent a lot of time looking at green tests and flames in production, and decided there had to be a better way to catch problems before they set prod on fire. Now I’m all about the types.

                                  2. 2

                                    Would be interesting to hear how this turns out. Most of my experience is from writing async stuff pre async/await, so I’m curious how it feels now. (Haven’t had the time to switch over my projects.)

                                2. 5

                                  I feel this, in fact I feel a take brewing but I don’t have it fully realized yet.

                                  We have this eternal tension between “developer efficiency” which usually means, maybe simplicity however you may define it or intuitiveness (also subjective of course) and lack of friction to get up and running, and correctness which means robust software that handles many error cases and can self correct in some cases… but maybe this is a false dichotomy.

                                  I am thinking of musical instruments, where in order to really express yourself it takes years of effort to become fluent technically. nobody bats an eye at this, but we all also appreciate that the easiest way to play liszt on the piano is to put a bluetooth speaker on the top of it and connect it to spotify. I’m joking, but not by much.

                                  Anyway what I’m getting at is that the sharpest tools cut the most easily, which is axiomatic and we all laugh at the C jokes, but why shouldn’t it take a lot of effort to become fluent in them?

                                  This isn’t really a well thought out take but maybe you see what I’m getting at.

                                  1. 3

                                    Be careful, nowadays your attitude that using tools properly might take years of practice is often dismissed as “gatekeeping”.

                                  2. 3

                                    What kind of stuff are you looking to make with Rust?

                                    1. 7

                                      So far I’m easing into what I know really well: chatbots and webapps. Eventually I hope to port Olin to Rust and use it as the backend for wasmcloud. I’ve started to work on something for this here, but right now it’s a very elaborate hello world :)

                                      1. 3

                                        Here’s my first real public facing one: https://printerfacts.cetacean.club Here’s the source code: https://github.com/Xe/printerfacts

                                        1. 2

                                          Very cool, looking forward to reading more about that in the future.

                                      2. 3

                                        Interesting view. How do you feel about tools like Ada Spark, Agda, and others that try even harder for correctness?

                                        1. 2

                                          I have no opinion on them because I haven’t used them yet.

                                    1. 7

                                      It’s more worth reading to the end than I expected. I was expecting to find the author touting the modernity we have, and presenting some case where everything we do and know today is better than it was.

                                      1. 11

                                        The point about I/O is important — it makes these sorts of comparisons hard to summarize (“we went to the moon with a pocket calculator!” …no). People don’t realize how much was done in hardware on the guidance computer to allow it to connect to so many sensors and maintain real-time accuracy with such limited CPU power. Nowadays one uses an overpowered general-purpose computer because it’s much cheaper to just throw excess cycles at the real-time problem.

                                      1. 24

                                        The way I remember it back in the day, open source was a flat community — if you used an open source library, you were working with everyone else who was using it. There was often a “core team” or “committers” who did some gatekeeping, but they were respected by everyone else for volunteering that effort, and it might even be a rotating position so the effort was shared amongst the users. Users were expected to understand and contribute to the code.

                                        Maybe it’s just part of the ongoing movement of the whole industry where “programming” increasingly means “wiring together libraries I don’t understand”, but the modern attitude toward open source seems to be it’s a magical endless supply of code that is assumed to work, even though there are no mechanisms to ensure that it does work except for popularity.

                                        And rather than maintenance being a shared burden, maintainers now seem to be regarded by some as “auteurs” with absolute autonomy. People are arguing there’s no social contract at all. That isn’t how it was supposed to work.

                                        1. 21

                                          It’s because back in the day open source wasn’t Open Source, it was Free Software. Free Software licensing kinda made sure that the users would give back, and scared away a lot of Corporate Consumers. Open Source adopted the ‘Business-Friendly’ philosophy of encouraging Corporate Consumers to use without having to give back. IMHO this is one of the repercussions of that approach–getting users who treat your software purely as a consumer relationship, as if they paid for it simply by using it, and have the right to demand support.

                                          1. 7

                                            Corporate Consumers not giving back is a myth. Majority of open source we use exists because of donations or direct involvement of corporations. Yes, corporations have different business incentives than non-corporate users and at times this hurts us. But if we’re not paying, we’re not entitled to anything - doesn’t matter if stuff is being worked on by volunteers or paid people.

                                            I may hate on systemd all I want but other people do depend on it and it wouldn’t exist w/o Red Hat. I may not use virtualization but a lot of virt code in Linux was developed by Microsoft. I don’t own anything Apple but if it weren’t for them (and their business incentive) LVVM wouldn’t be where it is today.

                                            It’s easy to say that we’d have comparable things without corporate involvement. We can’t verify this alternate reality but my experience indicates that things would implode pretty fast. Large projects without an oversight start diverging, become stale or simply vanish. There are very few counter examples to that and they all seem to revolve around something that’s got enough mass to build sustainable gravity. But the vast majority of things we need aren’t Linux kernel.

                                            1. 1

                                              Of course corporations sponsor projects that benefit them, but there is a long tail of projects which don’t meet their criteria and get no sponsorship, yet their maintainers still get pressured to act like they’re professional support. You’ll see plenty of issues opened by people who are clearly using the project in their business, of course with no sign of support.

                                            2. 6

                                              There was plenty of open source that wasn’t Free Software. Open source originated with things like the DECUS user group and SHARE for IBM owners. (And of course the BSD and MIT licenses originate from further examples.) But I agree — warping open source into a pseudo-consumer relationship where the consumers not only contribute no cash, but contribute nothing at all, is what has gone wrong with the system.

                                              1. 1

                                                There was plenty of open source that wasn’t Free Software

                                                What do you mean? “Open source” and “free software” refer to the same software, just like “freedom fighter” and “rebel insurgent” refer to the same people. It’s just a matter if you want to emphasise the business-friendly side of it or the freedom-side of the same software. OSI coined “open source” to be a synonym for free software.

                                                Although if you go back to the days of DECUS, using software was the same thing as writing software. There was no need to distinguish software as free or open, because that was just the way all software was. Back in the 1960s, people weren’t even sure you could copyright software any more than you could copyright mathematics.

                                                Since you bring up BSD and MIT licenses, those are free software too. A lot of people think, because the FSF wrote the GPL, that “free software” means copyleft or something. It does not. Even OpenBSD, despite how much they disagree with the FSF, call themselves free software:

                                                https://www.openbsd.org/lyrics.html#40

                                            3. 12

                                              I think Github has really changed the way we view collaborative software, and not for the better.

                                              To begin with, every repo is nested under an account, usually an individual. Sourceforge and most other forges took a different approach: the repo is the central object, and user accounts can be added or removed from the repo. Github’s makes a difference: now an individual owns the repo. It’s a bit less… communal?

                                              Then there’s the PR workflow that Github popularised. One person submits a change and everyone else comments on that change… but it’s up to the original submitter to make any amends on the PR. Everyone else just comments on the PR.

                                              This also seems a little less communal. When it used to be more common to get patches by email, the person receiving the patches would say, “thanks… oh, you made a typo here. No problem, I fixed the patch as I was applying it.” This is now unusual. Instead we tell them, during code review, you made a typo… and we have to wait for the original submitter to make the change. It’s also less communal. Now every change is owned by an individual instead of being owned by everyone.

                                              The result is that now there’s more focus and more pressure on individuals. This used to be more distributed amongst a core group, but now instead we’re concentrating the stress on individuals, who are getting tired and flaming out.

                                              1. 2

                                                GitHub does support organizations with multiple admins — nevertheless, the default is an individual, and it seems like only the most prominent repos get upgraded to an organization, so yeah, I totally see what you’re saying. If the natural expectation was to create an organization as soon as you publish a library, maybe that would be a little pressure on the norms.

                                                1. 2

                                                  In the bottom right of your PR view, there is a checkbox that says “Allow edits from maintainers”. I think that’s checked by default but I always ensure it’s checked. Then they can push to that branch of yours.

                                                  1. 1

                                                    That is besides the point as that has been added only ~3 years ago. Long after the PR workflow become dominant.

                                                    1. 4

                                                      Not intending to argue. Informing of a feature they may not know about.

                                                  2. 1

                                                    but it’s up to the original submitter to make any amends on the PR. Everyone else just comments on the PR.

                                                    GH now lets you comment with diffs that the PR author can immediately inject into their PR.

                                                1. 12

                                                  I haven’t worked with a quality focused team since ~2009, so it has nothing to do with weakness, and turning this into a moral choice that someone is making seems misplaced to me. I think it’s a capitalist choice, and yet again capitalism optimizing for nothing useful.

                                                  The worse is better theory winning is not some victory lap for C, but I believe just a part of the fact that consumers / clients have no other choices, and if they do the cost and effort of switching is almost an impossible hurdle. The idea of me switching to an iPhone or my wife switching to Android is almost an insurmountable set of unknown complexity.

                                                  1. 2

                                                    I don’t think the article really states it as a moral choice, but rather as an emergent property of software development as it is practiced.

                                                    1. 1

                                                      I’m sure there’s a philosophical name for this. It’s a practice that results in morally problematic results, despite that practice not being a deliberate moral choice. Sort of like how capitalism as currently practiced fills the ocean with microplastic garbage despite nobody making a choice to do that.

                                                      1. 5

                                                        Hot take: most “morality” is just a matter of aesthetics. Billions of people would presumably rather be alive than not existing because a non-capitalist system is grossly inefficient at developing the supporting tech and markets for mass agriculture. Other people would prefer that those folks not exist if it meant prettier beachfront property, or that their favorite fish was still alive.

                                                        Anyways, that’s well off-topic though I’m happy to continue the conversation in PMs. :)

                                                        1. 8

                                                          Just as “software development” is a pretty broad term, “capitalism” is a pretty broad term. I wouldn’t advocate eliminating capitalism any more than I would advocate eliminating software development. The “as currently practiced” is where the interesting discussion lies.

                                                        2. 3

                                                          There’s an economic name for it - externality - though economics is emphatically not philosophy.

                                                          1. 1

                                                            Sort of like how capitalism as currently practiced fills the ocean with microplastic garbage despite nobody making a choice to do that.

                                                            This is a classic False Cause logical fallacy.

                                                            Capitalism is not the cause of microplastic pollution. The production of microplastics and subsequent failure to safely dispose of microplastics is the cause of microplastic pollution.

                                                            Microplastics produced in some centrally-planned wealth-redistribution economy would be just as harmful to the environment as microplastics produced in a Capitalist economy (although the slaves in the gulags producing those microplastics would be having less of a fun time).

                                                            Further example:

                                                            • Chlorofluorocarbons were produced in Capitalist economies.
                                                            • Scientists discovered that chlorofluorocarbons are poking a hole in the ozone layer and giving a bunch of Australians skin cancer.
                                                            • People in Capitalist economies then decided that we should not allow further use of chlorofluorocarbons.
                                                            1. 3

                                                              Again, the key phrase here is not “capitalism”, but “as currently practiced”. Capitalism doesn’t cause microplastics, but it doesn’t stop them either. In other words microplastics are “an emergent property of capitalism as it is practiced”. You could practice it differently and not produce microplastics, but apparently the feedback mechanism between the bad result (microplastics/bloated software) and the choices (using huge amounts of disposable plastics/using huge amounts of software abstractions) is not sufficient to produce a better result. (Of course assuming one thinks the result is bad to begin with.)

                                                              1. 0

                                                                Of course assuming one thinks the result is bad to begin with.

                                                                That is really the heart of the matter, as far as I see it. In contemporary discourse, capitalism as a values system (versus capitalism as a set of observations about markets) does not have a peer, does not have a countervailing force.

                                                                I’m sure there’s a philosophical name for this

                                                                @leeg brought this up as well, but “negative externality” is in the ballpark of what you are looking for . An externality is simply some effect on a third party, and whose value is not accounted for within the system. Environmental pollution is a great example of a negative externality. Many current market structures do not penalize pollution at a level commensurate with the damage caused to other parties. Education is an example of a positive externality: the teachers and administrators in schools rarely achieve a monetary reward commensurate with the long-term societal and economic impact of the education they have provided.

                                                                Societies attempt to counteract these externalities by some degree of magnitude (regulations and fines for pollution, tax exemptions for education), and much ink is spilled in policy debates as to whether or not the magnitudes are appropriate.

                                                                Bring back in my first statement, that capitalism (née economic impact) is not only values system, but is the only system that is assumed to be shared in contemporary discourse. This results in a lot of roundabout arguments, in pursuit of other values, being made in economic terms.

                                                                What people really wish to convey, what really motivates people, may be something else. However, they cannot rely on those values being shared, and resort to squishy, centrist, technocratic studies and statistics that hide their actual values, in hopes other people will at least share in the appeal to this-or-that economic indicator (GDP, CPI, measures of inequality, home ownership rates, savings rates, debt levels, trade imbalances, unemployment, et cetera). This technocratic discussion fails to resolve the actual difference in values, and causes conflict-averse people to tune it out entirely, thus accepting the status quo (“capitalism”). I lament this, despite being very centrist and technocratically-inclined myself.

                                                                Rambling further would eclipse the scope of what is appropriate for a post on Lobsters, so I will chuck it your way in a DM.

                                                                1. -1

                                                                  Capitalism doesn’t cause microplastics, but it doesn’t stop them either.

                                                                  I’m not sure I understand what you’re trying to say here. How is Capitalism related to the production of microplastics? Are you saying that in a better form of Capitalism, the price of the the externality of microplastic pollution would be costed into its production, thus making microplastics not financially viable?

                                                                  I’m also not sure microplastic pollution is strongly analogous to bloated software.

                                                                  1. 3

                                                                    I apparently chose an explosive analogy here, and now I’m fascinated by all the stuff that’s coming back.

                                                                    But let me just try again with something less loaded…how about transportation?

                                                                    The bad effects in the essay (wasted resources, bugs, slowness, inelegance) are a result of how we do software development. Assume for argument that most people don’t choose waste, bugs, slowness, and inelegance deliberately. Nevertheless, that’s what we get. It’s an “emergent property” of all the little choices of how we do it.

                                                                    Similarly, most people—I hope certainly the engineers involved—don’t choose to have the NOx pollution, two-hour commutes, suburban sprawl, unwalkable communities, and visual blight that result from how we do transportation. It just happens because of how we do it.

                                                                    So we’re all actively participating in making choices that cause an outcome that a lot of participants don’t like.

                                                                    My point was just that there are lots of things like this, not just software development. So I figure this sort of problem must have a name.

                                                                    (And yes, this means writing an essay about how awful the result is doesn’t do anything to fix it, because the feedback from result to cause is very weak.)

                                                                    1. 2

                                                                      So I figure this sort of problem must have a name.

                                                                      Engineering. Engineering is trading off short commutes for private land. Engineering is a system of cars that get every individual acting alone where they need to go, even though getting all people at the same destinations from the same origin really calls for mass transit. Engineering is families with kids making different living and thus commuting arrangements than single people. These are all tradeoffs.

                                                                      The ideal keyboard takes no space and has a key for everything you want to type from letters to paragraphs. Everything else is engineering. The ideal city has zero school, work, leisure, and shopping commutes for everybody. What we have instead is engineering.

                                                                      The ideal bus line goes to every possible destination and stops there. It also takes no time to complete a full circuit. We compromise, and instead have buses that work for some cities and really don’t for others.

                                                        1. 5

                                                          These retrospectives on evolving and ageing languages make good case studies. My personal takeaway: if you could write a piece of syntax as easily as any other library, all of these syntax tweaks and additions would become complete non-issues. It would eliminate reams and reams of bikeshedding in the issue tracker if you could just do import syntax/flipflop.

                                                          1. 3

                                                            Every Ruby project potentially having slightly different syntax sounds like a nightmare to me.

                                                            1. 4

                                                              Not trying to be glib, but… DSLs?

                                                              1. 2

                                                                DSL’s built on Ruby all follow the same syntax though.

                                                                I suppose there might be a few out there where Ruby is outright parsing some other text, but those are mercifully rare.

                                                                1. 2

                                                                  But a DSL has a different syntax to vanilla Ruby, because otherwise it would be a regular library, not a DSL.

                                                                  Is syntax sugar like a new sigil or infix operator (which is what most of these are) really that different to a DSL? Fundamentally, I mean, not just in that one of them uses tokens and the other uses characters. You have to learn something new the first time you encounter a new DSL exactly the same as you would for a new character syntax. Having been knee-deep in this kind of stuff for a few months now, I’m seeing less and less of a distinction.

                                                                  1. 6

                                                                    There aren’t any real Ruby DSLs. Ruby programmers just oddly refer to class methods called at the top level without parentheses as “DSLs” (or, more rarely, instance methods called without parentheses in what other languages would call a “builder pattern”).

                                                                    Ruby doesn’t support macros or other syntax-level features that would enable an actual DSL.

                                                                    1. 2

                                                                      I know, they’re technically only eDSLs, but my point remains. All syntax changes are the same. They could have added real DSLs (edit: you know, “just add this massive feature” :) and never had to decide between @1 and _1.

                                                                      1. 1

                                                                        They’re DSLs in the sense that any library API is a DSL, and in this respect I think Ruby does DSLs a lot better than other languages with “real” DSLs. APIs can be (almost) as expressive as real DSLs and they’re still using normal language syntax and semantics. Lisp is definitely more expressive and it’s still technically using the same syntax, but the semantics can vary wildly.

                                                                2. 2

                                                                  Until you realise that less powerful languages have the same problem - except their abstractions aren’t expressed in a clear DSL courtesy Ruby or Lisp metaprogramming, they’re splattered throughout the application in AbstractFactoryFactories and FooUtility classes.

                                                                3. 2

                                                                  In Lisp we trust! ;-)

                                                                1. 24

                                                                  Not sure I agree that an App Store is a requirement for a platform. Game consoles existed for a long time before App Stores became a thing, and I certainly would consider them “platforms”.

                                                                  1. 6

                                                                    I don’t ever use the App Store on Mac or Windows and I seem to have a perfectly functional environment. They didn’t even have stores until just a few years ago. So I agree, I don’t see how this is a requirement.

                                                                    I think the actual requirement is the ability to package up an application into a downloadable installer that’s guaranteed to work.

                                                                    1. 8

                                                                      I can’t think of a major game console released this decade that doesn’t have an App Store, so I’m not sure this argument holds as much water as it might have.

                                                                      IMO an App Store is just a package manager that takes payments.

                                                                      I definitely want a package manager, and I don’t mind paying for software, so I tend to appreciate having one.

                                                                      1. 10

                                                                        released this decade

                                                                        Why does that even matter? The PlayStation 2 is still a platform. The Wii didn’t need Internet access. People have already pointed out F-droid. Linux distributions allow you to add 3rd party repositories or overlays. Play/AppStore do not.

                                                                        Modern platforms should be able to run and operate if their underlying service go away. They currently cannot, and that’s a big problem.

                                                                        1. 2

                                                                          “Released this decade” is relevant because it speaks to current consumer expectations.

                                                                          RE “underlying service going away”: Once I buy/install a game on the switch, AFAIK it will never need connectivity again.

                                                                          1. 1

                                                                            Current consumer expectations don’t always involve an app store. People in a corporate environment that use Windows don’t expect an app store, especially if their environment is still windows 7. Yours is a narrow-minded view of the idea behind calling something a platform. User expectations don’t go so far as to assume some kind of central store for apps.

                                                                        2. 1

                                                                          While not GNU/Linux, LineageOS + F-droid is a functional platform that doesn’t have an ‘app store’ that takes payments. It (F-droid) does encourage donations to projects it distributes, but I still think defining a platform on the requirement that it includes an ‘app store’ that takes payments is not correct.

                                                                          The article doesn’t actually define what exactly they mean by ‘app store’ though (package manager vs package manager that can charge you).

                                                                          1. 3

                                                                            LineageOS + F-droid

                                                                            Off topic, but can you recommend something from F-droid? I recently switched from using iOS for years to buying a refurbished android phone and throwing LineageOS + mindthegapps + f-droid on it. I have installed most of the apps I use from the play store, a few from direct download from websites, and only a single one from f-droid: Material Files which works very well. I haven’t yet found any of the things I need (spotify, mullvad, firefox …) in the f-droid app, and yeah, any recommendations for free libre apps on f-droid that can replace things I might be using from play store? I know about the firefox fork that’s more open, but other than that?

                                                                            1. 4

                                                                              Really depends what you want.

                                                                              • Amaze is a nice file manager
                                                                              • BeHe keyboard is a slightly more tech-y keyboard app, which doesn’t send everything you type to an AI somewhere
                                                                              • K-9 Mail for non-gmail email client
                                                                              • Syncthing is a decent non-dropbox file sync
                                                                              • VLC for video playing

                                                                              What I haven’t found yet is a good, general-purpose music player that lets me work with actual files instead of assuming everything’s in albums the way iTunes does. If anyone has suggestions…

                                                                              1. 2

                                                                                I really like Vanilla Music, but I do have everything tagged correctly and am fine with the Album/Artist view. It does have a file tab, but it’s probably not as full-blown as you’re looking for :(

                                                                                1. 1

                                                                                  Thank you, I’ll check your suggestions out!

                                                                                2. 4

                                                                                  We had a whole thread about it.

                                                                                  1. 1

                                                                                    Thank you!

                                                                                  2. 2

                                                                                    spotify

                                                                                    I haven’t tried this, but this app claims to be capable of fetching and updating Spotify.. I’m not aware of any pure FOSS client that can interact reliably with this proprietary service.

                                                                                    mullvad

                                                                                    I’ve never heard of this so I had to search. If you are referring to the VPN service, they seem to use Wireguard, so unless they are doing something super crazy it seems like you should be able to use the Wireguard client on F-droid..

                                                                                    firefox

                                                                                    fennec, which is literally just Firefox without any proprietary bits or Mozilla branding.

                                                                              2. 3

                                                                                I would call the Windows app store pretty much a failure, too.

                                                                                1. 1

                                                                                  I have not personally used it, but from what friends and colleagues have told me, it does sound like a tire fire.

                                                                                2. 2

                                                                                  The NES might not have had an Internet connection to browse and download new games, but it definitely had a specific place to go to find new content (toy stores), which was heavily curated and managed by the platform owner, and which charged developers to participate. And every game console ever since has followed the same basic business model.

                                                                                  1. 2

                                                                                    Back then you had actual, physical app stores, e.g. Gamestop.

                                                                                    1. 1

                                                                                      Presumably they just mean “an easy way for users to discover and install new programs, and for developers to publish them”.

                                                                                      A package manager is a building block for such a thing, but it currently isn’t very easy for desktop users to add new repositories, which makes it harder to install new software. And having to manually add these is extra effort. Of course, that’s a tradeoff: I wouldn’t want random developers to be able to ship their crap to me (which is what the app stores basically boil down to, as much as Apple and Google try to pretend these things are curated, they’re not; they just try to keep the worst offenders out).

                                                                                      On the other hand, quality of officially packaged software in Debian or Ubuntu really varies a lot, as well. But at least it’s all free software.

                                                                                    1. 1

                                                                                      it’s easier to read as the method is now shorter

                                                                                      That’s a non-sequitur. Depending on the method, I find it easier to read when the details are all inline and I don’t have to jump around the file to understand what’s happening. If the sub-step is complicated, then OK, factor it out — ideally into a nested function so it’s obvious nothing else calls it, if your language can do that — but a three-line method like this does not qualify.

                                                                                      In this case, I’d just delete those comments and leave the code alone. Three consecutive lines setting properties of a table view need neither a “set up the table view” comment nor a method. Just a code paragraph is fine.

                                                                                      1. 2

                                                                                        At my employer we have an Elasticsearch cluster that we’re always trying to make perform faster. My gut feeling is the biggest gains come from optimizing queries, then application settings, then maybe JVM settings, and that tuning Linux is down the bottom. But I’ve never actually tried to tune Linux.

                                                                                        What kind of difference can tuning Linux make for the performance of an application?

                                                                                        1. 5

                                                                                          It depends on the application’s characteristics, but you can often get significant improvements by simple changes to the default networking and disk parameters (e.g., picking a more appropriate disk scheduler algorithm for the workload). It’s worth taking a look at for a high intensity specialized workload like a load balancer, database, or storage server.

                                                                                          1. 3

                                                                                            Cool, I didn’t even know there were different disk schedulers to choose from. I’ll have to do a bit of research 😀

                                                                                        1. 4

                                                                                          Python 3 was released in 2008. Python 3.4, which most people consider the python 3 release worth using, was released in mid-2014.

                                                                                          By either measurement, Calibre devs failed to port to Python 3 for over 11 years at worst and 5 years at best.

                                                                                          It’s irresponsible to even let such a package into the package indices if they can’t even heed the obvious writing on the wall that screams in blood red paint to port to Python 3 or else.

                                                                                          I honestly don’t know why people hold onto it so hard when the developers have completely failed to dig their heads out of the sand until the very edge of 2020. Perhaps they should give up and drop the project, considering the time to test the plugin system was over three years ago.

                                                                                          1. 8

                                                                                            If I understood this correctly, it’s Calibre plugin devs who haven’t ported to Python 3. But the post makes no reference to a plan or status of getting those plugins ported. If the plugins are so important that Calibre can’t be released without them, perhaps they shouldn’t be plugins?

                                                                                            1. 5

                                                                                              Calibre dragged their feet for so long on porting to Python 3 that it looks relatively recent where one can try to port a plugin to python 3.

                                                                                              They basically had an ecosystem and a responsibility to be ahead of the curve. They did the opposite of good stewardship - plugin devs need time to update to the new runtime and the poor practices of the Calibre project has left any plugin developer with less than a year to update their code.

                                                                                              That’s not very reasonable and should be a source of condemnation for the Calibre project (the plugin devs did nothing wrong from what I can tell - they didn’t have a Python 3 Calibre for quite a long time to test with).

                                                                                              1. 6

                                                                                                I didn’t say it very well, but yes — saying that Calibre has ported and it’s now the fault of the plugin devs that it’s falling out of Debian is rather misleading. Either giving the plugin devs more time to port or treating the important plugins as part of Calibre and porting them at the same time would have made more sense.

                                                                                          1. 6

                                                                                            Seven years later, the lack of GNU software isn’t something I’ve noticed that Mac users complain about. Or even developers. I’ve noticed that developers complain about the touch bar, yes. About the lack of an ESC key. But about having to make do with tmux instead of screen? I definitely hadn’t noticed that.

                                                                                            I suppose this really means that the FSF doesn’t have great software to advance its cause any more.

                                                                                            1. 9

                                                                                              The only one I’ve seen is complaining about an outdated bash. Apple switched the default shell to zsh this year which will help there.

                                                                                              1. 4

                                                                                                The old buggy rsync is another problem. I wish they’d just drop the pretense of shipping a useful unixy userland.

                                                                                                1. 6

                                                                                                  One step toward this: they’re removing the out-of-date Python, Ruby, and Perl.

                                                                                                  Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app.

                                                                                              2. 5

                                                                                                Lots of alternative software these days is very available to install via things like homebrew, pkgsrc, macports, nix, etc. Historically, I recall bundled software being much more important as internet pipes were tiny (or nonexistent!), and sidecar packaging systems (if they existed) were more immature/buggy. In fact, many of the BSDs still include “kitchen sink” base systems with tons of seldom used tools. A few of the BSDs (OpenBSD is an example), do make it a point to at least remove (and/or move it into ports) some of the old base system stuff that isn’t much used anymore.

                                                                                                1. 3

                                                                                                  I see someone flagged this as trolling. It’s not. Obtuse, perhaps.

                                                                                                  The GPL’s viral nature depends on the compelling (or at least attractive) nature of the existing GPL’d software. I think (I’ll be happy to hear any arguments to the contrary) that exactly one of these is true:

                                                                                                  • The GPL’d software is good enough that developers complain if it’s removed from an OS.
                                                                                                  • The GPL’d software is not good enough to help the FSF’s cause.

                                                                                                  That blog posting was written in 2012; my reaction when I read it now, seven years later, is surprise, because I haven’t heard protests. Developers are usually quick to complain when something sucks. With seven years hindsight the first possibility seems not to be the case, so I infer that the second possibility is what’s true.

                                                                                                  I’m eager to hear any arguments that developers have protested and I not noticed, or that there’s a third alternative, or, or, or.

                                                                                                  1. 2

                                                                                                    It’s kinds sad really. I do believe in the FSF and GPL and even GPLv3. I think many of the great ideas behind the FSF/GPL have pretty much been lost today. Open source is all about middleware today .. use our middle wear so you can build apps around our (Facebook, Google, Microsoft, Amazon) systems. We don’t have a lot of good FOSS end-apps. There’s Firefox and Darktable and Libreoffice I guess, but Gimp never eclipsed Photoshop and you’re more likely to see Mac users in a coffee shop than Linux laptops.

                                                                                                  1. 0

                                                                                                    I bet everyone at M$ have two displays, one with Windows one with Linux. The latter one prescribed by a psychlogist to calm down the nerves.

                                                                                                    1. 2

                                                                                                      That possibility got shut down after they were humiliated for doing something like that when pushing Windows NT on everyone else. The first is a story IBM pushed that Microsoft ran their whole business on one or more AS/400’s that took 20 to 1500 Windows servers to replace reliably. Free links are gone due to Google’s new priorities. The second was that their newly-acquired Hotmail was running the more reliable FreeBSD and Apache. They converted that to Windows.

                                                                                                      So, no, the employees will continue to use Windows despite psychologists’ prescriptions. Microsoft won’t be humiliated again. Wait, did someone say Windows Mobile and Chrome? Hehe.

                                                                                                      1. 2

                                                                                                        I know the father of the founder of Hotmail (his son hired him :) ) from a previous job, and got a tour of their Exodus colocation space shortly after they were acquired by Microsoft. Their infrastructure was made by repeating a cookie-cutter “capital unit” of one big Sun Enterprise 10000 (?) server for file storage and a bunch of white-box PCs made by a local company and running FreeBSD for the front end. I think the PCs were just sitting on Metro shelving or some such. They would do scripted parallel deployments (using rsync and ssh, IIRC) to the front ends for app updates. All remarkably simple and straightforward.

                                                                                                        Of course we all knew Microsoft would make them convert to Windows and what an unimaginable pain that would be. I don’t think Windows even had a way to configure the web server without using the GUI at the time, much less reconfigure a thousand web servers simultaneously with a script! But I trust the Windows NT folks learned a lot about the reality of internet application servers from the experience, which was the idea.

                                                                                                    1. 10

                                                                                                      Classic Microsoft to think that the fix for “G is preventing you from shutting down” is to give the correct full name, “GDI+ Window (something.exe) is preventing you from shutting down”. Yeah, that’s so much more user-friendly and actionable.

                                                                                                      1. 3

                                                                                                        What are they supposed to do?

                                                                                                        Anyway… do we both agree that something.exe is the part of the system with the bug? Or are you questioning the premise and saying that the OS shouldn’t allow arbitrary applications to prevent Windows from shutting down?

                                                                                                        1. 12

                                                                                                          If you’re going to display a message to the user, and especially if you’re asking a question, you need to make sure the message makes sense to a user. Saying gibberish like “GDI+ Window” is worse than saying nothing. And the “GDI+ Window” isn’t some unknown thing an application made up – it’s part of Windows itself – so there’s no excuse for the random jargon.

                                                                                                          The way this happens is that someone implemented the “ask the user if it’s OK to kill an application” feature in isolation and had no authority or ability to do any better than this, both because the organization does not prioritize fixing this basic level of user model and interaction, and because the system is so complex and fragile that even if it did there wouldn’t be much hope of doing much better.

                                                                                                          That said, in this specific case, it’s sad they don’t at least recognize this is a low-level implementation detail window, and special-case it to reach into the app resources to find a human-readable name, and just ask if you want to kill “Contoso Whatever Application” instead of saying this.

                                                                                                          So, as I say, classic Microsoft. (I worked there, mostly in Windows user experience, for 11 years.)

                                                                                                          1. 3

                                                                                                            I completely agree with you. Reaching into the application for a useful name would have been better. Frankly, it doesn’t make much sense to show the name of an invisible window to the user in any case; it’s invisible for a reason. Hopefully, the application has a useful name where it is going to look.

                                                                                                            The fact that it has something.exe is definitely an improvement on what it was doing before (“G” is so useless even Microsoft’s engineers had no idea what it meant), and there are probably other places in the system where the name of an invisible window shows up, which would probably be useful. So the actual “GDI+” bug was probably still worth fixing.

                                                                                                            1. 2

                                                                                                              The special casing probably makes sense.

                                                                                                              I disagree that showing nothing is better than showing a name that is cryptic to most. A specific name can be searched for, Windows hanging for no apparent reason whatsoever can have many causes.

                                                                                                              The name is also easier to remember and then pattern associate with a problem by the human brain than an error number.

                                                                                                              1. 2

                                                                                                                “Get a searchable name for the problem” is such a low bar. The bar should be set at not having to search. macOS has something roughly like this:

                                                                                                                “Contoso app is preventing system from shutting down. [ Force quit the app ] [ Cancel shutdown ]”

                                                                                                        1. 9

                                                                                                          This absolutely accords with my experiences in two tours at Apple (iTunes and Maps). Their business and the scope of their ambitions has significantly exceeded their existing cultural practices. Small teams; the secrecy; and the culture of information-as-leverage are three examples of practices that are basically maladaptive to the very different company Apple is now.

                                                                                                          1. 5

                                                                                                            iTunes! Truly the belly of the beast (not being sarcastic, reformed Apple folks will understand). I can’t agree more. I was in Product Security (only as a summer intern), which was quite a vantage point from which to view most of the bugs in or out of a release, which ones were security-relevant, and which were snatched up and moved into some secret division by the powers that be.

                                                                                                            1. 7

                                                                                                              I wrote the video processing pipeline that fed (and may still be feeding) the iTunes Store. It was a hell of a thing.

                                                                                                              1. 3

                                                                                                                I’ve always wondered how it feels to know that you wrote something that literally millions of people use every day.

                                                                                                                1. 26

                                                                                                                  So, here’s an anecdote. The initial video pipeline was a series of python scripts driving C and C++ code, that used a single large filesystem to take the provider mezzanine formatted video sources (either files from their post houses, or tape captures we did internally), and walk them through the processing graph. It was clunky, but Apple runs their teams small, and we had a hard deadline, when His Nibs was going to get up on stage and announce the product.

                                                                                                                  Like, we ran our processing on Powermac G5s, in a machine room next to my office. We got a shipment of them, imaged them up, and then my boss and I went over to on-site support and asked for RAM for a G5 – they said, “how much do you need?” and my boss said, “all of it.” We Froggered back across DeAnza with two backpacks full of RAM modules worth hundreds of thousands of dollars at Apple’s rates. As I said, we had a hard deadline.

                                                                                                                  So this got us through launch (“51 movies rounds up to 100!”), and while we were rebuilding the workflow management parts of the system to match the increasing volume of incoming assets, one of my jobs was to keep track of the highest priority transcodes and make sure that a) they were good enough to sell and b) they met our SLAs with the various providers. Our largest property was “The Suite Life Of Zach and Cody”, a Disney Channel tween thing, and so I’d be around when it became available to guarantee, for instance, that the MPEG-2 didn’t have bogus frames that would stall out the hacked DVD player we were using to convert the transport streams to something QuickTime could ingest natively. Like I said, it was a high-pressure hack job.

                                                                                                                  One night, I shepherded the latest “Suite Life” through the system, logged out of the VPN, and went to bed. The next morning, before I was fully awake, I got a call from my grandboss, who asked me, in his inimitable French way, what exactly the fuck was happening?

                                                                                                                  I opened the client, and saw hundreds of reviews of this latest episode, that were uniformly negative: “what is this where is Zach” or “grossssssssss” or “I didn’t buy this what’s happening?”. I logged in and checked the file – it was about 22 minutes in size, parsed fine, what’s the issue? I got to work, and my grandboss’ boss called me in to his office, and turned his computer around. Where “The Suite Life” was supposed to be was instead an episode of an R-rated animated sitcom called “Drawn Together”, that prominently featured coprophagy and strongly implied beastiality.

                                                                                                                  He had gotten the call from Steve who had gotten the call from his peer at Disney; to their credit, my management ran a post-mortem, after I found the right file, which I had (of course) fat-fingered the ID of. But that was the kind of thing that kept me up at nights.

                                                                                                                  1. 7

                                                                                                                    the hacked DVD player we were using to convert the transport streams to something QuickTime could ingest natively (don’t ask).

                                                                                                                    Oh, come on, you can’t “don’t ask” us on something like that.

                                                                                                                    1. 9

                                                                                                                      At the time, we didn’t have access to any software that passed legal muster to convert MPEG-2 data into anything else. So the DVD player team gave us a build that would read the MPEG-2 streams and play them back, but would also tee both the raw 420 YUV frames and the uncompressed audio to disk. It was glorious/horrible.

                                                                                                                      ETA we weren’t ripping DVDs, but rather, using the DVD player engine to read files off of disk.

                                                                                                                      1. 2

                                                                                                                        Given how elaborately hacky it all sounded, upon hearing “hacked DVD player” I’d half-expected that a hacked hardware DVD player was somehow involved.

                                                                                                                        1. 3

                                                                                                                          We were Not Allowed, because of legal, but I had a build of Handbrake that outputted ProRes for transcoding. Also, DVDs make for terrible mezzanine files. It was all over the place, man. We had a Pelican case with a custom foam interior for moving Xserve RAID disk sets around. All kinds of insane analog video analysis gear, bought in a panic.

                                                                                                                    2. 2

                                                                                                                      This is gold. Also, my name is Zach and my brother’s name is Cody (we predate the show). I’m sorry we gave you so much trouble lol

                                                                                                                    3. 11

                                                                                                                      Been there. Feels kinda bad when there’s an outage and you know what you should have done differently to not disappoint a million people a minute. (And it’s even more frustrating when you already knew what to do better, but feature work was prioritized ahead of it. But that’s above my pay grade, as it were.)

                                                                                                                      I mostly don’t get a sense of pride seeing the stuff in use. I’m too familiar with it. But I’ll tell you what’s a real rush for me: Migrating traffic from an old system to a newly written one and watching the metrics as thousands of requests per second start showing up on the new one and drain off of the old one, without anyone on the outside knowing what’s happening. It’s kind of like if you swapped out the engines on an aircraft in flight. That’s pretty cool.

                                                                                                                      1. 2

                                                                                                                        You get queasy when you think about how overloaded your QA people were?

                                                                                                                        1. 2

                                                                                                                          Not millions, but a corollary was that a document that I wrote that outlined what Apple’s preferred mezzanine formats were, along with the rationale for them, was copied and redistributed by Amazon as their requirements. I sort of want to meet someone who was at Amazon then and see if some of my more, uh, idiosyncratic? requirements caused them as much trouble as it caused us.

                                                                                                                    4. 3

                                                                                                                      Based on my experiences at Apple and Microsoft, this is just standard practice for giant mass-market software projects. The “closed, not a regression” thing used to drive me crazy at Microsoft. It makes no sense whatsoever!

                                                                                                                    1. 3

                                                                                                                      I didn’t understand any of the jargon related to that monad stuff, but I think I sort of got the idea - you have a structure which knows if the character before it was a space and if the character was a space, and given that info and a chunk of text, you can correctly word count. That’s pretty neat (though a struct counts countChunk(FILE *f, size_t chunklen, bool leftIsSpace) could accomplish the same job without all those monads and semigroups and whatnot).

                                                                                                                      In practice, this haskell wc utility doesn’t make much sense for a bunch of reasons (slower per core than C, wc is usually used in a pipeline which means using more cores takes CPU time away from the other tools in the pipeline, GNU wc might still be faster, etc), but I don’t think the idea behind this post was that we all should switch to the author’s re-implemented wc for our word counting needs.

                                                                                                                      My take-aways from this post is that you can get close to C in haskell if you just know how the language and runtime works, and that the formal mental models and fearless concurrency means it’s easier to take advantage of multiple cores for problems which may actually need it (even if it doesn’t make sense for wc).

                                                                                                                      It would be really interesting to test this against GNU wc on my machines, but the author doesn’t seem to have uploaded the complete source code anywhere, and I don’t know haskell nearly well enough to be able to reconstruct it from the snippets in the post.

                                                                                                                      1. 5

                                                                                                                        The word is “monoid”: wikipedia.

                                                                                                                        1. -10

                                                                                                                          Sure, I don’t particularly care about category theory bullshit. A monad is just a monoid in the category of endofunctors anyways.

                                                                                                                        2. 3

                                                                                                                          though a struct could accomplish the same job

                                                                                                                          That struct is a monoid whether or not you know what that means. But as the post relates, if you do know what it means, you’re more likely to realize you need that struct.

                                                                                                                          1. 1

                                                                                                                            It’s just a function which returns a struct counts. You may be right that it’s a monoid, but could you explain why? I just see it as a function which takes a file stream and options and returns some stats. According to the Wikipedia page, “a monoid is an algebraic structure with a single associative binary operation and an identity element. “; I don’t see how my function is an algebraic structure, I don’t see how it has a single associative binary operation, and I don’t see how it has an identity element?

                                                                                                                            1. 3

                                                                                                                              countChunk isn’t enough — you also need combineChunks. That, plus an “empty” chunk, is what makes it a monoid. (Empty chunk = identity element, combineChunks = associative binary operation.)

                                                                                                                              He defined an “empty” chunk called Unknown, and a function flux that turns a character into a chunk. He also defined a function <> that combines two chunks. That combination of things makes it a monoid and gives you a way to get characters into it.

                                                                                                                              Once you’ve defined how to combine chunks, and how to turn a character into a chunk, you know how to turn a stream of characters into a chunk, or (as he did) break a file full of characters into pieces, turn each piece into a chunk, and combine those chunks into a final chunk.

                                                                                                                              The nice thing about thinking of it as a monoid is that any code you have to divide up work (and perhaps do it concurrently) will automatically work on your monoid, because all that code will depend on is the ability to make [whatevers] and combine two [whatevers] into another [whatever] (i.e., the definition of Monoid). (In this case, said code the combination of fold and forConcurrently that breaks up the work across the cores.)

                                                                                                                              And my point was that knowing such code for dividing up work exists is what will prompt you to implement this counting operation as a monoid in the first place — which it can’t, if you don’t know what a monoid is.

                                                                                                                              In any other language you might have the clever idea of recursively dividing the text into chunks and combining them back together — but you don’t have to be that clever if you’re accustomed to using monoids regularly.

                                                                                                                          2. 3

                                                                                                                            Your proposed “struct” based solution probably is a monoid.

                                                                                                                          1. 5

                                                                                                                            Beautiful work. This kind of hobby project is so pure. I wonder if the dev is going for full POSIX compliance.

                                                                                                                            Semi-related quote:

                                                                                                                            Computer science would have progressed much further and faster if all of the time and effort that has been spent maintaining and nurturing Unix had been spent on a sounder operating system. We hope that one day Unix will be relinquished to the history books and museums of computer science as an interesting, albeit costly, footnote.

                                                                                                                            I love UNIX, maybe because I’m used to it, but I keep wondering what an OS building on what made *nix great without *nix grievances would be.

                                                                                                                            1. 7

                                                                                                                              I love UNIX, maybe because I’m used to it, but I keep wondering what an OS building on what made *nix great without *nix grievances would be.

                                                                                                                              This is exactly the intent of Plan 9; your mileage may vary on if it succeeds at its goals.

                                                                                                                              There are also non-Unix ways of thinking, but these were (IMHO, falsely) discredited by the sheer market and cultural powers of Unix.

                                                                                                                              1. 4

                                                                                                                                This is exactly the intent of Plan 9; your mileage may vary on if it succeeds at its goals.

                                                                                                                                I’ve tried it and it’s not for me. Plus the community is weird and unwelcoming.

                                                                                                                                There are also non-Unix ways of thinking, but these were (IMHO, falsely) discredited by the sheer market and cultural powers of Unix.

                                                                                                                                What are you referring to exactly? I’m interested in your thoughts about this.

                                                                                                                                1. 6

                                                                                                                                  I have a few non-UNIX ways of thinking in this list that you might find interesting.

                                                                                                                                  1. 3

                                                                                                                                    There is Jehanne, which started as a Plan 9 fork — you might find it interesting. The website for the project has some good write-ups as well.

                                                                                                                                    1. 3

                                                                                                                                      What a sad state of affairs. I read the pieces on the Harvey OS side of the story, that’s enough to demotivate you completely.

                                                                                                                                      1. 3

                                                                                                                                        This is an interesting read too and hopefully I’m not breaking any rules by linking it.

                                                                                                                                    2. 3

                                                                                                                                      This may give you some idea.

                                                                                                                                      https://web.mit.edu/~simsong/www/ugh.pdf

                                                                                                                                      1. 2

                                                                                                                                        I’ve read it :) the quote above is from this book.

                                                                                                                                    3. 4

                                                                                                                                      In my preferred alternate reality, VMS discredited UNIX.

                                                                                                                                      I’d still rather use VMS than UNIX today for almost any non-trivial production task.

                                                                                                                                      “One of the questions that comes up all the time is: How enthusiastic is our support for UNIX?

                                                                                                                                      “Unix was written on our machines and for our machines many years ago. Today, much of UNIX being done is done on our machines. Ten percent of our VAXs are going for UNIX use. UNIX is a simple language, easy to understand, easy to get started with. It’s great for students, great for somewhat casual users, and it’s great for interchanging programs between different machines. And so, because of its popularity in these markets, we support it. We have good UNIX on VAX and good UNIX on PDP-11s.

                                                                                                                                      “It is our belief, however, that serious professional users will run out of things they can do with UNIX. They’ll want a real system and will end up doing VMS when they get to be serious about programming.

                                                                                                                                      “With UNIX, if you’re looking for something, you can easily and quickly check that small manual and find out that it’s not there.

                                                                                                                                      With VMS, no matter what you look for – it’s literally a five-foot shelf of documentation – if you look long enough it’s there. That’s the difference – the beauty of UNIX is it’s simple; and the beauty of VMS is that it’s all there.”

                                                                                                                                      • Ken Olsen
                                                                                                                                      1. 1

                                                                                                                                        Unix was free/cheap, VMS was expensive.

                                                                                                                                        Also, what’s wrong with Windows (NT)? ;)

                                                                                                                                        1. 2

                                                                                                                                          Worse really is better, when it’s free.

                                                                                                                                          1. 1

                                                                                                                                            “Also, what’s wrong with Windows (NT)? ;)”

                                                                                                                                            It was the successor to VMS designed by the same people tweaking and improving on the same internals. So, Ken Olsen’s arguments naturally apply to it, too. ;)

                                                                                                                                        2. 2

                                                                                                                                          O3ONE was one attempt by one amateur enthusiast to build a hobbyist VMS-like rather than UNIX-like system.

                                                                                                                                          The project pages are up but it hasn’t been updated since 2004.

                                                                                                                                          It might be a fun thing to fork and work on.

                                                                                                                                          Edit: VMS became OpenVMS when they added support for POSIX system calls to their kernel and enhanced portability with “open systems”. There was the FreeVMS project, now defunct, which was working on a clone the opposite way, by adding VMS system calls and features to a POSIX/UNIX-like (Linux) kernel, and building on those to clone the standard VMS libraries and system services.

                                                                                                                                          They did have a decent DCL and SMG$ and, if I recall correctly, a working BLISS compiler.

                                                                                                                                        3. 4

                                                                                                                                          HelenOS is a very interesting portable multicore multiserver microkernel research operating system that isn’t a UNIX clone and is not built to be compatible with existing systems, though they do provide enough compatibility to support porting most C11/C++14 applications and libraries, but it’s certainly not UNIX-like.

                                                                                                                                          It’s development is driven by various academic research projects rather than a vision or roadmap, so it will likely never be a production system, but it’s interesting nonetheless to look at a modern non-UNIX design.