Threads for landon

  1. 2

    https://caniuse.com/import-maps

    I can build JS apps that run in a browser without a complicated build system! (On basically everything except iPhone, which I don’t care about during development)

    1. 4

      LSP is worrying to me as well but I can’t quite explain why yet. It is scary that many community efforts have been abandoned in the rush to embrace LSP, an abstraction controlled and potentially limited by Microsoft. This puts them in a strategically advantageous position to control what sorts of dev features the OSS community can get. Meanwhile it seems full Visual Studio doesn’t use LSP for its most powerful features.

      1. 9

        LSP is a protocol, not a technology. It’s actually one the best thing that could have happened for future editors and IDE: you just need to support LSP and you get compatibility with all the languages for free. Getting proper language support in editors was a pain before LSP.

        It doesn’t prevent IDEs to support more than LSP, but LSP is now the bare minimum that we can expect to have anywhere. This is a great thing.

        1. 8

          LSP is a good thing, but the fact that its effectively under Microsoft control is not. My main gripe about it is that to make the life of some VSCode developer easier, they decided all locations in LSP would be encoded as UTF-16 offsets from the start of the buffer (buffers themselves must be transfered in UTF-8 encoding, go figure). Every single LSP implementation now needs to have a UTF-8 to UTF-16 offset computation logic to be compliant.

          I believe this could have been fixed if LSP had been a community project, because at the time this was widely noticed most LSPs implementations were just passing along byte offsets or codepoint offsets, so we could have just fixed the few implementations that used UTF-16 offsets and changed the spec. Unfortunately Microsoft has full control over the spec so nothing was changed and all LSP implementation had deal with that unnecessary complexity.

          1. 3

            Add support to negotiate the position encoding.

            That particular problem was fixed in the latest version, from the change log

            Add support to negotiate the position encoding.

            But yeah, I also have gripes with what LSP technically is, and it’s stewardship.

            For this reason (but moreso due to general architectural sanity), I strongly recommend to not hard-code LSP as a core domain model, but rather treat it as a serialization layer:

            On the servers, produce a library for semantic analysis of code with language-specific APIs. You don’t have to make library’s API public/stable, just make sure it exists internally.

            On the client side, provide hooks to populate completions, outline, symbol search, etc, but leave it up to an extension to wire those with LSP. These days we have LSP built into vim & emacs, but there’s no LSP support in VS Code. The just have an npm LSP library, which extension authors can choose to use.

        2. 3

          I love LSP, the fact that I can use a fringe editor and get all the same language integration features of VSCode is amazing. Sure, it doesn’t get me the whole ecosystem of vim or emacs plugins, or every feature of intellisense, but it’s so much more than nothing. If you had told me 15 years ago that such a thing would get traction, and that Microsoft of all people would be driving it, I would have guffawed my coffee all over the table.

          Context: the ones I use are rust-analyzer/kakoune. I don’t think MS itself is involved in the stack at all, even in a legal sense.

          Edit: spelling

          1. 3

            I generally think LSP is great for allowing other editors to exist (while it’s not as good as stuff like PyCharm/VS classic, its basically better than everything else that was offered before).

            However, one nasty thing that happens is that each language gets, roughly, the one blessed LSP client. In Python’s case, that has ended up being MSFT’s non-OSS client. It totally sucks the oxygen out of the room for alternatives, and it’s such a hard problem to begin with. Honestly not great.

          1. 1

            I’m glad to hear this has gotten good! I tried it ages ago and had a pretty bad time*, but it clearly had potential.

            *The only thing I specifically remember was that if I had an error in the JS for a view, it said “Error on line 1” and printed a (very wide) whitespace-escaped version of the whole script.

            1. 15

              This is a manifestation of the issues that langsec describes so very well: If your input language can’t differentiate between instructions and data, you’re going to have a bad time. No quotations or language switches will work, as long as the general language (and its translations) are just as powerful.

              You end up at Rice’s theorem, - an undecidable problem.

              The only way to solve this is by creating an interface to the “AI” that can accept two input streams, strictly separating instructions and data.

              1. 5

                It’s alao somewhat reminiscent of the in-band signaling formerly used in phone networks. We all know how that worked out.

                Edit: grammar

              1. 31

                As someone with a globally unique legal name, I find real name policies to be pretty awful. It’s a lot easier to find me than someone named John Smith. Regardless of what John Smith or I are doing, that seems really unfair that they get to be effectively anonymous, while I don’t. If we’re going to insist that people dox themselves to post online, we should go all the way, or not do it at all. “You have to use your legal name” is a cop out. Make folks post their whole IDs, including addresses and pictures, or let cyberspace personas be disjoint from meatspace ones.

                A system where people with unique names have to have way stronger personal opsec because they’re easy to Google is irritating and unfair.

                1. 13

                  An especially frustrating side effect of this, and of the digitization of society in general, is that people who have more contact with the state tend to have more of a digital trail. I’ve had issues with this a few times, and things like being a ham radio operator and buying a house have made me essentially trivial to dox in ways that I can’t really control.

                  This becomes much worse when that contact is coercive and not consensual; one could certainly say that I should have simply chosen not to become a ham (although, as you say, that’s unfair on the uniqueness of my name), but one can hardly “make better choices” oneself out of being arrested in connection with a crime one didn’t commit and so forth.

                  It also means that civic participation - commenting on proposed regulation, etc. - is actually punished by the network, and that sucks!

                  1. 2

                    Ham radio callsigns are public information by design - you’re not supposed to be able to legally use the ham radio frequencies without identifying yourself in a way that can be tracked back to your real identity. This is in fact basically a network real-name policy made decades before the internet was invented, where the network is “the FCC-regulated amateur radio spectrum” rather than some company’s social media platform. I’m a licensed amateur operator in the US myself and I avoid giving out my callsign in any context where I wouldn’t give out my government name.

                    There are good reasons why this policy exists for amateur radio - radio spectrum is a government-managed public resource, and the amateur spectrum in particular is a slice of spectrum set aside for public and noncommercial communication and experimentation by people who go to the trouble of getting a ham license. If not for the amateur bands, a private individual wouldn’t be able to legally transmit on most of the radio spectrum at all - most of the rest of it is set aside for military or commercial use where it’s not legal to interfere with the radio transmissions of the legitimate controllers of that part of the spectrum. It’s not legal for me to transmit on the same frequency as a commercial FM radio station, and the commercial entity who owns that station is not confidential either.

                    That said, yeah, after growing up using the internet to routinely send encrypted and pseudonymous messages to people around the world, it’s a bit less cool to send out unencrypted radio transmissions where I have to legally repeat my call sign every 10 minutes.

                    1. 2

                      Yeah, I think this is slightly missing the point. I absolutely agree with you, and the FCC, that hams need to be identifiable. The problem is that even without giving my callsign to anyone, Googling my name gives you my address & name change history in the ULS and I can never change or prevent that.

                1. 5

                  The takeaway here seems very wrong. The solution to this problem is to use one of the many barcode formats with built-in error tolerance. Missing a line of pixels should not destroy your data, when you’re probably gluing that barcode somewhere that people can scratch it. This is a design problem, not an implementation problem.

                  1. 8

                    OP here; I agree that error detection/correction would be better.

                    Some context:

                    • these events happened 20 years ago
                    • the (hard to sway) customer specified the barcode format
                    1. 4

                      ∀ problems ∃ a solution that’s both perfect and unavailable ;)

                      Seriously, if you’re going to print, it makes sense to print in such a way as to minimise the impact of the hardware’s weaknesses on the output makes sense. It’s like woodworking, where skilled people look at the wood before deciding where to saw, and decide in order to avoid weak spots in the result.

                      You could make something else instead of the thing you’re making. Make a stool instead of a chair, or print something else. That something else would also be best done if you use your tools in a way that suits the materials and requirements.

                      1. 1

                        Aha, implicit project scope requirements defined by the customer. Sounds about right. ;-)

                      2. 2

                        Why not both?

                        1. 1

                          Because if you use a format with error correction, you never have to worry about your printer.

                          1. 3

                            “Never”

                            1. 1

                              No more than anyone does. If your printer fails, you’re hosed, but that’s easy to check. You don’t need a comment in your code that says “// Rotate barcode 90 deg for printing, to avoid dead lines”

                      1. 4

                        I wonder if you tried old versions of compilers if the curve would fit

                        1. 2

                          Field name which is singular but which is actually a collection (e.g.: Vector target)

                          I’m assuming the vector represents the position of a target in a coordinate system? How else should that be done?

                          1. 4

                            Oh, no. The term vector in this context means something like “resizable list.” In particular, see https://cplusplus.com/reference/vector/vector/ or https://docs.oracle.com/javase/8/docs/api/java/util/Vector.html .

                            Having learned programming first, I got so confused when I first learned linear algebra and saw “vector” used to mean “point.”

                            1. 4

                              In my experience, ‘vector’ in computing usually means a chunk of repeated data structures that’s contiguous in memory. GPU docs tend to assume the structure is some kind of number, which is how they represent points.

                              1. 3

                                Sounds like a synonym antipattern

                                1. 1

                                  Sometimes I see people doing this when they use the data structure as a function, especially with dictionaries. What I mean is, they use the math definition of a function (maps from some domain to another domain) and then indexing into the structure is like a function call. It can definitely be confusing at first.

                              1. 2

                                As a special but important case, note that 1/3, with no intervening spaces, is a single rational number, not the expression 1 divided by 3. This can affect precedence: 3/64 is 2 while 3 / 64 is 1/8 since the spacing turns the / into a division operator. Use parentheses or spaces to disambiguate: 3/(64) or 3 /64.

                                This seems… really bad. Lexer behavior is based on values? Why is 1/3 special but 1/5 isn’t? Is 1.0/3.0 covered? The language has first class rationals, why is this necessary?

                                1. 2

                                  Why do you think it depends on values? It says both 1/3 and 3/6 have the property, so why would you believe 1/5 does not?

                                  1. 1

                                    It appears I misread, still seems kinda weird though, why have that? (Also markdown removing the asterisks in my post isn’t helping)

                                    1. 4

                                      Maybe that’s Pike’s background as physicist acting up :-). Having looked at similar formulae throughout my university years, reading 1/2 * m * v^2 as (1/2) * m * v^2 feels pretty natural to me, too – it’s very close to how you’d write it (\frac{1}{2} mv^2) if we weren’t stuck with 1970s terminals in 2022.

                                      It’s also extraordinarily useful to have rational number support in calculators (but note that I don’t know if Ivy does these things specifically). For example it makes checking your results so much easier, because it preserves easily-checked proportions. There are various quantities that you expect to vary in a particular way – for example, to decrease linearly with, or with the square or cube of, the distance from a particular point. So if you know the value of that quantity at L=2 um, you expect a nice, round value at L = 4 um or L = 20 um. But if the length gets lost in the floating point rounding error, you don’t get those nice results, and depending on context, you often lose the ability to tell if two pages of thick integrals you really don’t feel like checking are right just by checking a few points in a table. There are also various “special” well-known values of otherwise complicated-looking functions – for example, you expect various special “nice” values for I and V at specific points on a transmission line because various ugly coefficients (sometimes irrational) cancel each other out. If you plug that in a purely numerical system, they get lost in floating-point errors and you don’t easily recognize them anymore.

                                      FWIW, there’s a whole series of tricks that you learn as an engineering/physics/chemistry/whatever undergrad to use these things more efficiently, ranging from doing part of the computation on paper to get some of the uglier coefficients out to cleverly computing things in a slightly different order on your calculator to goad it into rounding values just right (RPN calculators can make that a little easier FWIW).

                                      1. 1

                                        Absolutely, my gripe isn’t with rationals as first class numbers, I really like that, my gripe is with the whitespace semantics, in ‘n/m’ the / has different precidence than in ‘n / m’.

                                        1. 1

                                          I realise that, I think my wall of text said too much about why rational numbers are cool and not enough about the spacing: after having written the kind of formulae I suspect Pike wrote in his undergrad years, too, having n/m treated differently than n / m makes total sense to me, and I find it a really neat idea. I’m pretty sure I’d hate it if any of the general-purpose languages I work with would have that, but I really like it in a desktop calculator.

                                          That’s obviously super subjective and I realise it’s heresy :-D.

                                      2. 3

                                        For comments-first-readers:

                                        As a special but important case, note that 1/3, with no intervening spaces, is a single rational number, not the expression 1 divided by 3. This can affect precedence: 3/6*4 is 2 while 3 / 6*4 is 1/8 since the spacing turns the / into a division operator. Use parentheses or spaces to disambiguate: 3/(6*4) or 3 /6*4.

                                        1. 2

                                          1e5 is different from 1 e 5. For languages in the algol (c, pascal) syntax lineage, is it commonly illegal to have two terms in sequence. Not so in others, however. In apl, pertinently, 1e5 is a single number, while 1 e 5 invokes function e with arguments 1 and 5 (or, perhaps, passes 1 to the adverb e and invokes the derived function on 5; or, even, in dialects with stranding, might be a 3-element array comprising 1, e, and 5). In ml derivatives, ‘f 1e5’ invokes f with the single argument 1e5; ‘f 1 e 5’ invokes f with the three arguments 1, e, and 5 (modulo currying). In lisp, the situation is almost exactly the same as in TFA: ‘3/4’ reads as a ratio, but ‘3 / 4’ reads as the integer 3, the symbol /, and the integer 4.

                                          That said, I do find the rule to be in somewhat poor taste (if not inconsistent in that respect with other choices made by the dialect), and prefer j’s notation, cf ‘3r4’.

                                          markdown removing the asterisks

                                          You may escape them using \.

                                    1. 24

                                      Can we have a snarky version, to replace n-gate.com?

                                      1. 38

                                        I tried few-shot training GPT-3 by copying 4-5 HN headlines and their n-gate summaries into the prompt. Then I pasted some headlines from HN’s frontpage today:


                                        Microsoft Windows is prohibited at Gitlab

                                        Gitlab (business model: “Uber for Git”) has decided that it will no longer support Microsoft Windows (business model: “Uber for proprietary software”). Hackernews, who have all been using Macs for the past ten years and have never even heard of Windows, are shocked and appalled that anyone would use such a terrible operating system. They spend the next few hours patting themselves on the back for making the right choice, and then get into a heated argument over which text editor is the best.


                                        Bringing back the golden days of Bell Labs

                                        A New York Times article (business model: “Uber for articles about the good old days”) about an attempt to recreate Bell Labs (business model: “Uber for the telephone”) in Silicon Valley. Hackernews, most of whom are too young to remember the good old days, bemoan the fact that everything was better back then and that the world is going to shit. A few Hackernews try to explain to the others that the world has always been going to shit, and that things were never as good as they seem in retrospect.


                                        Alex Jones must pay $4m in damages for Sandy Hook hoax claims

                                        Alex Jones (business model: “Uber for bullshit”) has been ordered to pay $4 million in damages for claiming that the Sandy Hook massacre was a hoax. Hackernews, who have never heard of Alex Jones or Sandy Hook, spend the next few hours trying to figure out what a hoax is.


                                        Is DALL-E 2 ‘gluing things together’ without understanding their relationships?

                                        OpenAI (business model: “Uber for AI”) releases a new version of its DALL-E image-generation algorithm, which is able to generate images from textual descriptions. Hackernews, who are not sure what an algorithm is, spends the next few hours trying to figure out what an image is.

                                        1. 21

                                          A New York Times article (business model: “Uber for articles about the good old days”)

                                          Hackernews, most of whom are too young to remember the good old days, bemoan the fact that everything was better back then and that the world is going to shit.

                                          Alex Jones (business model: “Uber for bullshit”)

                                          Okay, I think it’s safe to say that GPT-3 just passed the Turing test with flying colours :-D

                                          1. 10

                                            This is pretty much perfect!

                                            1. 6

                                              This would be the only weekly newsletter I would subscribe to, awesome.

                                              1. 1

                                                These are so good that I’m almost tempted to ask for evidence that you actually ran these through GPT-3 instead of writing them yourself.

                                                I wonder how far are we from a Netflix comedy special that’s entirely performed live by an AI…

                                                1. 2

                                                  I wonder how far are we from a Netflix comedy special that’s entirely performed live by an AI…

                                                  We’re already there!

                                                  Seriously though, these systems seem pretty nifty for brainstorming, but the extreme cost of re-training makes it difficult to generate something topical. Even OpenAI’s newest, biggest, most expensive text model (text-davinci-002) is running a year behind on training data.

                                              2. 2

                                                I tried replacing the GPT-3 prompt with:

                                                "Write a snarky one-sentence summary of the following article: %s\n\n"
                                                

                                                Here is the result. Not particularly snarky. Maybe GPT-3 needs to be shown an example of the tone in order to maintain it.

                                                1. 10

                                                  Tried “Write a dark-humorous one-sentence summary of the following article:\n%s\n\n” on gpt-3 playground (using text-davinci-002) for the first few lines of https://github.com/hackergrrl/art-of-readme, and I got this:

                                                  A dark-humorous one-sentence summary of the article would be: “The README file is a long-standing tradition of developers trying to be helpful, but really just annoying users.”

                                                  1. 2

                                                    Please @nathell provide different toned variants like this!

                                              1. 3

                                                As someone who doesn’t write C++, I find the necessity(?) of prefixing of some variables with ‘m’ because the compiler doesn’t help you distinguish which namespace a name comes from to be way more odd than which character set they’re written in…

                                                1. 3

                                                  There’s no necessity, it’s just a convention. Think of it as Hungarian notation for scope instead of type (and I’m sure there are people who do both).

                                                  1. 2

                                                    This is a tooling issue. Good IDEs change the color of variable names, so it’s possible to differentiate between a variable and a field. In such case, writing m shouldn’t be necessary.

                                                    1. 1

                                                      A few reasons:

                                                      It tells the reader that this is a field. An identifier in a C++ program may be resolved via various scopes:

                                                      • A local in the current lambda
                                                      • A local in the current function
                                                      • A field (member) in the current object.
                                                      • A variable visible in an anonymous namespace in the current compilation unit.
                                                      • A global variable in one of the current namespaces.
                                                      • A global variable with no namespace.

                                                      For extra fun, these all shadow the later ones, so an identifier can (in the worst case) appear as all of these, with different meanings at each level[1]. By adding a prefix such as g on globals and m on fields, you disambiguate these and don’t need to rely on an IDE to tell you which you mean (not a great idea if, for example, people might need to read your code in the GitHub web view).

                                                      Additionally, C++ puts member functions (methods) and member variables (fields) in the same namespace. If you want to have a public method called foo that returns some state then you can’t call the field that backs it foo. Some people prefix private members with an underscore to avoid this.

                                                      [1] My favourite example of this is that UNIX defined a function called index, which is always present in a *NIX libc. You get really interesting interactions with the linker in C if you declare a mutable global called index, though thankfully modern linkers will now scream at you if you do.

                                                    1. 5

                                                      How do I pronounce it?

                                                      1. 4

                                                        Either ‘pass-er-in’ (rhymes with ‘grin’) or ‘pass-er-ine’ (rhymes with ‘brine’) work. Usually shortens to ‘pas-rin’ in conversation. It’s not the most obvious word to pronounce, to the extent that I’ve considered changing it to something else.

                                                        1. 1

                                                          To be honest, I read it as rhyming with tangerine.

                                                      1. 3

                                                        i love this article, it’s genuinely unclear to me if it

                                                        is ironic.

                                                        1. 1

                                                          as the author, i can confirm that it’s not ironic!

                                                          1. 1

                                                            So, off topic, but why don’t you capitalize ‘I’? Also is the broken line wrapping deliberate? It… Sends a vibe…

                                                            1. 4

                                                              OP writes only in lower case - why would you expect him or her to capitalize that one letter? :)

                                                              1. 3

                                                                the line wrap breakage is not intentional & i’ll try and make it better :3

                                                                it’s like me asking you why you used so many ellipses in your sentence - idk, stylistic choice. i like lowercase. :)

                                                                1. 1

                                                                  csee cummings :)

                                                          1. 6

                                                            JavaScript. Straight up unadulterated static hosted prototypically architected, build system free, untyped JavaScript. There’s programs I’ve left completely unattended for 10 years that still work on every computer I own, including the 15 year old ones. Nothing this side of C comes close.

                                                            A PL is only as long term viable as its runtime envirobment and toolchain. No ‘proper’ FP langs seem to care

                                                            1. 3

                                                              Just as your simple JavaScript code is still running 10 years later, so would any code that is written in the simplest form of a language and self-contained (without external dependencies), for example:

                                                              • C – if one takes the simplest C code, one can build it without issues on most OS’s and I bet for years from now… (there are even a few C compilers out there that are very portable;)
                                                              • Scheme, especially R5RS – there are many Scheme implementations that are able to run the core parts of R5RS, and if not, one could cobbler together a Scheme interpreter in a matter of weeks, if not days;

                                                              So in this regard, the longevity of a code base is not especially given by the programming language, but by the way in which it was used.

                                                              1. 1

                                                                Yes.

                                                            1. 3

                                                              What was this made with?

                                                              1. 7

                                                                WebGL, someone pointed this out on hacker news (its the top comment): https://ciechanow.ski/js/watch.js

                                                                1. 2

                                                                  Doesn’t seem to work for me. I guess that’s what you get for running OpenBSD.

                                                              1. 46

                                                                If there’s anything that should be required to use free software, it should be biomedical devices. To have a part of your body only modifiable and controllable by a corporation that keeps the details as proprietary secrets is like something out of a cyberpunk dystopia. And yet, this article is a great example of it happening!

                                                                1. 5

                                                                  I guess the counter-argument is that (as a society) we don’t want random people tinkering with medical implants, for the same reasons we don’t want people making snake-oil medicine or amateur surgeons.

                                                                  I’d like to think there’s an acceptable middle-ground, but I’m not sure what that would even look like.

                                                                  1. 18

                                                                    I guess the counter-argument is that (as a society) we don’t want random people tinkering with medical implants, for the same reasons we don’t want people making snake-oil medicine or amateur surgeons.

                                                                    There are actually pretty robust communities working towards automated insulin delivery and (IIRC) CPAP machines. And on the medication front you have RADVAC. There’s a lot of interesting exploration going on here.

                                                                    I’d like to think there’s an acceptable middle-ground

                                                                    One option I heard that appealed to me: the FDA should require code escrow for all medical devices, and release code for any devices that are still in service after the manufacturer ends support.

                                                                    1. 7

                                                                      Code escrow is a good first step.

                                                                      But you need access to all the development tools like JTAG debuggers as well.

                                                                      Also, this all breaks down of the device firmware is locked down, and / or requires signed code.

                                                                      1. 3

                                                                        Required signed code is fine - even good - but the key for signing code that runs inside your body should be your own private key.

                                                                    2. 18

                                                                      There’s nothing illegal or immoral about eating snake oil or trying to do surgery on yourself.

                                                                      Segfaulting my own cyberware is pretty scary, but somebody else segfaulting it and having no recourse is scarier. The acceptable middle ground is sufficient documentation that a professional is capable of fixing it, and an amateur is capable of hurting themselves, but hopefully wise enough to choose a professional. This is how medicine works on stock hardware already.

                                                                      1. 8

                                                                        Requirungy something to be open source doesn’t imply that random people add random code.

                                                                        People also tend to run custom versions of big open source projects. However I think you should have full access on software installed on your body and if you want to should be able to have it changed, just like body modification at large.

                                                                        Will it be exploited by greedy companies? Certainly. But the same is true already for body modification and likely medicine at large. There’s always gonna be someone going as unethical as someone is legally allowed to to maximize profits.

                                                                      2. 1

                                                                        there don’t seem to be many companies creating this kind of technology. Adding additional burdens on them doesn’t seem like a promising way to promote these systems.

                                                                        1. 22

                                                                          Medicine has never really been a place where market dynamics did either well or good.

                                                                          1. 12

                                                                            Yeah, this might not be a problem which the free market is capable of solving on its own. Good thing there are ways to fix that too.

                                                                        1. 7

                                                                          That’s somewhat hilarious, yet depressing.

                                                                          In 1999, on a Pentium MMX 100 and 32MB of RAM, you could easily start up Netscape (or IE, or Mozilla), go to one of many sites aggregating online games, pick almost anything, wait a while and then you’ll get very nice, colorful, engaging, memorable and smooth gameplay experience on almost every hit. It worked flawlessly on each platform which has support for Flash, no matter which browser, OS, environment and what else you had.

                                                                          Right now, in 2022, using oh-so-modern stuff like “html5 canvas”, “audio context” and whatever you pull out to make JS pretend to be a serious business… you get this. And, if you add anything more complex, your $3000 Macbook Pro will overheat sooner or later, and the gameplay wouldn’t be even near the smoothness of Flash game running at silly PMMX with Windows 98.

                                                                          What went wrong? Where we made that mistake? How to get back?

                                                                          1. 13

                                                                            I’m confused by this comment.

                                                                            I’m on a Thinkpad T430, a computer from June 2012, nearly 10 year old hardware with integrated graphics, and this runs just fine and is about as smooth as you could get. The backing game logic just uses basic JavaScript, and uses AudioContext to generate music and sound effects on the fly.

                                                                            This doesn’t even raise my load average above background. If you think this is choppy, try altering PLAYER_MOVE_STEP to a lower value, along with similar variables for the ships. There’s nothing wrong with this game, or this technology, from a performance standpoint, only the perception of choppiness due to how far ships and the player move in a frame (10px on a scaled canvas).

                                                                            Commenters older than myself can probably comment on the Flash situation in 1999, but as I recall, Flash on older hardware was and is (if you have the misfortune of using it) a mess. This piece of programming isn’t “serious business”, and I’m wondering what qualifies as “serious business” outside of the browser-native game engines that are common (Phaser comes to mind).

                                                                            All in all, I think you’ve set up a strawman to beat. There’s nothing wrong here.

                                                                            1. 5

                                                                              I am old enough to remember the flash situation in 1999 and to have tried to make a game in it not different to this one at the time.

                                                                              Flash was a buggy mess with bad performance and even an even worse security model. HTML5 was (and is!) an improvement, but it is also more or less the same.

                                                                              Poorly programmed stuff both does and always has brought every system to it’s knees … Frantic drive clicking has been replaced with (on the balance, quieter) fan noise.

                                                                              Of course, you can find people who miss that comfortable banging of a spinning disk drive trying to keep up with some flash load or another (which, by the way, could take 10-20 minutes to pull off the network).

                                                                              And then, of course back in 1999, you would find the people who missed keying their own games in basic! Same as it ever was.

                                                                            2. 5

                                                                              I don’t think a Pentium MMX would run flash very well, also, flash was programmed in ActionScript, which is basically JavaScript with a different stdlib. I think you might be seeing the past with somewhat rosy glasses…

                                                                              1. 3

                                                                                Couple of thoughts. Not sure if any of them are true, but these reflect the impression I am getting.

                                                                                Technical reasons

                                                                                How we make software dramatically changed. Everything is a framework now, there is massive amounts of “boilerplate” needed for many of these frameworks.

                                                                                One has to glue things together, everything got “bazaar” style. There is not much tightly integrated software, despite all these frameworks.

                                                                                There’s way too many competing options. With Adobe and Flash it was the default category (much like Photoshop nowadays). You chose it because you wanted to create an interactive app in the browser. Both the developer and the customers knew what the goal was. With all these options they all find their niches, which is another thing that changed. Everything needs to have its niche, people think about stuff like USPs maybe a bit too much, while Flash was more an all rounder.

                                                                                There is more developers, throwing out everything they do, because they learned “release early, release often”, even if they just spent a day on it. Maybe it lands them a job. So interesting projects tend to be buried. It’s just A LOT harder to find them. But if you go on websites that still exist where you’d previously find Flash games you still find new HTML 5 projects that are also more interesting. They just might not be findable on GitHub, lobste.rs, HN, etc.

                                                                                With lots of people developing lots of things going into many direction, just throwing stuff out there and never learning to care about even rudimentary performance, just bending things so they work, one often comes across code, that checks all boxes for complicated, hard to read, unmaintainable and slow. I think it’s easier to avoid if you have that one package, where you don’t glue things together.

                                                                                And I say that as someone who actually think it’s a good idea to glue things together, but one should do so with some focus and understanding what one does, instead of copying random example, tutorial, Stack Overflow code and bending it, when it’s not even “the right way” to approach a problem.

                                                                                Non-technical reasons

                                                                                It’s still there, just way better hidden, just like with many things. Everything yells for attention, so it’s also harder to find stuff. A great example are also these “curated” “awesome” lists, that often link to dead, unfinished or simply bad projects, because people will just add things they programmed or came across without curation, because who wants to show an empty list?

                                                                                So one needs to take some time to find them behind walls of unfinished, bad and simply loud projects. I think a large of it is really that compared to 1999 the internet today went from a semi-nerd place to mainstream. People that would have given you a weird look back then for spending hours in front of the computer talking to total strangers nowadays are always connected, get impatient if you don’t respond to an email in half an hour, have their Facebook, Instagram, LinkedIn, etc. account and flood the web with what’s less interesting or only interesting to them. Which probably is why echo-chambers are almost a requirement. Imagine if social networks would just throw everything at you.

                                                                                Of course for group efforts that means that might make it less likely for these not found interesting projects to accumulate contributors, especially if there is no or not much money behind it.

                                                                                1. 1

                                                                                  Flash included its own version of JS (“ActionScript”), so there’s more than bad language choice affecting this.

                                                                                1. 11

                                                                                  Someone wise once told me “it’s a poor craftsperson that blames their tools.”

                                                                                  1. 7

                                                                                    This has always bugged me as a saying because a good craftsman maintains his tools well and picks the right tool for the job. The underlying assumption in the saying is that you are using tools that you chose and that you had the option of selecting better tools.

                                                                                    1. 1

                                                                                      I dug into the history of the saying a while back and it’s originally something like “a poor craftsman has bad tools”, so more in line with what you said than how we use it now.

                                                                                  1. 12

                                                                                    I would be more sympathetic if this wasn’t peppered with rather nasty verbiage: “Blech,” “Blech,” “Blech,” “Blech,” “Beyond worthless,” Sarcastic “Cool. Very helpful,” “Horrifically insidious,” use of “Unintuitive” as objective, etc.

                                                                                    Even if the criticisms are valid, using a polemic tone like this throws shade on the whole set of them because it makes it seem like the author is more interested in confirming an expectation than approaching a new system with an open mind.

                                                                                    Also, some of the criticisms just don’t make sense to me. The docs are pretty meager, which should make them quick and easy to get through, yet several things ziglearn.org covers appear in this list. The stdlib docs claim they’re not great and refer to the source, the source contains tons of examples of usage in the form of test cases.

                                                                                    1. 1

                                                                                      I’m not sure how much I like the idea of Harry Fox Agency for software. This is how music works, and musicians are also pretty famous for not getting paid a lot, especially under the current distribution regime. Part of the problem is that for it to be worthwhile (i.e. a company can negotiate with one or two licensing agencies for all their deps), it needs to be large, and in order to not serve as a beaurocratic wealth concentrator (like the equivalent bodies in music, Spotify et al), it needs to be small.

                                                                                      Also, how do you distribute the profits? if I depend on a web framework and a string padding library and i pay $100, it’s not fair to split it 50/50 cause a web framework is much more labor to build and maintain, but it’s also not clear to be how it could be set up to not prey on smaller/newer players, and not be outright hostile to folks who don’t want to use it at all.

                                                                                      Tldr: musicians have been doing this for decades, and we don’t envy them.

                                                                                      1. 1

                                                                                        are also pretty famous for not getting paid a lot,

                                                                                        Well, Open Source developer usually are not getting paid at all. Also there are differences between software and music, like: no one needs you to fix security issues in your song two years after you recorded it, or keeps asking you how to best play your song on their iPod and could you please record that song again only with a little faster beat, etc.

                                                                                        BTW. I think “artists” are whining a lot, not realizing that they are producing most abundant intellectual commodity we have. There is so many songs recorded, that even if I pick a single genre I wouldn’t be able to listen to all of them once if I’ve listened my whole life. At this point, I don’t need any artist to record a single song ever again, and I would still not ran out of things to listen that I’d like and find novel. So someone producing more of that stuff and then complaining that it’s not paying well… I don’t know what to tell them. :D

                                                                                        Also, how do you distribute the profits?

                                                                                        That’s for free market to figure out.

                                                                                        Also - as long as dual licensing model is preserved - all of these potential problems are business/market problems. Open Source users are unaffected. And business are used to wrangle, negotiate, etc. in the market economy. The whole thing is just an easy and efficient way for some people to opt-in into monetizing their software for commercial users. It doesn’t have to be perfect. As long as it’s a better alternative between giving everything away for free (liberal licensing), or making it commercial-entities hostile (copyleft), I think it’s still a win.

                                                                                        1. 2

                                                                                          Do you think you could use all the open source software out there? Do you actually want to live in a world where nobody makes new music? Would a world in which nobody makes new software actually be that bad?

                                                                                          1. 2

                                                                                            Do you actually want to live in a world where nobody makes new music?

                                                                                            Would most people even notice?