Well... "the point of" open source for some of us is to participate in a collaborative commune where we are willing to contribute code to the collective specifically because other people are required to also contribute their code to said collective as part of a shared battle against opaque proprietary systems; so the concept that someone is going to then find it, scrape it, and "launder" what was supposed to be our competitive advantage into their closed source projects by training it into a glorified pattern recognizer and then regurgitating it into their text editor without even as much as attribution without realization that the work we did and contributed to the world was part of a tit-for-tat pact as they want to have their cake and eat it too kind of ruins it for me... like it is bad enough that I have to constantly guilt trip people into not violating my license already: systematizing it via Copilot is making me think that we might need even stricter mechanisms for distribution of code within the commune so as to build a kind of "decentralized trade secret". (That said, other than your wording about "the point of open source", I agree with your doom-y sentiment 100%.)
I’d argue that this new use case is very interesting to open source and how it relates to the various licenses, and not necessarily “the point of open source”.
I can imagine people being OK with their code being used as-is, and/or being modified, but not used completely out of context to train some corporate AI to inject code into commercial code based.
You can't give out something for free without limitations and then complain when someone uses it for something you didn't expect. Well you can complain but no one has to listen.
Githubs use seems very in the spirit of open data and code. Using open source to help others.
We didn't give it away for free without limitations: we carefully drafted licenses to attach to our code to establish legal boundaries on what we considered acceptable; my code, for example, is under GPL, which says "I am OK with you using the products of my labor under the requirement that you will then let me use the product of your labor"... hell: almost every bit of open source code has at minimum "I am OK with you using the products of my labor as long as you are at least willing to give me credit somewhere", a minimal limitation that Copilot doesn't honor (and prevents its users from honoring): Copilot is essentially a giant code launderer designed to strip away licenses from effort that was only contingently given to the community.
Licenses explicitly are the set of permissions and limitations for someone to use the code. Even most permissive open source licenses require that you maintain an attribution with the text of the license in derivative works. Copyleft licenses and in particular the GPL put very strict requirements on what types of licenses are acceptable in any derivative works.
In literally no open source license except "do-whatever-you-want-i-dont-give-a-damn-bye"-type licenses like WTFPL are you giving something away for free without limitations. That's not even close to what open source means, at all. Open source and public domain are not synonymous terms. And in those cases where there are literally any terms in a license, use of Copilot obviously violates the terms of the license, unless the user operating Copilot goes back, finds the code Copilot is stealing from, and makes the proper attribution / otherwise ensures that they are meeting the terms of the license of the stolen code.
Agreed. I am considering relicensing all of my permissively licensed code because of this. The fundamental assumptions I had when releasing that code under a permissive license have been violated.
Under GitHub's legal theory (fair use), nothing you put in that license file can stop them from doing so legally.
If copyright applies, they're already in violation by failing to attribute your MIT contributions and could theoretically be sued for infringement (as they did not abide by the terms of the license).
When you use a permissive license, it’s best you stop thinking of it as your code. You’ve set it free for everyone, and while you may retain copyright in some abstract sense, it really no longer belongs to you.
While I agree with you--in that the vast majority of people who publish code under permissive licenses actually have an implied set of "moral code" restrictions that they end up surprised people violate even though they specifically allowed such by their choice of license (implying they should have chosen a different, and likely more restrictive, license)--even permissive licenses tend to at least include "you can't take my code without crediting me for taking my code", and so I can appreciate someone being upset about that not happening.
The future might be going towards affordable jailed devices to the general public, and expensive general-purpose devices for specialists. Definitely most people just want consumption devices.
There are many people that wants child rapists to get death penalty, a lot of people liked Bush, Trump or Putin, or believe some guy living 2000 years ago did wonderful things against the laws of physics. They are not really thinking about the consequences on society, they don't know how a computer work and what is going to happen if behemoths get in control of their entire life, which is well on its way.
Because a computer is not your regular run off the mill appliance. It drives the way people communicate, think, consume, are informed and monitored.
Also it has a mesh network of devices (see airtag), which makes it even more intrusive: you can be offline, but if you use your BT headphones, they can get to you. They say they protect your privacy but I never forget they were part of PRISM, so their words are worth nothing.
Doesn't matter if that doesn't hold in court. The whole problem is that loosing in court has no cost for them, but just going to court is a net loss for you.
Again, doesn't matter. Ruling takes years. If you take $40k from me to give them back to me 7 years later, I'm still screwed. Not to mention time, energy, stress, uncertainty, and the lost of opportunity.
It's all cost for me, none for them, just to make them behave decently in the first place.
<SomeElement
v-for="item in items"
v-if="display"
@click.prevent="foo()"
:class="{'current': active}" />
Not only the react blob is impossible to scan, but it will be different depending of the dev who coded it, because there is no enforced patterns. You must use brain power to parse every single template line. HTML, that thing that was simple and declarative, now becomes complicated and imperative.
And that's not even weird or unusual code. That's regular stuff one writes all the time. Don't get me started on state management or spaghetti hooks.
I have yet to work on a react code base I was more productive than on a vue one. And the gaps get wider if the team is not composed of excellent coders, because react code by junior is a nightmare.
Well, the fact that you're "just using javascript" in jsx does also mean that you need to format things nicely to avoid having an unreadable mess. Using a code formatter like Prettier helps a lot. The "react blob" is less of a blob if nicely indented.
Admittedly due to the nature of Vue syntax, it's harder to make a mess because everything is just key/value.. but then you have to learn an API to express things in that way. I enjoy the fact that you don't have that layer/step with react.
I definitely feel that the 3rd party classnames package should be built into React, I agree that out of the box conditional class names look a mess.
I don't have enough experience with either library yet to form an opinion on which I prefer, but I definitely appreciate not having the mental overhead of remembering the vue api. I'd rather have a bit of code that's more explicit/"just javascript" than have to think "what's that symbol I need to use again?". Definitely a personal preference thing though!
That's still a blob, just a longer one, with an additional dependency and more parenthesis to mess up. It's a compromise, not an improvement.
And in the end, I still have to read 2 JS expressions before even figure out what DOM element I'm actually dealing with. Then I still have to evaluate what the heck is happening in onClick and className.
I still have to parse code in my presentational layer, code that is interleaved with my template indentation so it also makes it hard to understand hierarchy and easy to make mistakes.
Of course, the elephant in the room we are not talking about with react is that all those things compounds. When you have 5 of such blobs in your render functions, issues don't add up, they multiply.
Then you add the store system on top of it, with actions, reducers and all that fun stuff.
Vue has vuex, so there's a need for actions and reducers. React state has become much simpler with packages like zustand and it works wonderfully with typescript.
It's not really that big of a deal to have another import. Vue's directive's (not sure if that's the correct term) are a mix bag of magic strings that tie to functions somehow. Why can't they just be a function variable like in React? The answer of course is there are smart people and smart users behind both projects and those are the trade-offs we tolerate.
Vuex is vastly less necessary for vue projects than redux for react projects. I've been coding in react and vue for years, it's not even on the same planet: before Vuex we never even needed a store, just import a component, that's your model.
But even so, Vuex way better integrated, requires less boilerplate (thanks vue reactivity) than redux, or even zustand, which once you add immer, looks like blobbing all over again.
Honestly, we should do a contest. Take 10 juniors out of school give them a twitter clone to write, 5 in Vue, 5 in React, and come back in a week.
In fact, no need for them to be junior. Let's just take your regular Java dev. Not your 10X HN dev. Just average Joe. See how it goes.
We've been doing something similar at our company when hiring. The tasks are simple:
1) Build a clone of a site or implement a design with their tool-of-choice (basic competency). For the ones who opt to start without frameworks, we also get a glimpse at how good their organization skills are.
2) After they are done, we give them several "requirement changes" and see how well/fast they adapt. People can trumpet whatever best practices they believe, but this is the part of the interview where some best practices are more practical than others.
3) Modify an existing project. Here, we pick the opposite of their preferred stack/methods. ie, if they prefer vue, we give them a react or svelte app to modify. If they prefer BEM, we give them functional (we use tailwind); if they prefer utility-first, we give them BEM or smacss, etc. While it may seem on-the-spot, it gives us an insight to how well they work outside their comfort zones and adapt to unfamiliar techs.
Our in-house developers are pragmatists over purists, while still being specialists in various techs. And we're fluid with our tech/tools and everyone is at least an expert in one of the current web techs.
And the best thing (imo) about my team is, everyone is excited about new tech. We always try to one-up each other in our various specializations, hence, are also aware of the limitations of our area-of-expertise.
Which comes in handy during interviews. If a candidate says they are an expert in css, we have a resident css expert that can put their claims to the test. You wouldn't believe how many failed candidates proclaim to be a css purist, only to fall short when it comes to organizing and scaling and documentation.
Being so functional and playing so nicely with typescript was the main reason I swayed to react rather than vuejs.
The whole ecosystem of state management does feel like a bit of a wild west.. but I guess that's often the feeling with javascript.
I ended up settling with easy-peasy, which I think has similar aims to zustand. Definitely appreciate that it uses immer out of the box as that seems like a very sensible default way to go.
That requires you to create 2 new components (which unlike React, will need to be in separate files if you're using SFCs) and pass down all the props another layer.
In the end, I got around it by implementing a "passthrough" component so that you can then do
Formatted properly, I don't really find the React example any harder to read.
Your Vue example puts v-for and v-if on the same element, which is confusing - which is evaluated first? (IIRC, the answer depends on which version of Vue you are using).
> it will be different depending of the dev who coded it, because there is no enforced patterns
That applies to the rest of your codebase too, though. It's up to your team to decide on patterns and enforce them through linting, code review, and automatic formatting.
Also, both of your examples are missing `key`, though React will warn you about it and Vue will not.
> Also, both of your examples are missing `key`, though React will warn you about it and Vue will not
Vue will warn when you're missing a key on the loop.
>That requires you to create 2 new components (which unlike React, will need to be in separate files if you're using SFCs)
Your components don't need to be in separate files even when using SFC's.
Given 'component' can be as simple as adding to any Vue Component or SFC (when adding it to parent component option):
Congrats, you are reinventing part of VueJS, in a non standard, untested, undocumented, less readable way. But wait, you need another lambda to pass arguments to foo() should it change. And another wrapper for stopPropagation. And so on, and so on.
And now you have to install and manage deps, import them, while your blob is still less readable because you have maps+lambda+&& to understand before even reaching what DOM element you are manipulating.
The premise of React is that composing primitives is better than having a high level tool to do the job: it's supposed to be more generic, more flexible, easier to learn.
In in my experience, it's true only in the case you don't have a well defined problem. But with frontend UI, we do. We know very well the problem to solve. Give me helpers. Give me wrappers. That's the only case where I welcome a DSL.
I don't want to have to think in functions and workflow in my template.
Not a fair comparison: there are way more people that are going to be vaccinated than to be contaminated. Also, I assume those stats are for people with symptoms ?
A 5kb packaged VueJS without component and 2 new directives to make it easy to sprinkle JS on top of server-side served website.
I use Vue often like this, since you always were able to put the template directly in the HTML like in AngularJS 1 with this lib. But petite-vue improves a lot the ergonomics of doing this. It seems also great for prototyping, and feels even more minimalist than svelte (which the new Vue 3 API already compete with).
Now, with coupled with projects like htmx (http://htmx.org) and tailwind (http://tailwind.build), you can create quite a serious reactive website with minimal JS needed. Or create a huge unmaintainable mess, since not DRY mechanism is present by default.
Between this and the fantastic ViteJS (https://vitejs.dev/), Evan You seems really committed to giving the JS ecosystem a boost in usability. I'll stop now, I'm gonna sound like a PR piece. But as a python dev, anything that makes JS more fun is an absolute win.
If your code is open source, they will get it.
That's kinda the point of open source.