Threads for lorddimwit

  1. 14

    I don’t necessarily agree with the decisions GNOME has made but I give them credit for at least trying something other than cloning Windows 95 or NeXT.

    1. 1

      [Author here]

      Given that I know of precisely one clone of NeXT ever, which is GNUstep, I would be interested in what other clones you have in mind.

      As far as Linux desktop diversity goes, I wrote about this recently: https://www.theregister.com/2022/05/17/linux_desktop_feature/

      1. 1

        I was including what macOS did with NeXT, which I realize is really a descendant relationship, but I digress.

        (And, technically speaking, AfterStep is, I think, a distinct project from GNUstep and tries to clone some of the feel of NeXT from a UI/UX perspective, if not an API/application level.)

        And Elementary more-or-less clones the big features of NeXT as well.

        (And having used Windows 11 for the first time last night…well…)

        1. 1

          AfterStep does, yes, but it’s a window manager, not a desktop environment. GNUstep doesn’t even include a window manager, although it recommends Window Maker.

          I can’t offhand think of anything Elementary does that’s NeXT-like in any way. It doesn’t have Miller columns. It doesn’t have tear-off menu bars, or indeed, menu bars at all. It doesn’t have single-folder apps. It has a thing quite like a dock, if that’s what you mean, but there are dozens of those.

          I often hear it called Mac-like, but I reviewed it: https://www.theregister.com/2021/12/21/elementary_os_61/ … and my takeaway was that it has the shallowest cosmetic resemblance to macOS and nothing more.

          GNUstep is very NeXT-like. NeXTspace completes that: https://github.com/trunkmaster/nextspace

          Étoilé ( http://etoileos.com/ ) was going to deliver that – a project initiated by our fellow-Lobsters David Chisnall I believe – but AFAIK it didn’t actually get to a 1.0 release, sadly.

          I don’t know if what is there is actually amenable to being packaged up and put out as a release. I think it deserved it. It sounded very promising indeed to me.

    1. 4

      The Modos Paper laptop mentioned here recently is absolutely something I’d use for coding, though in the situation where I’d use it most I’d need to be sure I had a good light behind my head…

      But yeah, the reduction in eyestrain would be immense, I imagine.

      1. 2

        I wouldn’t like to go back to coding without coloured syntax highlighting, but I’m really enthusiastic if they can do a second-generation with colour. I also mostly care about colour for complete tokens, so if the existing colour eInk displays that can manage 1s updates could work in a non-flashing configuration where they first drew in greyscale and then filled in the colour for text then that would be very interesting (this would probably require some cooperation from the terminal emulator / text view to draw things that have changed in the last frame as black and then draw them as colour if they’ve remained stable for > 500ms or something).

      1. 6

        There is no way to modify an existing rope: all operations on a rope return a new rope.

        I wrote a bunch of stuff that worked this way. Some stuff that even got acquired! Thought it was nice and elegant. But each and every one of those systems failed once they got beyond trivial scale. You just can’t do Go like this. It thrashes the GC and can’t be made performant.

        1. 3

          The expected maximum scale here is “human typing speed on reasonably-sized text files” and thus far seems to be okay.

          1. 1

            Incidentally do you have any recommendations for things to learn how to write fast go? My recent attempts have had very mixed success - it’s easy to write code that is much slower than naive code.

              1. 1

                You, sir, are a gentleman and a scholar

          1. 18

            My 75 year old father, who lives alone, was walking everywhere in the Texas heat because his car broke down and he didn’t tell my sister or me because he “didn’t want to cause any trouble.”

            He won’t let me pay to fix his car. He won’t let me pay to buy him a new car. So we have convinced him that our second car is just too small for us and he would be doing us a favor by taking it off our hands.

            So we’re caravanning to Houston to deliver a car to my father and trying to figure out how to make sure the paperwork all gets done correctly.

            Good times.

            1. 1

              Is Houston home, or did your father move here later?

              1. 1

                I live in Austin, my sister lives in Houston, and my father lives in a small town in east Texas. He has my sister’s car right now and he’s going to meet us back at my sister’s house, drop her car off, and pick his new (our old) car up.

                We’ve been trying to get him to move closer to my sister for a couple of years now but he adamantly refuses and he’s in robust health and of sound mind so we can’t make him.

                (He’s far enough away from both of us that we can’t just pop in and check on him. He grew up in Houston and goes there almost weekly so him moving closer to my sister make sense, but he doesn’t want to.)

                1. 2

                  Sympathy on the stubborn parent. We have 4 of those (scattered around the state) between us, so I imagine we’ll be in the same boat in not-too-many years.

            1. 4

              rope.go in the repository talks about persistence, but it sounds more like immutability — new, modified instance is returned for every change. Is the use of word persistence correct here, I thought it implies being written to disk or some storage?

              1. 3

                https://en.wikipedia.org/wiki/Persistent_data_structure

                In this case, “persistence” means “the old versions stick around after modification as long as you need them to.”

                Among other reasons, it’s a nice property because it makes undo/redo trivial.

                1. 2

                  Yeah unfortunately it seems the term is overloaded, meaning either immutable data structures or persisted-on-disk (or equivalent) data structures, depending on the author.

                1. 3

                  Nothing fancy but this is the persistent rope that I’m using in my next text editor project.

                  (Said text editor is going to have something really unusual, but that’s not ready to be shown yet.)

                  1. 2

                    Nothing fancy

                    Yup! While it’s possible to go overboard with fancy rope implementations, a basic thing which gets the job done is surprisingly simple. IIUC, this 500 lines of verbose Java is what powers text in IntelliJ: https://github.com/JetBrains/intellij-community/blob/master/platform/util/base/src/com/intellij/util/text/ImmutableText.java.

                  1. 12

                    Wow the graphviz folks went really evil.

                      1. 5

                        I’d been thinking we needed to have a serious talk about getting phrasing back in the mix

                      1. 2

                        an entity can be destroyed once references to it are impossible

                        An entity can be destroyed once accesses to it are impossible. Simply holding a reference to something does not count as accessing it. This is the difference between being dead and being unreachable; the latter is a sufficient, but not necessary condition for the former, and is therefore commonly used as a proxy for it.

                          1. 2

                            Cute, but under-cut; a link is only a weak reference.

                        1. 1

                          I have a paper copy of this. It’s one of my favorite computer science books. It’s written so well.

                          1. 6

                            I once did a medium sized project in sqllite where I took CJ Date at his (sql) word…

                            • There were no nulls in any table.
                            • Every table had a primary key, not merely an autoindex.
                            • I have a “data dictionary” where every field is named, described, and typed uniquely, so “natural join” can be relied on to “just work”.
                            • The design was in at least 3rd normal form.
                            • Foreign key constraints are enforced.
                            • Every select was a select distinct.

                            It was just all so simple and intuitive and just works maintenance free for nearly a decade now.

                            I have seen so many people in industry whinge that Date’s advice is “impractical”, when it’s clear they haven’t tried it, or if they have, whenever the choice came for expedient vs correct, they have opted for easy and wrong, and then found it all getting harder and harder and more complicated.

                            I look forward to a true relational algebra system.

                            1. 2

                              I look forward to a true relational algebra system.

                              What would that look like?

                              1. 2

                                Pretty much like Date’s and Darwen’s “Tutorial D” I suspect.

                                I haven’t had a close look at the state of it, and there have been a couple of other attempts I’m aware of, but I haven’t looked at their state recently so would have to google.

                                About a year back I took a stab at writing some ruby classes that would “do the right thing” and am convinced it could be done as a library on something like Ruby. What I had “work for me” in a very limited sense, but lack serious features like transactions and good persistent store… although if I was doing that my first cut would just be to use sqllite as a backend for that.

                          1. 3

                            The author made a YouTube video describing the approach that is pretty neat too.

                            1. 2

                              I was thinking about this and I think I have a nice minimal example of this behavior:

                              Imagine you have a program where the user controls a point on a 2D grid. The user always starts at (0, 0). They can move left, right, up, or down. This is a very simple program, but after a long enough time line it could start to misbehave. For example, let’s say you represent the x and y values with signed 32 bit integers and overflow in your language is undefined. Most runs will never have any problems, but if someone races to an edge they could trigger undefined behavior on integer overflow. The user can’t tell what’s going on. Maybe it maps to their character in a video game and they teleport to a completely different part of the world. They restart the game, go back to origin and everything is fine.

                              1. 9

                                In Legend of Zelda: Breathe of the Wild, there’s a gameplay mechanic where occasionally the “blood moon” will rise and all your defeated enemies will come back to life. What’s actually happening is the game is resetting to a known good state, but they make it seem relevant in game.

                                1. 1

                                  Is that really the intent? If so, that’s amazing! I love how video game developers are able to pull the wool over our eyes. Reminds me of classic Hollywood illusions. Trust nothing!

                                  1. 5

                                    Wing Commander for DOS would crash after exiting the game, before returning to the DOS prompt, with an error message displayed on the screen. The devs just patched the error string to say “Thanks for playing Wing Commander!”

                                1. 9

                                  This was posted before.

                                  This is not a complaint about how this is a repost. I’m happy to see it posted again. It’s one of the most interesting languages I’ve seen in a good long while. It’s beautiful.

                                  1. 7

                                    I just write ugly long lines of code and then my editor can do the indenting and formatting for me, using project/language-specific configs/tools, and I don’t have to care or type as much.

                                    1. 3

                                      Yeah, for Python there are things I don’t like about black, but the fact that it just ends all arguments is priceless; I don’t even think about formatting, just let black run automatically every time I save a file.

                                      1. 2

                                        As the documentation for go fmt states: “it’s everyone’s favorite format and everyone’s least favorite format.”

                                      2. 2

                                        That’s great as long as no one else reads your code in a different editor. I’ve used this style for almost 20 years now. I can use ts=4 in vim, someone else can use cat or diff with the default 8-character tabs, someone who prefers denser code can set their tab width to 2, and it all works fine. If I wanted to achieve this with automatic indenting tools then I’d need to be able to guarantee round-tripping: if I set the indent size to 4 spaces and run the auto formatter, then you set it to 2 run it, and then set it back before commit, will you get any whitespace changes? This stability is not always guaranteed by such tools.

                                        Note: clang-format now has a UseTab: ForIndentation setting that does indentation with this style, which means that you can just configure your editor to use this style and forget about it.

                                        1. 1

                                          Any other editor using zig fmt, .editorconfig, or whatever the project uses should produce the same results.

                                          If it doesn’t, or if it’s a multiplayer project that really has no such thing (and doesn’t want it), then I would have to adapt to that, but so far so good.

                                          1. 1

                                            Any other editor using zig fmt, .editorconfig, or whatever the project uses should produce the same results.

                                            That’s the point. It’s fine if they want the same results. If they want to edit the code with four-character-wide indentation but your style is defined to use two spaces, or to use tabs but assume that the tabulators are set to eight-character indexes, then they just have to live with that decision.

                                            If you use tabs for indentation and spaces for alignment (and set your formatting file to use this style, for autoformatting, as clang-format can now do) then they can choose the indent width in their editor and things don’t break.

                                            1. 1

                                              At a certain point, working with others — in an open-source project, in a team at your company, anywhere — means accepting that sometimes you will be out-voted and need to live with it.

                                              For example: for writing tests in Python, I personally strongly prefer the standard-library unittest module and don’t much like the third-party pytest module. In my own personal projects I use unittest (or Django’s wrappers around/additions to it). But every company I’ve worked at for the past 7 years has had a team where the majority wanted to use pytest. So I’ve used pytest at work.

                                              Which is to say: I think you probably should learn to live with the fact that your preferred indentation approach has been outvoted, and so when you are working with others you probably will need to adopt an indentation style that is not the one you personally prefer.

                                              1. 1

                                                I think you probably should learn to live with the fact that your preferred indentation approach has been outvoted, and so when you are working with others you probably will need to adopt an indentation style that is not the one you personally prefer.

                                                You have two choices as a project:

                                                • Pick an indentation style that you like and force everyone to use it, which guarantees that some people will be unhappy with the indent width.
                                                • Pick an indentation style that lets anyone pick their preferred indent width without negatively impacting anyone else.

                                                I really struggle to understand why anyone would defend the first option. Why would you choose to inflict a worse experience on other people when it’s completely avoidable?

                                                This is particularly jarring when you work on multiple projects. I contribute to some projects that have chosen option 1 and set the indent to 8 characters, others that have chosen option 1 and set the indent to 2 characters. If both projects had chosen option 2 then switching between them would not change my indent width.

                                                A few years ago I had a student work on a project called Code Editing in Local Style that took this even further and let you use your preferred capitalisation scheme or declaration style locally, while applying the upstream style when you committed. I’d love to see more tooling support this kind of mode. Capitalisation is particularly annoying in C++ where the standard library uses conventions that everyone agrees are stupid and so are not used by any other large library and it would be great to be able to transparently adapt these things syntactically on import.

                                              2. 1

                                                I was writing from the perspective of a project defining the style, not me.

                                                If someone doesn’t like the style of a certain project, and cares a whole lot about it, I’m sure that sucks.

                                                I’m only saying that personally I don’t care so applying the project style automatically is great for me. Even if it’s not what I would have chosen if I set it up myself. When I do that I just go with the defaults of the tool.

                                        1. 5

                                          There is something about this retro-Unix look and feel that I really like. It feels so very serious somehow. The colors are also ugly in a nice way. Really strange.

                                          1. 2

                                            In 1998 I’d run KDE on FreeBSD with Solaris colors and it was cool.

                                            Then I got my own SPARC workstation and it, too, was cool. :)

                                          1. 10

                                            Them: “Leslie Lamport may not be a household name,[…]”

                                            Me: “The hell he isn’t.” [rage close]

                                            (I opened it back up and read it anyway. It was actually really interesting. But my rage close was real.)

                                            1. 17

                                              There are whole households out there that don’t have a single graduate degree in them. Amazing, I know!

                                              That said, I didn’t actually know LL was the one behind TLA+, so it was a useful read for me too. (Also, it turns out he actually does look somewhat like the fluffy lion on the cover of the LaTeX book!)

                                              1. 3

                                                This is a hypertext book that I intended to be the way to learn TLA+ and PlusCal, until I realized that people don’t read anymore and I made the video course.

                                                1. 3

                                                  Yeah, I knew he did Lamport clocks but didn’t know he was also the guy who did LaTeX and TLA.

                                                  1. 4

                                                    Inverse for me, I never made the connection between LaTeX Lamport and clock Lamport.

                                                    1. 4

                                                      One did happen before the other.

                                                      1. 10

                                                        Can we really be sure about that.

                                                  2. 3

                                                    I only learned about his writing LaTeX after reading his TLA+ book. Dude doesn’t have much ego, and he only made his name better known when he started actively advocating for formal methods.

                                                  3. 4

                                                    I saw that and ran a Twitter poll

                                                    without googling, can you name one thing Leslie Lamport is known for?

                                                    • yes: 70.1%
                                                    • no: 29.9%

                                                    Not as good as I’d like, but not as bad as the article makes it sound. Granted, this is a heavily skewed demographic. I ran the same poll at work and got 0% yes.

                                                    1. 3

                                                      And even then, people tend to know him more for LaTeX than for his much more important work on distributed computing. Which I’ve heard bothered him.

                                                      1. 5

                                                        I imagine that there are more people writing professional documents than working on distributed computers.

                                                        1. 1

                                                          On the other hand, I imagine that there are more people using distributed computers than people writing documents. Probably.

                                                        2. 5

                                                          I can kind of see why that bothered him. Many people viewed TeX as the real, manly typesetting system, and LaTeX was for weaklings. Lamport received the impression of a hippie simplifying Knuth - more an enthusiastic college lecturer than a “real” computer scientist.

                                                          OTOH LaTeX made TeX usable, and facilitated the distribution of a lot of science. That has to count for something.

                                                        3. 2

                                                          I know him for Lamport clocks and not much else :)

                                                          1. 1

                                                            Heheh. I saw the Twitter poll and thought of this story. I follow you on Twitter now.

                                                        1. 1

                                                          The quality-of-life improvements from Oberon-07 to Oberon+ are absolutely remarkable.

                                                          1. 1

                                                            Thanks, I appreciate. Oberon (with a few minimal changes and additions) is actually a great language, and even simpler than Go.

                                                            1. 1

                                                              I am (pleasantly) surprised to see ongoing activity with Oberon. I have the Project Oberon book by Wirth on my shelf. I just assumed it was a dead academic/teaching topic. Is there a reason why there is still interest in it? I’d be interested in any resources or summaries about modern Oberon, if you know of them.

                                                                1. 1

                                                                  I think you, me, Wirth, and Gutknecht are the only people with physical copies of that book anymore. :)

                                                                  You saw they released an updated version? projectoberon.com

                                                                2. 1

                                                                  Do you know of some “real life”, nonacademic code written in relatively modern Oberon, that I could browse? I find the “Project Oberon” resources somehow difficult to navigate and grasp, unfortunately, and I’d be curious to assess how the language could work for me. Also, does it support threaded parallelism?

                                                                  1. 3

                                                                    Here are some decently representative examples:

                                                                    https://github.com/rochus-keller/Oberon/tree/master/testcases/Are-we-fast-yet

                                                                    https://github.com/rochus-keller/Oberon/tree/master/testcases/Hennessy

                                                                    https://github.com/rochus-keller/Oberon/tree/master/testcases/NAppGUI

                                                                    More is in preparation, especially using the exception handling. The language has no built-in provisions for threading, but it works with C libraries accessed by the built-in foreign function interface and thus can use threading provided by these libraries; here is an example: https://github.com/rochus-keller/Oberon/blob/master/testcases/NAppGUI/Fractals2.obx

                                                              1. 6

                                                                Oof, cringing at the ergonomic nightmare that is using uppercase for keywords.

                                                                1. 1

                                                                  I like it. Very Oberon-y.

                                                                1. 3

                                                                  The bitbucket repo mentioned on the Zimbu home page is dead, but I was able to get a copy from here:

                                                                  https://github.com/bsed/zimbuw32

                                                                  I just compiled it and ran the test suite and it mostly passed on my M1 Mac. This appears to be an older or at least different version from the one described on the website but it looks like it has a fair amount of documentation included.

                                                                  1. 5

                                                                    A modern C program on VOS (written by yours truly, who also wrote the Forgotten Systems page) can be found at https://github.com/FrostFlower/VOSUtils/ - C using VOS features is pretty wildly different from C on UNIX. I especially like the s$parse_command function - it uses a DSL (see lines 58-66) to specify command format, automatically handles parsing of things like paths and default values, and even prompts the user if a mandatory field isn’t supplied! Another nice feature of the VOS API is that every VOS library call returns an error code, which can be passed to s$error() to get and output a nice error message (which is looked up at both the system level and the app level - the error dictionary for this app is in consolidate_record_files.tin.)

                                                                    I have basically nothing bad to say about the VOS operating system, except perhaps that Stratus seems to have largely lost interest in it in recent years.

                                                                    1. 3

                                                                      There was a thread on here the other day and VOS came up and the question was raised…how do you actually get your hands on a Stratus VOS system, to work or play or experiment? Is there a community access program? Is the only way to learn VOS to work for Stratus or a company that contracts with them? Can a normal person buy a small Stratus VOS system just for fun or is it incredibly expensive?

                                                                      I don’t expect you to know the answers to these questions, of course, but I’m asking them anyway. :) I know @calvin would want me to.

                                                                      1. 4

                                                                        They aren’t cheap (iirc licensed ftServer V systems start in the tens of k USD.) There’s no community access program as far as I’m aware. Stratus’s focus at this point is mostly non-hardware, and VOS is only part of their hardware business (the other part being Windows/Linux on ftServer.)

                                                                        If you’re an experienced C programmer, VOS-related jobs come up fairly frequently and I’ve heard some VOS sites are open about training up people with a UNIX C background.

                                                                        1. 1

                                                                          Interesting. Thank you!