Threads for ryanatkn

  1. 12

    This is the first time I’ve seen a lawyer argue that a license that differentiates between commercial and non-commercial use is a thing that you can do. The other advice I’ve read suggests that it’s too fraught with corner cases to be allowed. For example:

    • If I use a music player to listen to music on my headphones while I’m working, is that a commercial use?
    • If I put ads on my blog, is it a commercial use of the text editor that I use to write the entries or the CMS that I use to host it?
    • If a company uses the software for a purpose that is not connected to their commercial activities, is that a commercial use?
    • If I use the software for some free project and someone decides later to give me a donation to support my work, am I now violating the license?
    • Does a fee-paying university count as a commercial use? What if it’s also a registered charity?

    Splitting the world into commercial and non-commercial activities is normally a problem that lawyers say is too hard.

    1. 20

      Well, Creative Commons did it back in the day by adding the NC variants.. in an intentionally flexible way:

      The inclusion of “primarily” in the definition recognizes that no activity is completely disconnected from commercial activity; it is only the primary purpose of the reuse that needs to be considered.

      In their experience there weren’t many conflicts over the definition. So I guess (like was recently said about engineering) “commercial use is like pornography, I know it when I see it” – and that’s good enough.

      1. 5

        In all honesty, the whole software licensing idea is a bit anoying and not as useful as most people think.

        I put the MIT license on code I push to github because they force me to use a license. But in good truth, I have no way to enforce it in most cases. Nor would I care about ofenses in many cases.

        I wish software authors would be less possessive about their code and put the focus on the code itself rather than overhead. I miss the days when one would post code online and whomever wanted would do whatever they wanted with it without bringing the boring licensing discussions to attention. Attribution would naturally occur to an acceptable level givena good cominity with rnouth well intended people.

        I also don’t quite agree with the concept of paying for a copy of the software and not being able to do whatever one wants with it, within reasonable limits such as non-usurpation. I understand it is a reality today and perhaps even the most adapted to today’s economy, but it is a practice that should be questionable. Is it really ethically correct? I don’t think so.

        1. 17

          For me, licenses are not for the code publishers, but rather the code consumers.

          If you publish code without a license, then in my jurisdiction it’s technically copyrighted by default. I’m legally not allowed to use it at all, and open myself up to legal liability if I do. After I make my millions, how do I know you won’t some day take me to court and demand a percentage of that? By putting a license on your code, you’re giving people peace of mind that you’re not gonna turn around and try to sue them later.

          1. 6

            Agreed. At work a few years ago I copied-and-pasted a page of useful code from a gist I found on GitHub, including the comment identifying the author, and I added a comment saying where I got it from.

            Before our next release, when we had to identify any new open source code we were using, I added a reference to that file. The legal department then became worried that there was no license associated with it. Someone ended up tracking down the author and asking him, and he assured him he had no claim on it and put it in the public domain.

          2. 8

            I wish software authors would be less possessive about their code and put the focus on the code itself rather than overhead.

            Unfortunately, this attitude only leads to mass exploitation of developers and enrichment of corporate interests.

            The world is full of assholes who will take advantage of the free work and good will of others and give nothing back.

            The world is also full of useful idiots who will give over their stuff to the aforementioned assholes and then, years later after discovering that you can’t pay rent with Github stars or HN posts, cry and piss and moan about how they were ripped off.

            So, yeah, licenses are important.

            1. 11

              You can’t “exploit” someone by taking [a copy of] what they’re giving away for free. Free means free.

              If you create stuff and don’t charge money for it but have the expectation that people will give you money for it anyway or at least recompense you somehow_ … then you are either living in a small traditional village culture, or an anarchist commune. In both of those environments there is such a social contract*. If you’re not, you are indeed an idiot, unless you encumber your software with a license that forces such recompense.

              I don’t believe most open source contributors who don’t use copyleft licenses are idiots. I believe they genuinely make their software available for free and don’t expect to see a dime directly from it.

              In my case I do so to give back to the world, and because having people use and appreciate what I’ve made makes me feel good, and because it enhances my reputation as a skilled dude to whom my next employer should pay a handsome salary.

              * I highly recommend Eric Frank Russells’s 1940s SF story “…And Then There Were None”, about a colony planet that adopts such a society, inspired by Gandhi, and what happens to a militaristic galactic empire starship that rediscovers the planet.

              1. 6

                You can’t “exploit” someone by taking [a copy of] what they’re giving away for free.

                I would argue that you absolutely can if you take something offered freely, make a profit at it, and do not somehow pay that back to the person who helped you out. It’s somewhat worse for many maintainers because there is active pressure, complaining, and hounding to extract still further value out of them.

                I don’t believe most open source contributors who don’t use copyleft licenses are idiots. I believe they genuinely make their software available for free and don’t expect to see a dime directly from it.

                Not idiots–useful idiots. It’s a different thing.

                I think there is for many of us a belief that we give away our software to help out other developers. I think of neat little hacks I’ve shared specifically so other devs don’t ever have to solve those same problems, because they sucked and because I have myself benefited from the work of other devs. This is I would argue an unspoken social compact that many of us have entered into. That would be the “not directly see a dime” you refer to, I think.

                Unfortunately, it is obvious that as a class we are not recouping the amount of value we generate. It is even more painful because it’s a choice that a lot of developers–especially web developers, for cultural and historical reasons–sleepwalk through.

                Consider Catto and Angry birds, right? Dude wrote Box2D (without which you don’t really get Angry Birds as a physics game) and never saw (as reported anyways) a red cent of the 12BUSD in revenue they booked in 2012. That’s insane, right? There’s no world in which that is just.

                (One might argue “@friendlysock, ours is not a just world.” In which case, sure, take all you can and give nothing back, but fucking hell I’m not gonna pretend I don’t find it in equal measure sad and offensive.)

                Our colleague I’m responding to is exactly that sort of person that a company, investor, or founder loves–yes, yes, please, don’t think too hard about licenses, just put your work in the public domain! Don’t worry your pretty little head about getting compensated for your work, and most certainly don’t worry about the other developers you put out of a job! Code wants to be free, after all, and don’t fret about what happens to development as a career when everything we need to write has either been written or can be spun whole-cloth by a handful of specialists with the aid of GPT descendants!

                I suspect our colleague means well, and lord knows I wish I could just focus on solving neat problems with code, but we can ill afford to ignore certain realities about our industry.

                1. 7

                  I would argue that you absolutely can if you take something offered freely, make a profit at it, and do not somehow pay that back to the person who helped you out.

                  Nah, I’ve published MIT stuff, and my take is - go for it, commercialize the hell out of it, you don’t have to pay me anything.

                  The point of MIT is to raise the state of the art, to make the solution to a problem universal. That includes corporations. No reciprocity is required: the code being there to be used is the point of releasing it.

                  1. 1

                    I would argue that you absolutely can [exploit someone] if you take something offered freely, make a profit at it, and do not somehow pay that back to the person who helped you out.

                    I assume the definition your link refers to is “to make use of selfishly or unethically,” because the others don’t fit. But if someone offers you a thing with explicit assurance that you can use it freely without encumbrance (except maybe a token like thanking them in a readme), and you do so, how is that exploitation?

                    Feudal lords exploited peasants because the peasants had no choice but to work the lord’s lands for subsistence, or leave and starve. That has nothing to do with open source developers. No one is forced or coerced into releasing code freely.

                    This is I would argue an unspoken social compact that many of us have entered into.

                    If that’s the social compact you want, then for gods’ sake choose a license that expresses it. Choose an Old Testament eye-for-an-eye license (GPL) not a New Testament “turn the other cheek” license (MIT et al).

                    That would be the “not directly see a dime” you refer to, I think. Unfortunately, it is obvious that as a class we are not recouping the amount of value we generate.

                    Dude, you and I are in the same class. I’m sure we have comparable skill sets. I went to work for The Man after school, and in exchange for writing what The Man wants all day, I make good $$$. I don’t know what you do exactly, but if you aren’t getting paid for code then I guess you’re either working at something you like better and coding as a hobby, or you aren’t tied to the capitalist treadmill at all and get to code whatever you choose all day; I don’t know. But you probably have your compensations.

                    I do know that it is super unlikely that there is a class of impoverished coders out there unable to find good paying jobs. Tech companies like the one I work for are desperate for talent. In the ten years I’ve been at this job I have witnessed how effin’ hard it is to find good programmers. Most of the ones the recruiters turn up are deeply mediocre, and we give up and hire the best of a mixed bunch. We have gone to great lengths like filing H1-b visas and dealing with six months or more of government bureaucracy hell, just to get one mostly-competent programmer from a distant country. In fact most of the people we hire are from outside the US, because seemingly all the local developers know nothing except React or whatever trendy web junk is popular these days … not the CS fundamentals we need.

                    In a crazy seller’s-market for coding skills like this, I refuse to listen to Marxist arguments about exploitation of the working classes. That is not the world I have seen in my 40 years in this industry.

                  2. 5

                    If you’re not, you are indeed an idiot, unless you encumber your software with a license that forces such recompense.

                    Well, that’s exactly the point of the article. If you don’t want to be exploited, don’t use MIT, but instead use this or this license.

                  3. 3

                    I think you overestimate how common those “idiots” are (I disagree that the world is “full” of them as snej explains in the sibling comment), maybe due to the occasional cases that get a lot of attention, and I think you underestimate how a spirit of giving can benefit the commons, for genuine non-financialized benefit to the giver and others. Copyleft hasn’t solved the domination problem, and with AI-(re)written code being a likely dominant future force, I won’t be surprised to see license relevance decline. There’s other approaches to the world’s problems than licenses, and maybe in some cases restrictive licenses trap us in local minima.

                  4. 4

                    I feel similarly, in terms of over-focusing on licenses, and I don’t care what the not-well-intentioned people do with most of the code I put online; not that I would never speak out but life’s too short and I’d rather focus on other ways to convey my values and have a positive impact. (this isn’t a statement against other people using copyleft or non-commercial, I still consider using them in some cases) Two licenses that might fit those goals better than MIT are the public domain Unlicense and WTFPL.

                    With the future looking like it’ll be full of AI-assisted code trained on every open codebase, we need solutions other than licenses more than ever. “Computer, generate me a program in Zig that passes the LLVM test suite in the style of Fabrice Bellard.”

                      1. 5

                        Problem with some licenses like Unlicense is that not all jurisdictions allows you to voluntarily place your work under public domain, so in such jurisdictions that license is void.

                        1. 5

                          Thanks for pointing that out, do you know of the best alternative? The Unlicense Wikipedia page says the FSF recommends CC0 instead.

                          From Wikipedia on CC0:

                          Or, when not legally possible, CC0 acts as fallback as public domain equivalent license.

                          1. 4

                            The Unlicense also intended to do exactly that. The “Anyone is free…” and the “AS IS” paragraphs are the fallback.

                            1. 3

                              While the FSF recommends the CC0 for non-software content, they do not recommend it for software. The OSI has similar concerns.

                        2. 2

                          Jim Weirich (author of rake, rest in peace) used the MIT license for most of his work but a few smaller projects used this simple license:

                          You are granted permission to read, copy, modify, redistribute this software or derivatives of this software.

                          It’s important to grant at least some license, otherwise (as I understand it) in the US you do not have any rights to make copies of the work unless you are the copyright holder or are granted a license. There is a lot of old software in the world where the author has passed away or otherwise moved on, without ever granting an explicit license, leaving the software to sit unused until the copyright expires.

                          (I am not a lawyer and this is not legal advice)

                          1. 1

                            What happens if you copy paste a 20 line script from a blog and include it in the project of a product you make in the context of a private company of yours which doesn’t publish its code?

                            It’s not like the open source police will read all your source files and search line by line to try to find it out there on the web. If anything, most companies a ton of low quality code that no one wants to look at.

                            1. 2

                              I think you are making the point that a license does not in practice restrict someone from using your code under terms not granted by the license; I agree.

                              You wrote that you wished “software authors would be less possessive about their code and put the focus on the code itself rather than overhead”. I also agree with that sentiment, but I do not believe that implies publishing code “without bringing the boring licensing discussions to attention” (which I interpreted as “without a license”) is the best path to putting the focus on the code.

                        3. 3

                          The most common thing that I see is a pair of products. Product Community Edition is MIT or BSD or AGPL or, occasionally, GPL, and comes with a git repo and a mailing list, and a refusal to take patches unless accompanied by an IP transfer. It’s always free.

                          Product Business Edition or Enterprise Edition is licensed on commercial terms and includes at least one major feature that businesses feel is a must-have checkbox item, and some amount of support.

                          I used to see a bunch of open source products where the main (usually sole) dev sold a phone app that went with the product, in order to raise some money. That seems less popular these days.

                          1. 3

                            As you and I have discussed here before, it is quite reasonable to talk about Free Software licenses which are effectively non-commercial. The licenses I enumerated at that time are uniform in how they would answer your questions: yes, all of those things are allowed, but some might be unpalatable to employers. Pleasingly, on your third point, a company would be afraid to try to use Free Software provided under these licenses, even for purposes outside their charter of commerce.

                            1. 3

                              I got something slightly different from reading the post; it’s not “you can differentiate between commercial and non-commercial” in a license; it’s “if you want to differentiate between commercial and non commercial then don’t dual-license using the MIT license because that creates ambiguity”.

                              1. 5

                                Just to be pedantic, it doesn’t create ambiguity. MIT pretty much lets anyone use it, where your intention was probably not that. Therefore, the issue isn’t ambiguity, it’s redundancy.

                              2. 3

                                I don’t see why one couldn’t write a software license that differentiates between commercial and non-commercial use, using whatever criteria the license writer wants for edge cases. That will probably end up not being a free software license - a license that attempts to judge what kinds of uses of software count as “commercial” and legally forbid them limits user freedom to use that software in a way incompatible with the notion of free software - and this will affect free software advocates’ willingness to use software licensed under such terms. But there are plenty of non-free software licenses in this world, what’s one more?

                              1. 9

                                The piece ends with:

                                we need new regulation to align them toward creating software that better serves our society

                                As deflating as it might be, I agree with this, with perhaps a more abstract interpretation of “regulation” than many readers. We may jump to thinking about state control and other top-down reactive power, but that’s only one form, and I’m curious about the other possibilities.

                                For example we can imagine democratic organizations that are sufficiently self-regulating, especially if the demos is expanded to include users, as in platform cooperatives. In this scenario, regulation itself can be more decentralized with thoroughly aligned incentives and ongoing democratic negotiation and accountability, which, as the author says, is politics – not always energizing to would-be creators of these systems! But happily there are plenty of good-hearted wonks and negotiators among us.

                                1. 20

                                  Linus Torvalds is convinced Rust will take over the Linux Kernel.

                                  Not exactly. From the source article:

                                  However, he said that for things “not very central to the kernel itself”, like drivers, the kernel team is looking at “having interfaces to do those, for example, in Rust… I’m convinced it’s going to happen. It might not be Rust. But it is going to happen that we will have different models for writing these kinds of things, and C won’t be the only one.”

                                  1. 3

                                    Yeah, that’s weird. Was the whole article a big joke?

                                    1. 1

                                      I thought there were a few strange claims and editorial choices in it, but overall it seems like a good summary.

                                  1. 2

                                    Neat. One thing to note about the <details> tag is that all of its contents will be rendered on the DOM, even if not displayed - which is what you’d expect. But often for various reasons, an implementation will want the contents lazily rendered, only mounted when the details are expanded, and the builtin tag doesn’t offer this.

                                    1. 2

                                      There’s actually a really great benefit here that isn’t talked about as much as I think it should be, search. Lazy rendering of DOM renders the built in search of the browser kinda useless. The contents of <dialog> being searchable means I can search through menus and more without requiring additional JS search.

                                      1. 1

                                        Good point, plain text should normally be eagerly rendered because of this - lazy loading is good for heavier resources like images, and sometimes components for behavioral reasons.

                                    1. 2

                                      I still feel like I’m stuck in mid 201X regarding my frontend skills. To be honest I just don’t want to invest the amount of time it’ll take to get fluent in a “modern” stack, so some basic vue/react with bootstrap it is. And the moment you’ve started doing something for frontend, it’ll already feel like you’re outdated and behind (svelte)..

                                      1. 7

                                        Dude, don’t worry about it, that stack is 100% fine, and not outdated. Getting sucked into FOMO about JS frameworks and tooling is a total trap. If you’re not a full-time frontend engineer, use whatever gets the job done.

                                        Once you feel like learning something new would be a fun way to spend two weekends, go for it.

                                        Tailwind is awesome for example, but there’s not that much to it. It’s just some nice atomic utility classes, but that means you build all the component styling yourself (buttons, cards, …) instead of using the ready-made bootstrap abstraction.

                                        1. 2

                                          Wow didn’t fully read your comment and just now noticed we both mentioned tailwind! I’m so addicted to it!

                                          1. 3

                                            I agree, it somehow hits exactly the right level of abstraction. For me it nudges me into some possibilities I would never have tried with bootstrap or pure CSS.

                                            For example last year I had some really opinionated vision for a travel planner UI that would have been completely boring and bad with just prefabricated components: https://gllvr.com. I’m sure my implementation is still kind of rubbish for a lot of use cases, but I couldn’t even imagine doing it with bootstrap/bulma, etc.

                                            1. 3

                                              I really like the UI on that travel planner.

                                              I’m sure it has more to do with the way my background has warped my mind than with anything inherent to either approach, but I found it easier to build buttons/cards/etc with these utilities than I did to get the ready-made ones to look/work the way I wanted them to.

                                              I would have found it devilishly hard to get that striped component in your planner (where you click on the left side to type in where you’ll be sleeping or click on the right side to copy the previous night’s location) to be anything like what you made in bootstrap. I do suspect there are people out there who wouldn’t find it so, though.

                                              1. 2

                                                That’s a great UI!

                                                I agree, tailwind makes me more likely to experiment and try new things too.

                                                With bootstrap you’re too often locked in to how a certain component works, and it’s really hard to change the way components behave.

                                                It has given me a second wind with frontend stuff, and I’m actually enjoying making websites again!

                                          2. 3

                                            Vue, React, Angular, Svelte, and most frontend frameworks since React and Angular 2, are modern UI component frameworks. Once you understand components deeply, the learning curve for any of the others is much shorter. Svelte may be well designed and easier for beginners than most, but part of why people report picking it up in an afternoon is that they already understand components.

                                            The details differ between frameworks, especially with the direction React has gone with hooks, but despite the proliferation of frameworks in recent years, there’s been a substantial convergence on components since the days of Backbone, Angular 1, jQuery, Knockout, and all of the other not-quite-component frameworks. They may have been fewer in number back then, but the fundamentals varied widely across tools. The situation today is much more approachable despite the memes.

                                            1. 1

                                              I find react to be quite horrible if you want to use or do stuff that doesn’t exist for it as a lib. (Also don’t get me started on the amount of packages and reported CVEs in a hello world..)

                                              1. 1

                                                Really? I generally don’t use any React-specific libraries, and React itself I’m sure has few or no dependencies (I use Preact most of the time, so I’m not sure the state of React). Are you talking about create-react-app? I’ve never used it myself, it seems totally unnecessary.

                                            2. 2

                                              I’ve been using bootstrap for years, and I loved it but some things just didn’t feel quite right.

                                              I’ve recently switched to tailwindcss and it has made me so happy. Doing anything is just better and feels more fun. Also you don’t end up with loads of custom CSS.

                                              If you switch away from bootstrap I can almost guarantee your life will be better :)

                                              This is the post that finally changed my mind:

                                              https://adamwathan.me/css-utility-classes-and-separation-of-concerns/

                                              EDIT: tailwind is really easy to learn if you’re worried about that. Also, the documentation is amazing

                                              1. 1

                                                That post, plus about 20 minutes with this tutorial persuaded me that I was interested in giving tailwind a real try.

                                                I found that having one workspace with two browsers tiled next to each other, one with my site and one with the tailwind docs, and a second with the code open, made it really fast and enjoyable to try things out. The search on the tailwind documentation is especially good, and the live updates that come with svelte running in dev mode are very snappy.

                                                It’s actually pretty high on my list to dig in and see just how those live updates work. There are a couple of spots in my own code where I could use a similar mechanism to very good effect, assuming it’s not leaning on some heavy mechanism that gets shaken out in the production builds.

                                              2. 2

                                                I was stuck with jinja + a little jquery for my front end. So state of the art 2008? It was starting to slow my ability to explore some ideas in a way I wanted to share. I don’t think I’d have been motivated to spend 30 hours exploring this for a couple of weeks if I had a good grasp of vue and bootstrap.

                                                The feedback from changing something on the server in dev mode to seeing it in the client is so much faster than it was when I was writing jinja templates and sending them in response to form submissions. That’s one of the major improvements of moving for me, and I think vue/react/bootstrap would’ve gotten me that also.

                                                This stack just lined up with my mental model a little better, which meant a lot as I was trying to learn a pile of “new” all at once. Tailwind’s utility structure combined with the way styles are scoped by default in svelte made it easier for me to think about my UI layout than it ever has been for web stuff.

                                              1. 1

                                                Has anyone used Svelte and can give a small comparison between this and the other popular frameworks right now? (Vue and React I guess?)

                                                I’m making a small web interface and I think it could use some… interactivity; I tried with React because that seems like the most popular and the best thing to put in my CV but it’s been confusing so far.

                                                1. 4

                                                  Svelte code usually needs fewer characters to accomplish the same thing and its output is typically smaller and faster. (not always, and Vue may win some benchmarks nowadays) On the more subjective side of things, I find there’s less abstraction and a simpler mental model for working with components and the DOM. There’s a lot of power and flexibility behind its apparently simple syntax and features - animations in particular are nice coming from React - but it makes some tradeoffs to prefer statically analyzable constructs over unfettered runtime flexibility. (e.g. things like mapping over and introspecting props and slots are unofficial hacky APIs at the moment) In practice I haven’t been hampered but YMMV. Some open issues might fill in these gaps.

                                                  It’s closer than most frameworks to working directly with plain JS/HTML/CSS, and it’s sometimes called an unframework because of how it compiles its components to simple JS with imported helpers, not too different from optimal hand-written vanilla JS, but with modern declarative components. I wrote this fairly comprehensive overview with React and Vue in mind a few months ago.

                                                  I agree React and Vue are both better for your CV. Svelte might stand out for some people.

                                                  The official tutorial walks you through a lot of the basics. An hour or two with it and the examples should give you a good taste for it.

                                                1. 27

                                                  So AFAICT this is the tradeoff the author consciously rejects, and the one that Svelte consciously chooses:

                                                  • Choose writing in a JS framework that is compiled ahead of time, over writing in a JS framework that is interpreted at runtime.

                                                  The disadvantages of this tradeoff that weigh on the author’s mind:

                                                  • If your language is compiled, debugging is harder because the compiled code that is run does not resemble the source code you have to fix.
                                                    • They also make the point that it’s confusing that Svelte code is Javascript, but it needs to be compiled to run it, which may change its behaviour. (To me that’s not that different from frontend framework code that is valid JS/HTML, but needs the framework runtime to run it, which may change its behaviour.)
                                                  • If in the future more front-end-systems compile to Javascript instead of writing in it, it becomes harder to glue them together.

                                                  I think it’s interesting to look how Elm solved these, because like Svelte, it is compiled ahead of time to small and fast JavaScript that doesn’t resemble the source code.

                                                  Elm’s solution to ‘you have to choose between debugging the runtime JS or the source code’ is to go all-in on making it easy to debug the source code. In Elm’s case, it is an ML-family language with a type system that guarantees zero runtime errors (but won’t save you from domain mistakes, obv.), and with compilation error messages that are so helpful that they have inspired many other languages.

                                                  Svelte, presumably, wants to remain Javascript, so a lot of error prevention becomes harder. They mentioned they want to add Typescript support. Or they could add source maps that relate compiled JS to the original Svelte code? Also, debugging compiled projects is a very old craft, it only really gets onerous if the problem is low-level or compilation is slow. I also note that Svelte compilation has a ‘dev’ flag that produces named functions, and also extra code that performs runtime checks and provides debugging info.

                                                  Elm’s solution to the interoperation problem: an Elm module can expose ports (blog post, docs that external JS can send messages into, or that JS can subscribe to. So the ports form an Elm module’s public API.

                                                  That still leaves the interop problem of styling the created components. If it’s you writing the Svelte, you can let Svelte do the styling (if Svelte is the whole system), or specify the right class names on the created DOM (if you’re writing the Svelte component as a subsystem). But if you’re reusing sombody else’s Svelte component, I’m not sure how easy it is to pass in the class names you’d like the component to use. Perhaps ‘support for caller-specified class names’ is even an open problem / blind spot in frontend frameworks in general?

                                                  1. 8

                                                    Good summary.

                                                    In one sense, all of the hard-fought web knowledge that people may subconsciously pride themselves on knowing now becomes a stumbling block. Technologies like Svelte treat the underlying web runtime as something to be papered over and ignored. Much like compiled C, being able to debug the generated code is a needed skill, but the 1-to-1 correspondence between source code and generated code is not a guarantee, and it can be disconcerting to let go of that.

                                                    I’m all for it. We largely ignore x86/x64 by using higher level languages and our code is better for it, even if slightly inefficient.

                                                    Web devs love to talk of developer experience and progress in tooling. Something something…Cambrian explosion? ;)

                                                    1. 10

                                                      I think the author’s problem isn’t so much with it being compiled, but the fact that the source code looks like JS, but your assumptions don’t hold because there’s a lot happening to that JS so the end result isn’t anything like what you typed.

                                                      1. 4

                                                        Reminds me very much of the Duck Test https://en.m.wikipedia.org/wiki/Duck_test. Svelte walks like JS and talks like JS but isn’t JS. This is typically seen as a positive for those who judge their tools, at least partly, based on familiarity.

                                                        1. 4

                                                          Yes, I agree. Elm is a language that has its own semantics which are adhered to by its compiler. But Svelte takes the semantics of an existing language (JS) and changes them.

                                                          I have that concern about Svelte too, though it’s not strong enough to change the fact that I’m still a fan and excited to see how Svelte evolves.

                                                          1. 1

                                                            That makes the article make more sense. That would be difficult to reckon with.

                                                        2. 6

                                                          Or they could add source maps that relate compiled JS to the original Svelte code?

                                                          Svelte creates JS and CSS source maps on compilation - https://svelte.dev/docs#svelte_compile

                                                          There’s also the @debug helper for templates - https://svelte.dev/docs#debug

                                                          In practice I’ve found debugging Svelte to be mostly trivial and sometimes difficult. Dev tools will help close the gap but they’re not mature.

                                                          For styling, style encapsulation is what I’ve seen the devs recommend, but nothing stops you from passing classes as props to components that accept them. (I do that a lot because I like utility CSS libraries like Tailwind) The biggest open RFC right now is about passing CSS custom properties (CSS vars) to components. https://github.com/sveltejs/rfcs/pull/13

                                                          1. 1

                                                            I think the tradeoff here isn’t about source mapping and the sort, but instead that if you take it as given that you’re going to compile your language, then you might as well through more language safety features in (a la Elm).

                                                            That might be true, but the other sacrifice is familiarity. Svelte can be learned by a frontend dev very quickly and without much “relearning” fear. Instead, you get the cognitive dissonance problem of it being almost what you expect but, then, not quite.

                                                            1. 4

                                                              if you take it as given that you’re going to compile your language, then you might as well through more language safety features in (a la Elm).

                                                              There’s a big leap from Svelte to Elm beyond just compiling the language. Elm has tremendous benefits, definitely, but it gives up seamless interop with the DOM, mutable web APIs, JS libraries, and future web standards. Elm has JS interop but only asynchronously through its ports. Purity and soundness are great but at what cost? (that’s a rhetorical holy war question, not worth discussing here IMO!)

                                                              I think TypeScript has been gaining so much adoption largely because it makes pragmatic compromises everywhere, not just because people are resistant to learning Elm/Reason/PureScript/Haskell/etc, and when support lands in Svelte I’ll be less shy about recommending it to people.

                                                              1. 3

                                                                Yeah, I think for most people in most cases, familiarity and ease are the bigger win. I’m not arguing one should use Elm, just laying out that continuum.

                                                                1. 2

                                                                  Thanks for emphasizing that point. I think I underestimate the impact of familiarity and ease for many people.

                                                                2. 1

                                                                  By seamless interop do you mean synchronous? I started trying out Svelte yesterday and found the dom interop to not be seamless as I was confused by the difference between <input value={val} /> and <input on:value={val} />

                                                                  I think from memory that’s how you get an interactive input.

                                                                  1. 3

                                                                    I meant seamless but that’s overstating it. (except for mutable web APIs and JS libraries - interop there is generally seamless because of how Svelte extends JS) Anything that isn’t plain HTML/CSS/JS is going to have seams. Svelte minimizes them to a degree that some other frameworks don’t, like React and especially Elm. Vue is on similar footing as Svelte.

                                                                    The nice thing about Svelte’s seams is they often reduce the complexity and verbosity of interacting with the DOM. In your example, it sounds like you want:

                                                                    <input bind:value={val} />

                                                                    (or simply <input bind:value /> if that’s the name)

                                                                    At the same times Svelte gives you the flexibility to optionally use a “controlled input” like React:

                                                                    <input value={val} on:input={updateValue} />

                                                                    The equivalent in plain HTML/JS is not as pleasant. Elm abstracts away the DOM element and events.

                                                          1. 13

                                                            Author here, just wanted to make a note. This isn’t written to hype a battle in the holy war. Frontend frameworks are a positive sum game! Svelte has no monopoly on the compiler paradigm either. Just like I think React is worth learning for the mental model it imparts, where UI is a (pure) function of state, I think the frontend framework-as-compiler paradigm is worth understanding. We’re going to see a lot more of it because the tradeoffs are fantastic, to where it’ll be a boring talking point before we know it.

                                                            1. 2

                                                              Thanks for this. It’s refreshing to hear a grounded perspective when it comes to frontend technologies. Now I should actually read the original article…

                                                            1. 3

                                                              I’ve loosely followed the author’s tweets about Rome and I’m excited about its ergonomics.

                                                              1. 1

                                                                There’s a lot to agree with here.

                                                                7 seems like a weak argument. That just looks like the pattern seen in Java interfaces, or ObjC delegates. React also implements lifecycle callbacks as methods. (The name attributeChangedCallback seems off, though. JS makes a lot of annoying naming decisions.)

                                                                I haven’t tried building anything significant in Svelte. On the one hand, it looks really simple and attractive. On the other hand, I’m afraid that I end up fighting the template syntax at a certain point, like old AngularJS.

                                                                1. 2

                                                                  The design tastes of Svelte and old AngularJS are polar opposites. Rich Harris (author of article/Svelte) is also trying to establish a consensus templating language called HTMLx to support a broader ecosystem. I’ve found Svelte templating to be incomplete in some areas, but I’m using it full-time now and frown at the thought of returning to another of the major frameworks.

                                                                1. 43

                                                                  John Carmack - the dude wrote Doom

                                                                  1. 6

                                                                    I always come back to Carmack. I may not agree with him on everything (notably politics), but the dude’s programming prowess is undeniable.

                                                                    1. 18

                                                                      I’d have a lot easier time looking up to him if he hadn’t taken a job at Facebook.

                                                                      1. 2

                                                                        Carmack manages to still leave a lot to be desired…

                                                                      2. 7

                                                                        After reading Masters of Doom, one thing that really stuck out to me is his relentless work ethic that leaves little room for self deception, and little patience for coworkers with dissimilar drives. I think his legendary status was and continues to be earned partially because he spends so much intensely focused time on his work, and he constantly questions his efficiency, not in a myopic way, but in a broad meta sense.

                                                                        1. 3

                                                                          Yeah. Great read. It was fascinating to see how he had someone who was fun to compliment and check his more aggressive behavior. Not that losing Romero hindered Carmack’s future success…

                                                                          1. 2

                                                                            I’m pretty jealous of people who can be that dedicated. I think the primary reason I fail as a software developer is that I’m just not nearly as passionate as my peers. I’m very envious of those who are.

                                                                            Masters of Doom has been on my reading list for a while… I really should give it a go.

                                                                        2. 3

                                                                          I admire the fact that he is still passionate about programming and technology despite having become wealthy enough to no longer have to care.

                                                                          1. 3

                                                                            Wouldn’t you be? I know I would. Part of the reason I have manacled myself to the company I currently work for is the fact that they’re a very efficient engine for getting me and my wife to retirement earlier than anything else I can think of, and once I get there I plan to A) take care of myself REALLY well and B) spend large parts of my days puttering with WHATEVER THE F!$@# I WANT and not being constrained by my corporate masters :)

                                                                            (Also it’s honestly a great place to work. Super intense, but the kinds of at scale problems we face daily are hard to find elsewhere.)

                                                                            1. 6

                                                                              Wouldn’t you be? I know I would.

                                                                              I’m not sure most of us can know what we’d do if we had lots of wealth, tried many new things (esp hobbies/causes), and then decided which we’d continue to do the most. There’s experiences we can’t have without wealth. If we haven’t had them, there’s no way to know what we’d prioritize.

                                                                        1. 21

                                                                          Possibly unpopular opinion but no. The word “drama” feels extremely dismissive. I really don’t like it when people dismiss anything as “drama”.

                                                                          If you don’t want to read a comment chain, don’t open the comments. It’s not like the whole comment chain is directly embedded into the front page.

                                                                          1. 16

                                                                            The entire point is to be dismissive, right?

                                                                            Drama submissions are categorized mainly by not being that important/actionable to daily stuff and more importantly by being “reality-free zones”.

                                                                            The Google thing, as a great example, is drama because:

                                                                            • Almost nobody who commented on it worked at GOOG and was in a position to really effect policy
                                                                            • Almost nobody argued the core points of the memo, preferring to tangent on a particular point or metadiscussion–many didn’t even read the original thing before spouting off on it.
                                                                            • Almost everybody refuses to change which side they are on in spite of evidence either way.

                                                                            Such things need to be aggressively purged from the community, because they’re toxic.

                                                                            1. 2

                                                                              Maybe toxic is a better tag name?

                                                                              1. 2

                                                                                That can easily be abused. Suddenly somone thinks React.js or C++ in general are toxic and marks everything as such.

                                                                            2. 1

                                                                              Absolutely, I was unfortunately stuck for words to suggest a less dismissive tag.

                                                                              A tag like ‘communities’ doesn’t feel specific enough to identify the precise kind of thread I’m referring to though, perhaps ‘political’?

                                                                              1. 4

                                                                                Honestly, “political”/“politics” is not a good word either.

                                                                                1. 2

                                                                                  Indeed, you’re right. Honestly I’m starting to think that not tagging these at all and just letting Flag(Off-Topic) do its work might be the best solution.

                                                                            1. 11

                                                                              I feel like this article could be tightened up to present its argument more persuasively (tldr: tsx — React plus TypeScript — files are type-checked, whereas other common templating formats, even Angular 2’s, which professes a deep integration with TypeScript, are not), but I still thought it was great, particularly the animations.

                                                                              After experiencing some disappointment with Angular 2 on a previous project, I’ve been working with React plus TypeScript recently and it is worlds better having your “templates” participating in type-checking. It’s actually the thing you want, in my opinion.

                                                                              1. 7

                                                                                Thank you for the feedback. I added a tldr to the top.

                                                                                1. 4

                                                                                  even Angular 2’s, which professes a deep integration with TypeScript, are not)

                                                                                  I believe that this is outdated as of today (literally), thanks to TS 2.3’s language service plugin API which Angular now hooks into.

                                                                                  1. 11

                                                                                    No kidding! I didn’t realize. Well, that’s pretty interesting.

                                                                                    In retrospect my original comment fell victim to the classic error: never assume that Angular 2 doesn’t contain a feature unless you have re-confirmed within the last 24 hours that it still does not contain that feature.

                                                                                    1. 3

                                                                                      Wow. I’d love to be able to update this article with some animations that show inline editor errors in Angular templates.

                                                                                      edit: aaannd there’s the vscode plugin https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

                                                                                      1. 2

                                                                                        And here’s a full talk from ng-conf going over the language service: https://www.youtube.com/watch?v=ez3R0Gi4z5A