Threads for roryokane

  1. 6

    Other forms of this book:

    The first edition of this book was published in 2013.

    1. 16

      This might be a viable approach if you’re mainly doing trigonometry functions. But if you’re maxing that with calculus, I think the costs will outweigh the benefit.

      1. 8

        Reminds me a bit of Norman Wildberger’s trigonometry.

        I think if you are strong enough at math to be able to handle the wide-ranging consequences of reimagining the foundations, you probably don’t need the benefit, and if you aren’t, then you probably don’t want to put yourself in a position where there are only one or two books you can use. These iconoclasts are right that you can reconceptualize everything if you want to put in the work. But the proselytization of it I question.

        1. 3

          you’re just using a function mysin instead of sin, where mysin(t) = sin(2 pi t). There wont be any problems with it.

          1. 7

            The derivative of sin(t) is cos(t). The derivative of mysin(t) is not mycos(t), it’s 2 pi mycos(t).

            1. 4

              Does such derivatives actually come up in game engine code? How often?

              Remember that Casey Muratori was talking specifically about code, most notably game engines. It’s not about reimagining all of maths. It’s about reimagining a little part of game engine code. Something that some libraries have already done, since apparently half turns are already a thing in some trigonometric libraries.

              1. 4

                That’s why fernplus specifically said if you’re mixing it with calculus.

                I guess one place where it might come up is small-angle approximations: when measured in radians, sin(x) is about x, and cos(x) is about 1-x^2/2.

                1. 3

                  That’s why fernplus specifically said if you’re mixing it with calculus.

                  Ah, my bad.

                  I’ve seen in HN a comment explaining that using radians is real helpful for symbolic manipulation, most notably because it makes sin() and cos() derivative of each other (just like exponential is a derivative of itself). That same comment however noted that it didn’t help one bit with most numerical applications implemented in computer programs.

                2. 2

                  It comes up anywhere that dot products are used, because dot products can be interpreted as cosines. First and second derivatives are used when tracing/casting rays, in particular.

                  1. 2

                    Ah, and when you derive radians based cosines you avoid multiplying by a constant there. Makes sense.

                3. 2

                  For anyone else who struggled to confirm that in their heads, Wolfram Alpha agrees that d/dt (sin(2 π t)) = 2 π cos(2 π t), which is equivalent to 2 π mycos(t).

                  1. 5

                    The chain rule:

                    (fg)′(x) = g′(x)f′(g(x))


                    f(x) = sin(x)

                    g(x) = 2πx

                    mysin = fg


                    mysin′(x) = 2πcos(2πx)

                    Hope this helps.

              2. 3

                And if you’re a game designer trig functions are almost certainly most of what you’re actually doing, because that’s what you need to do to calculate what polygons appear where.

              1. 5

                Since the type of Lisp I most often write is Clojure, I’m disappointed (though not very surprised) that this syntax isn’t any more applicable to Clojure than sweet-expressions. Clojure’s [] and {} brackets can be represented as vec and hash-map, but it just doesn’t look as clear. For example, starting with this random snippet of ClojureScript (source):

                (defn modifier-keys
                  (let [shift (.. e -shiftKey)
                        meta (.. e -metaKey)
                        ctrl (.. e -ctrlKey)
                        alt (.. e -altKey)]
                    {:shift shift :meta meta :ctrl ctrl :alt alt}))

                This would be the equivalent Wisp-syntax ClojureScript:

                defn modifier-keys
                  vec e
                      shift : .. e -shiftKey
                      meta : .. e -metaKey
                      ctrl : .. e -ctrlKey
                      alt : .. e -altKey
                    hash-map :shift shift :meta meta :ctrl ctrl :alt alt

                It’s much harder to spot the function parameter e in vec e than in [e]. And changing that line to [ e with no closing bracket doesn’t look right either.

                1. 3

                  A while back there was a version of this idea as a clojure library. I always liked the haskell-style :. Likely to have bit-rotted though.

                1. 4

                  I laughed when I saw this:

                  // eslint-disable-next-line fp/no-loops
                  for (…) {
                  1. 1

                    I wasn’t sure where you were seeing code like that, as it’s not in the README. I found that these three implementation files in src/ disable fp/no-loops.

                  1. 9

                    Clarification: this is about how developers of the Kubernetes project had trouble using Git to manage changes to Kubernetes. This is not about any Git trouble specific to app developers who use Kubernetes.

                    1. 5

                      Yes. I also think the article could be summarized as “Git is not a governance system”. Most of the problems the author describes seem like trouble with GitHub’s implied workflow (especially PRs) rather than the version control system itself, so maybe it should be “GitHub is not a sufficient governance system”.

                    1. 2

                      Context if you haven’t heard of Game of Trees:

                      1. 1

                        Off-topic, but I can’t believe someone liked the computer modern fonts enough to make their blog use them.

                        1. 1

                          And I’m surprised that despite Computer Modern being associated with TeX, whose goal is to produce great typography, this blog makes the typographical error of using justified text without hyphenation. This creates distractingly large spaces between words on small screens – I had to read the page in Reader View.

                          1. 2

                            The simplest explanation is simply that believing TeX design is “good” is cargo culting to begin with. :)

                        1. 4

                          Ruby, another programming language inspired by Perl, can be made to support this syntax too:

                          # set local variables at the top level of a file
                          cout = $stdout
                          endl = "\n"
                          cout << "Whatever" << endl;
                          # equivalents:
                          $stdout.write("Whatever"); $stdout.write("\n")
                          # or
                          # or
                          puts "Whatever" # because the method Kernel#puts calls `$stdout.puts(*args)`

                          Or, if you want to this syntax to be usable in multiple files:

                          module CPlusPlusConstants
                            def cout
                            def endl
                          # in another file in the directory
                          require_relative 'cpp_constants.rb'
                          include CPlusPlusConstants
                          cout << "Whatever" << endl;

                          In Ruby, methods can be called without parentheses, so methods with no parameters that are in scope act just like a Raku “term” as described in this post. In the above code, the Module#include method brings the methods cout and endl into the file’s implicit top-level module.

                          Ruby’s IO class already defines a << instance method that backs the << operator, but you could always redefine it, as Ruby’s classes are open for modification:

                          class IO
                            def <<(value)
                              write(value) # calls IO#write
                          1. 1

                            If reading this draft makes you think of ways it could be improved, see the instructions for contributing at

                            1. 22

                              Welp, we all saw this coming. Microsoft already has two editors (VS and VS Code), keeping a third around was unsustainable.

                              (Though I am curious what are the reasons for continuing to use Atom instead of VS Code. By all accounts, as well as in my own experience, it’s far slower and clunkier than its counterparts.)

                              EDIT: the founder of Atom, nathansobo, commented on the related HN and r/programming discussions that they are working on a new editor focused on speed and real-time collaboration, Zed.

                              1. 18

                                (Though I am curious what are the reasons for continuing to use Atom instead of VS Code. By all accounts, as well as in my own experience, it’s far slower and clunkier than its counterparts.)

                                It’s slower, but depending on what features you heavily rely on, I’d honestly call VSCode the clunkier of the 2. For something I’m in and out of dozens of times a day, the Project-wide Find (and Find-and-Replace) experience in VSCode is terrible compared to Atom’s, and hasn’t seen significant improvement in years. There’s a couple of different “make VSCode’s search work like Atom/Sublime” plugins out there, but they’re mostly broken in my experience.

                                Tons of other things are similar – the settings UI is a lot more pleasant in Atom than the weird way it works in VSCode. Atom just generally traded off a focus on speed in favor of a much more polished experience, generally.

                                All that said, I saw the writing on the wall and went back to Sublime last year. It’s not as polished as Atom, but less of a jankfest than VSCode, and its search interface was what Atom’s was based on anyways. Bonus points for not setting my battery on fire by running an entire webbrowser just to draw text on a screen.

                                1. 9

                                  Interesting to read this point of view. But a bit baffling, I should say. I used atom a little bit back in the day, but found it too hip and it was very sluggish, compared to gedit, grant, scribes, sublime, etc.

                                  When visual studio code came, it felt snappier, launched quicker, and personally I found it to be more pleasant to use. The UI was more focus on being functional than visually slick. Git integration was done just the way I like it. As well as other rminor but I portant details such as mru file switching. Built in terminal. Split screen.

                                  This is very much an opinion. But I find VSCode to be just a well designed and executed product. With pragmatism taking the central role. Kind of Microsoft showing that it is still capable of releasing useful software.

                                  1. 8

                                    How Microsoft manages the feature requests and bugs on the public vscode issue tracker never fails to impress me. There is a ton of professionalism shown towards a free and open source product. Product owners clearly communicate status and engage feedback.

                                    1. 5

                                      When visual studio code came, it felt snappier, launched quicker, and personally I found it to be more pleasant to use. The UI was more focus on being functional than visually slick.

                                      Very much different tastes. I booted it up after posting this, and still find it incredibly grating to use. They’ve screwed up the page “weight” or scrolling speed (on the Mac, at least), so that a sweep of my fingers on the trackpad when I’m scrolling a file is much, much faster than it is in any other app on the system (whereas scrolling in Sublime feels like scrolling in Safari feels like scrolling in the Terminal feels like, etc). It gives the whole thing a floaty, jittery feeling and screws up my years of scrolling muscle memory (cynically, I half wonder if they use a faster-than-system-scroll-speed to perpetuate the whole “VSCode is fast” marketing, because the rest of it, from the app startup to doing a search, is noticeably laggy)

                                      Like the preference pane’s spastic sidebar flying open and closed by itself as you scroll down the unbelievably long single preference page (which the floatyness of the scrolling in general exacerbates) it just behaves like nothing else on the system, and that makes the whole experience grating and weird compared to everything else. It’s like nails on a chalkboard, just a constant low-level stream of annoyances, to me.

                                      But if it’s your cup of tea, all power to you. Editor monocultures are the last thing we need.

                                      1. 6

                                        The thing I dislike the most about VSCode vs other editors is that it uses the Microsoft method of text selection. So if you hover over a character and click + drag the cursor, it won’t highlight the character that you are hovering over. Whereas in a macOS text field/editor it does.

                                        So in VSCode when I am forced to use it, I tend to miss-select a bunch of text all the time making it an extremely frustrating experience.

                                        The same issue exists in other interfaces that try to emulate some sort of text selection, the AWS console for example has a way to use AWS SSM to connect to a remote system and get a terminal in your browser. It has the same selection behavior.

                                        When applications don’t match the behavior of the OS they are running on it becomes an incredibly jarring experience.

                                        1. 1

                                          So if you hover over a character and click + drag the cursor, it won’t highlight the character that you are hovering over. Whereas in a macOS text field/editor it does.

                                          I agree that inconsistency is frustrating, but I cannot reproduce the inconsistency you describe in macOS 10.14 Mojave. Whether I’m using VS Code, TextEdit, or Finder, when I hover over a character, then click and drag, the selection starts from whichever side of the character the mouse cursor was closest to. I never see, for example, the selection start at the right side of an ‘O’ if I position my cursor on the left side of the ‘O’ before dragging.

                                        2. 2

                                          But if it’s your cup of tea, all power to you. Editor monocultures are the last thing we need.

                                          I agree 100%. I’m a long time vim user, but have switched to using both vscode and emacs. I interchange between the two, and am interested in newer projects too such as helix. All monocultures are bad and have awful side effects. That said, I think editors are personal enough that vscode will never fully dominate.

                                          I keep coming back to vscode for multiple reasons including: multiple selection, remote ssh sessions, and relatively simple configuration of everything including plugins. I’ve never noticed significant performance issues in vscode, while I have spent countless hours learning vim and emacs even to do basic configuration. That has taken away from development time. I don’t regret that time, but it is a trade off decision everyone has to make.

                                          If I may ask, what do you use?

                                          1. 1

                                            If I may ask, what do you use?

                                            I went back to Sublime when it seemed the writing was on the wall for Atom, and I’m currently pretty happy with it – much of the same basic features, and at least my battery life is a lot better. I’ve flirted with Emacs for years, and I’m pretty proficient with elisp, but I always hit a point where the constant mental friction of switching between “one-set-of-platform-wide-conventions-and-keystrokes” and “special-set-of-conventions-and-keystrokes-just-for-emacs” wears me out.

                                          2. 2

                                            That’s exactly my experience. There’s a very clear lag even while typing. I’m also encountering so many rendering bugs. For example, code warnings show up inline in a very long floating horizontal bar and it’s extremely difficult to scroll through it to read the entire message. The embedded terminals are full of display bugs and characters suddenly start flying all over the place while I type for no obvious reason.

                                            What I found really impressive is the the ability to quickly launch a dev Docker container and do all of the work inside it. That’s the only reason I’m using it. It’s sad though that the core editing experience is so subpar compared to sublime, IntelliJ, Xcode and even TextEdit.

                                            Atom was just as bad though in my experience.

                                            1. 1

                                              Now that you mention it, you’re right, editors in VS Code do seem to scroll faster than other scrollable areas. I looked into this and found an existing bug report and a workaround.

                                              Bug report: After 1.66 update scroll speed is faster, submitted 2022-03-31


                                              Add this to your settings.json:

                                                // Adjust scroll sensitivity to match macOS-native scroll surfaces, by my estimation
                                                // These settings might become unnecessary after this scrolling speed bug is fixed:
                                                "editor.mouseWheelScrollSensitivity": 0.5,
                                                "workbench.list.mouseWheelScrollSensitivity": 0.5,
                                            2. 1

                                              I used atom a little bit back in the day, but found it too hip and it was very sluggish, compared to gedit, grant, scribes, sublime, etc.

                                              I think back in the day, it was very slugish. But because of those early fails, I still don’t want to touch VS Code, even though I know it’s everywhere. At $DAY_JOB we use IntelliJ so I use that after hours as well (yeah, yeah, I know, talk about slugishness - but the important parts are fast for me), and for quick and dirty stuff, I rather pick Sublime. But yeah, I don’t know where it’ll go in the future, I know I’ll keep my vim scripts up to date in any case.

                                          3. 4

                                            Muscle memory? I mean, if it still works for you, why incur switching costs?

                                            1. 2

                                              A reason to keep using Atom instead of VS Code could be the use of telemetry in the latter. Although I’m not sure if Atom lacks this ‘feature’.

                                              1. 2

                                                I’m not a VS Code fan, but just FYI Atom does have/had telemetry. If that’s something that bothers you also note there are builds of VS Code that do not (see vscodium).

                                            1. 2

                                              This is a problem because SemVer encourages you to conflate interface and implementation versions. If I want to deprecate an API, the clean way of doing this is to create a new version of my implementation that supports the old API (1.0) and the new API (2.0). With SemVer, I have no way of expressing the idea that my library supports these two interfaces. The excuse given in the library (not many people are using the interfaces) then this would be easy to address if you supported multiple interfaces in a single library and you could bump the major version only of the one that few people are using (or explicitly introduce it with a 0.x version where there’s no stability guarantee).

                                              1. 2

                                                SemVer’s handling of that situation doesn’t seem too bad. If you were on v1.3.4 and then introduced an incompatible API without removing the existing API, your next SemVer version should bump the minor version, making it v1.4.0. You only bump the library’s version to v2.0.0 when the existing API is removed. It’s true that SemVer’s label “v1.4.0” doesn’t express your plan to eventually release a v2.0.0 that removes support for the old API, but I don’t know of any versioning scheme in use that expresses that. SemVer’s other flaw is that “v1.4.0” doesn’t market your new features very well, but I don’t think that’s what you meant by “[conflating] interface and implementation versions”.

                                                I don’t understand your long sentence starting “The excuse given in the library … then this would be easy to address”. I think that sentence is missing a few words somewhere.

                                                1. 5

                                                  You only bump the library’s version to v2.0.0 when the existing API is removed

                                                  The problem here is that the bump to 2.0.0 is not a breaking change for anyone who has moved to the new APIs. If you had versioned interfaces and express implementations as sets of interfaces then you have:

                                                  • {1.3.4}
                                                  • {1.4.0, 2.0.0}
                                                  • {2.0.0}

                                                  Someone using your library can move from the first to the second without breaking anything. If their import then specifies that they are on API v2, then this works fine.

                                                  Generalising this to supporting multiple interface names in the same implementation is a small step forward. For example, for something like libzstd, which has some experimental APIs that are hidden behind a feature macro, you might say something like:

                                                  • {compress { 1.0.0 }, decompress { 1.0.0 }, custom_allocator { 0.0.0 }}
                                                  • {compress { 1.2.0 }, decompress { 1.0.0 }, custom_allocator { 0.5.0 }}
                                                  • {compress { 1.3.0 }, decompress { 1.3.0 }}
                                                  • {compress { 1.3.1, 2.0.0 }, decompress { 1.3.0 }}
                                                  • {compress { 1.3.2, 2.1.0 }, decompress { 1.3.0 }}
                                                  • {compress { 1.3.3, 2.1.1 }, decompress { 1.3.0 }}
                                                  • {compress { 1.3.4, 2.2.0 }, decompress { 1.3.0 }}
                                                  • {compress { 2.2.0 }, decompress { 1.3.0 }}

                                                  Here, there’s an experimental API for providing a custom memory allocator that goes through two unstable revisions before being folded into the stable APIs for the compress and decompress paths. If my build system doesn’t say that I need custom_allocator, then it won’t set the macro that exposes these APIs. If it does, then when I try to build with the second release I’ll get a build failure if I update the dependency because the version has changed (with SemVer, any release in the 0.x series may be a breaking change). It’s then up to me to verify that my use is okay. Eventually, that unstable API goes away and I’m left with just using the stable one. Now the project is committed to maintaining that for a while. Eventually it decides that the compression APIs were badly designed and so brings in a replacement. The next version removes them.

                                                  At no point after an API is declared stable is a single version upgrade a breaking change for a user that moves to the new versions in a timely manner but jumping from non-adjacent versions may be. This means that your CI can pull in new versions and test on a nightly / weekly basis and warn you if there’s a newer API version than the one that you’re on for any API that you’re using. You then have a bit of time to manage the upgrade and you avoid a flag day.

                                                  The depressing thing is that Windows has done more or less this with COM interfaces since the mid ’90s and some critical *NIX libraries in C have done the same thing with symbol versioning.

                                              1. 3

                                                Though it makes sense that a major version bump to a SemVer library shouldn’t mean anything more than the existence of breaking changes, my feeling is that in practice most people will take it to mean the presence of big changes. I think the author would agree with this: he added a code name to RedwoodJS’s version, and I think that was to prevent people from thinking the framework is making major changes frequently.

                                                That “code name” strategy for marketing big changes to software seems fine for RedwoodJS, but I don’t think it’s an ideal solution for software projects in general. Thinking of code names is tough, especially if you try to make the chronological order of code names self-evident by working your way through the alphabet.

                                                The article mentions a versioning scheme with a fourth marketing-owned “epoch” part, like epoch.major.minor.patch, but complains that the resulting versions like “” are too visually complex and incompatible. I’m wondering if the following versioning scheme would be a viable replacement: epoch.major.minor. I feel like I’ve seen some popular software that already follows that versioning scheme, but I don’t remember which software it was or whether they had named that scheme.

                                                1. 3

                                                  my feeling is that in practice most people will take it to mean the presence of big changes

                                                  …that’s what the author is saying, and that it’s simply cultural, and it must change.

                                                  1. 2

                                                    What I meant to say was that I doubt we can change the culture after so much history of using version numbers a certain way. But it would be nice if I were wrong.

                                                1. 30

                                                  I’m slightly against. databases covers it. mysql or postgres and so on don’t appear to need one.

                                                  The main thing is I haven’t seen anyone at all get annoyed at the amount of material being posted here about sqlite. The nominal main use for tags on lobsters is for filtering out submissions you don’t want to see.

                                                  1. 4

                                                    I am annoyed about all the SQLite, fwiw.

                                                    1. 1

                                                      Being against the tag is one thing (I don’t care personally) but why annoyed about SQLite? It’s an amazing body of code.

                                                      1. 9

                                                        I’m not against the tag, I’m for the tag. I’d like to filter it.

                                                        I’m sure it’s an amazing body of code, but I don’t enjoy the articles talking about how amazing a body of code it is. People talk about how great SQLite is as if thinking SQLite great is a fringe viewpoint, which I find tedious, and the debates about to SQLite or not are frustrating to read.

                                                        I’m sure other people like the articles and the discussions they spawn, and I don’t want to feel tempted to go be grumpy at them there. A tag would just save my having to grump internally.

                                                      2. 1

                                                        huh okay fair enough

                                                      3. 4

                                                        Sure, sqlite falls under the umbrella of databases, but I cannot see how can adding the tag interfere with anyone’s use case. As I am writing, this post has received 24 upvotes, which means having it would benefit at least 24 users.

                                                        From my understanding, you only think this is unnecessary but not harmful, whereas others are finding it necessary. This is not really an argument against the proposal IMO.

                                                        The nominal main use for tags on lobsters is for filtering out submissions you don’t want to see.

                                                        Git is nominally a distributed VCS, but most people have no problem with a central repo. I really want to see the hit statistics of URLs like That’s the only way we can know how users are actually using the tag system.

                                                        1. 4

                                                          Right – tags have other uses than filtering submissions out, regardless of the original reason the tag feature was implemented. Not only can one browse stories with a certain tag at tag pages, one can also subscribe to a tag via RSS and search for tagged stories.

                                                          From my understanding, you only think this is unnecessary but not harmful, whereas others are finding it necessary. This is not really an argument against the proposal IMO.

                                                          In general, adding any new tag is harmful in some way, though the benefits may outweigh the harms. The harms of adding a new tag:

                                                          • It makes it harder to find other tags on
                                                            • This interferes slightly with all the use cases for tags listed above, as you must learn of the existence of a tag before you can use it.
                                                            • It makes it harder to understand what stories are acceptable on Lobsters, as submitters see the instruction “If no tags clearly apply to the story you are submitting, chances are it does not belong here.”
                                                          • It makes it harder to tag a new submission with other tags.
                                                            • The new tag will appear in the list of options, distracting some users who are submitting stories for which the tag does not apply.
                                                            • The new tag may replace the tag that was previously autocompleted after typing a partial string like “s”.
                                                          1. 1

                                                            I did quality this with the word “slightly”.

                                                            Git is nominally a…

                                                            I brought it up because “are people itching for a way to filter it out?” is the official criterion here.

                                                        1. 2

                                                          By my definition, Turbolinks is an SPA framework, even if, as a framework user, you never have to dirty your hands touching any JavaScript. If it has a client-side router, it’s an SPA.

                                                          But… turbolinks does not have a client-side router?

                                                          1. 2

                                                            That last sentence implies that an app with a client-side router must be a SPA, but it does not imply the inverse, that all SPAs have a client-side router.

                                                            While Turbolinks doesn’t have a client-side router, I would say it does client-side routing in the sense that it calls history.pushState().

                                                            1. 2

                                                              Well, the previous context in the blog makes it more clear that this isn’t just an “all Athenians are Plato” reading:

                                                              To me, an SPA is simply a “Single-Page App,” i.e. a website with a client-side router, where every navigation stays on the same HTML page rather than loading a new one. That’s it.

                                                              Neither of these things are particularly true of turbolinks (or pjax apps like GitHub): there’s no client side router and while, in the presence of JS some navigation will not trigger a new page load, this is merely a progressive enhancement. Every navigation can and will happily load a different page if turbolinks is disabled or if it just decides it’s not worth trying to restructure the DOM. These are really MPAs that have adopted a partial illusion of SPA-ness as a progressive enhancement optimization (and whether that’s even a speed up anymore is certainly a question).

                                                              While Turbolinks doesn’t have a client-side router, I would say it does client-side routing in the sense that it calls history.pushState().

                                                              Eh, that’s a really big stretch, and not what I think anybody means by “client-side routing”. Lots of old school multi-page jQuery sites also made extensive use of PushState for odd things they were doing, but nobody considers them “client-side routed” or SPAs unless were stretching those terms beyond all normal and useful meaning just to win an argument.

                                                              Anyways, regardless, if the client is ignorant of routing and all of the routing happens server side, and the server responds to user agents asking for different routes with many distinct and fully formed HTML pages corresponding to the requested route because there’s no such thing as multiple client-side “pages” that have no server-side “page” equivalent, calling what that server is emitting a “Single Page Application” seems like a really bad misapplication of terminology, to me.

                                                              1. 3

                                                                Maybe I’m playing fast and loose with the phrase “client-side router,” but yeah, I basically mean it’s calling history.pushState(). There are always gray zones, though; you’re right. (E.g. an MPA that only uses pushState() in one little place, to pop open a modal or something.)

                                                                1. 2

                                                                  My current (internal, work) app is definitely in what you’d consider the gray zone. Major sections of the site or anything starting a new workflow are full page loads, but within a common workflow, I use HTMX to replace page sections if available, and pushState() to the URL it would have gone to if JS was disabled. The same goes for things like sorting and paging search results: search result pages get URLs so they can be bookmarked or emailed, and this includes the paging and sorting.

                                                                  I do feel like I’m not really doing client-side routing, though. Every link does in a broad sense the same thing whether it’s HTMX-enhanced or not, using the same server-side routes, which generate a full view or a partial view depending on how they were fetched.

                                                                  (Note: I’m the original author of brutaldon, which also worked this way, using intercooler.js. But I do count Pinafore as the only SPA I’ve ever truly enjoyed.)

                                                          1. 11

                                                            If this prompts someone to connect, we’re in #lobsters .

                                                            1. 3
                                                            1. 4

                                                              The article mentions that “a Robin-hood style hash table” could improve performance. That data structure is interesting, but the linked article doesn’t explain it very well. I found a better explanation here: Robin Hood Hashing – Programming.Guide

                                                              1. 3

                                                                Please run a spellcheck on the content. There’s a few words that look like many cosmic rays got them :-)

                                                                I was looking in the archive for the reason for the change and found this:

                                                                Also, the result on Firefox mobile is not great. It’s like some sizing / padding / centring CSS is missing:

                                                                1. 4

                                                                  Thanks for the reports all.

                                                                  I’d installed “Code Spell Checker” on VSCode but it hadn’t enabled. What an embarrassing spelling horror show :) Fixed.

                                                                  I also dropped back to the default Nikola theme. I liked the ‘soft’ aesthetic of the one I’d picked, but looking awful on mobile is a non starter in so many ways.

                                                                  This theme looks pretty good on my iPhone!

                                                                  Thanks again for all the feedback. Super appreciate it.

                                                                  1. 2

                                                                    I can confirm that the current theme looks good in Firefox for Android. I do see two remaining spelling errors:

                                                                    • In “sme of the marketing”, “sme” should be “some”.
                                                                    • Whenever the language is mentioned, “Javascript” should be “JavaScript”.
                                                                    1. 1

                                                                      Fixed. An important distinction. Thanks for the report.

                                                                  2. 2

                                                                    I’m seeing the same css issues in iOS safari.

                                                                  1. 14

                                                                    I’m very curious how these companies address the fact that there are countries where smartphones are not universally owned (because of cost, or lack of physical security for personal belongings).

                                                                    1. 8

                                                                      At least Microsoft has multiple paths for 2FA - an app, or a text sent to a number. It’s hard to imagine them going all in on “just” FIDO.

                                                                      Now, as to whether companies should support these people - from a purely money-making perspective, if your customers cannot afford a smartphone, maybe they’re not worth that much as customers?

                                                                      A bigger issue is if public services are tied to something like this, but in that case, subsidizing smartphone use is an option.

                                                                      1. 24

                                                                        if your customers cannot afford a smartphone, maybe they’re not worth that much as customers?

                                                                        I had a longer post typed out and I don’t think at all you meant this but at a certain point we need to not think of people as simply customers and begin to think that we’re taking over functions typically subsidized or heavily regulated by the government like phones or mail. It was not that long ago that you probably could share a phone line (telcos which were heavily regulated) with family members or friends when looking for a job or to be contacted about something. Or pay bills using the heavily subsidized USPS. Or grab a paper to go through classifieds to find a job.

                                                                        Now you need LinkedIn/Indeed, an email address, Internet, your own smartphone, etc. to do anything from paying bills to getting a job. So sure if you’re making a throwaway clickbait game you probably don’t need to care about this.

                                                                        But even this very website, do we want someone who is not doing so well financially to be deprived of keeping up with news on their industry or someone too young to have a cellphone from participating? I don’t think it is a god-given right but the more people are not given access to things you or I have access to, the greater the divide becomes. Someone who might have a laptop, no Internet, but have the ability to borrow a neighbor’s wifi. Similarly a family of four might not have a cell phone for every family member.

                                                                        I could go on but like discrimination or dealing with people of various disabilities it is something that’s really easy to forget.

                                                                        1. 15

                                                                          I should have been clearer. The statement was a rhetorical statement of opinion, not an endorsement.

                                                                          Viewing users as customers excludes a huge number of people, not just those too poor to have a computer/smartphone, but also people with disabilities who are simply too few to economically cater to. That’s why governments need to step in with laws and regulations to ensure equal access.

                                                                          1. 11

                                                                            I think governments often think about this kind of accessibility requirement exactly the wrong way around. Ten or so years ago, I looked at the costs that were being passed onto businesses and community groups to make building wheelchair accessible. It was significantly less than the cost of buying everyone with limited mobility a motorised wheelchair capable of climbing stairs, even including the fact that those were barely out of prototype and had a cost that reflected the need to recoup the R&D investment. If the money spent on wheelchair ramps had been invested in a mix of R&D and purchasing of external prosthetics, we would have spent the same amount and the folks currently in wheelchairs would be fighting crime in their robot exoskeletons. Well, maybe not the last bit.

                                                                            Similarly, the wholesale cost of a device capable of acting as a U2F device is <$5. The wholesale cost of a smartphone capable of running banking apps is around $20-30 in bulk. The cost for a government to provide one to everyone in a country is likely to be less than the cost of making sure that government services are accessible by people without such a device, let alone the cost to all businesses wanting to operate in the country.

                                                                            TL;DR: Raising people above the poverty line is often cheaper than ensuring that things are usable by people below it.

                                                                            1. 12

                                                                              Wheelchair ramps help others than those in wheelchairs - people pushing prams/strollers, movers, emergency responders, people using Zimmer frames… as the population ages (in developed countries) they will only become more relevant.

                                                                              That said, I fully support the development of powered exoskeletons to all who need or want them.

                                                                              1. 8

                                                                                The biggest and most expensive problem around wheelchairs is not ramps, it’s turn space and door sizes. A wheelchair is broader (especially the battery-driven ones you are referring to) and needs more space to turn around than a standing human. Older buildings often have too narrow pathways and doors.

                                                                                Second, all wheelchairs and exoskeletons here would need to be custom, making them inappropriate for short term disability or smaller issues like walking problems that only need crutches. All that while changing the building (or building it right in the first place) is as close to a one-size-fits-all solution as it gets.

                                                                                1. 5

                                                                                  I would love it if the government would buy me a robo-stroller, but until then, I would settle for consistent curb cuts on the sidewalks near my house. At this point, I know where the curb cuts are and are not, but it’s a pain to have to know which streets I can or can’t go down easily.

                                                                                2. 7

                                                                                  That’s a good point, though I think there are other, non-monetary concerns that may need to be taken into account as well. Taking smartphones for example, even if given out free by the government, some people might not be real keen on being effectively forced to own a device that reports their every move to who-knows-how-many advertisers, data brokers, etc. Sure, ideally we’d solve that problem with some appropriate regulations too, but that’s of course its own whole giant can of worms…

                                                                                  1. 2

                                                                                    The US government will already buy a low cost cellphone for you. One showed up at my house due to some mistake in shipping address. I tried to send it back, but couldn’t figure out how. It was an ancient Android phone that couldn’t do modern TLS, so it was basically only usable for calls and texting.

                                                                                    1. 2

                                                                                      Jokes aside - it is basically a requirement in a certain country I am from; if you get infected by Covid you get processed by system and outdoors cameras monitor so you don’t go outside, but to be completely sure you’re staying at home during recovery it is mandatory to install a government-issued application on your cellphone/tablet that tracks your movement. Also some official check ups on you with videocalls in said app to verify your location as well several times per day at random hours.

                                                                                      If you fail to respond in time or geolocation shows you left your apartments you’ll automatically get a hefty fine.

                                                                                      Now, you say, it is possible to just tell them “I don’t own a smartphone” - you’ll get cheap but working government-issued android tablet, or at least you’re supposed to; as lots of other things “the severity of that laws is being compensated by their optionality” so quite often devices don’t get delivered at all.

                                                                                      By law you cannot decline the device - you’ll get fined or they promise to bring you to hospital as mandatory measure.

                                                                                  2. 7

                                                                                    Thank you very much for this comment. I live in a country where “it is expected” to have a smartphone. The government is making everything into apps which are only available on Apple Appstore or Google Play. Since I am on social welfare I cannot afford a new smartphone every 3-5 years and old ones are not supported either by the appstores or by the apps themselves.

                                                                                    I have a feeling of being pushed out by society due to my lack of money. Thus I can relate to people in similar positions (larger families with low incomes etc.).

                                                                                    I would really like more people to consider that not everybody has access to new smartphones or even a computer at home.

                                                                                    I believe the Internet should be for everyone not just people who are doing well.

                                                                                3. 6

                                                                                  If you don’t own a smartphone, why would you own a computer? Computers are optional supplements to phones. Phones are the essential technology. Yes, there are weirdos like us who may choose to own a computer but not a smartphone for ideological reasons, but that’s a deliberate choice, not an economic one.

                                                                                  1. 7

                                                                                    In the U.S., there are public libraries where one can use a computer. In China, cheap internet cafés are common. If computer-providing places like these are available to non-smartphone-users, that could justify services building support for computer users.

                                                                                    1. 1

                                                                                      In my experience growing up in a low income part of the US, most people there now only have smartphones. There most folks use laptops in office or school settings. It remains a difficulty for those going to college or getting office jobs. It was the same when I was growing up there except there were no smartphones, so folks had flip phones. Parents often try and save up to buy their children nice smartphones.

                                                                                      I can’t say this is true across the US, but for where I grew up at least it is.

                                                                                      1. 1

                                                                                        That’s a good point, although it’s my understanding that in China you need some kind of government ID to log into the computers. Seems like the government ID could be made to work as a FIDO key.

                                                                                        Part of the reason a lot of people don’t have a computer nowadays is that if you really, really need to use one to do something, you can go to the library to do it. I wonder though if the library will need to start offering smartphone loans next.

                                                                                      2. 5

                                                                                        How are phones the “essential technology”? A flip phone is 100% acceptable these days if you just have a computer. There is nothing about a smartphone that’s required to exist, let alone survive.

                                                                                        A computer, on the other hand, (which a smart phone is a poor approximation of), is borderline required to access crucial services outside of phone calls and direct visits. “Essential technology” is not a smartphone.

                                                                                        1. 2

                                                                                          There’s very little I can only do on a computer (outside work) that I can’t do on a phone. IRC and image editing, basically. Also editing blog posts because I do that in the shell.

                                                                                          I am comfortable travelling to foreign lands with only a phone, and relying on it for maps, calls, hotel reservations, reading books, listening to music…

                                                                                          1. 1

                                                                                            The flip phones all phased out years ago. I have friends who deliberately use flip phones. It is very difficult to do unless you are ideologically committed to it.

                                                                                          2. 3

                                                                                            I’m curious about your region/job/living situation, and what about is making phones “the essential technology”? I barely need a phone to begin with, not to mention a smartphone. It’s really only good as a car navigation and an alarm clock to me.

                                                                                            1. 1

                                                                                              People need to other people to live. Most other people communicate via phone.

                                                                                              1. 1

                                                                                                It’s hardly “via phone” if it’s Signal/Telegram/FB/WhatsApp or some other flavor of the week instant messenger. You can communicate with them on your PC just as well.

                                                                                                1. 4

                                                                                                  I mean I guess so? I’m describing how low income people in the US actually live, not judging whether it makes sense. Maybe they should all buy used Chromebooks and leech Wi-Fi from coffee shops. But they don’t. They have cheap smartphones and prepaid cards.

                                                                                                  1. 2

                                                                                                    You can not connect to WhatsApp via the web interface without a smartphone running the WhatsApp app, and Signal (which does not have this limitation) requires a smartphone as the primary key with the desktop app only acting as a subkey. I think Telegram also requires a smartphone app for initial provisioning.

                                                                                                    I think an Android Emulator might be enough, if you can manually relay the SMS code from a flip phone, maybe.

                                                                                              2. 2

                                                                                                You’re reasoning is logical if you’re presented a budget and asked what to buy. Purchasing does not happen in a vacuum. You may inherit a laptop, borrow a laptop, no longer afford a month to month cell phone bill, etc. Laptops also have a much longer life cycle than phones.

                                                                                                1. 4

                                                                                                  I’m not arguing that this is good, bad, or whatever. It’s just a fact that in the USA today if you are a low income person, you have a smartphone and not a personal computer.

                                                                                            1. 4

                                                                                              This parse ambiguity is similar to the ambiguity exploited by the recently-discussed rubygems CVE-2022-29176, though the article reports discovering the Python issue independently. The problem in both cases is looking up a package by the concatenated string {name}-{version} instead of by the name and the version separately.

                                                                                              1. 2

                                                                                                Yeah, these kinds of parsing ambiguities can be extremely pernicious! As best I can tell no modern Python packaging tools will be confused by the “vexing parse” here, but it’s possible that older tooling could be confused into installing package-someversion==suffix instead of package==someversion-suffix.

                                                                                              1. 1

                                                                                                Related links:

                                                                                                The “tl;dr” section from the advisory:

                                                                                                A bug allowed anyone to yank certain gems and upload different files with the same name, same version number, and different platform. To verify your own app, check your Gemfile.lock history for changes that keep the same name and version number but add or change a platform. We have patched the bug, and found no malicious code uploaded using this vulnerability in the last 18 months of gem yanks and pushes.