my thoughts on ruff

Поделиться
HTML-код
  • Опубликовано: 5 июл 2024
  • short and (bitter)sweet.
    playlist: • stream faq
    ==========
    twitch: / anthonywritescode
    dicsord: / discord
    twitter: / codewithanthony
    github: github.com/asottile
    stream github: github.com/anthonywritescode
    I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
  • НаукаНаука

Комментарии • 86

  • @timothycrosley
    @timothycrosley 4 месяца назад +24

    On a small positive note, isort had become an unwieldy beast that I was terrified to maintain and ruff gave me a nice logical exit ramp, so now hopefully I can work on more interesting things when I finally have Open Source time again.

  • @uwot918
    @uwot918 4 месяца назад +37

    New form of Defensive Programming: Only write fast software, so that no one can punk you by writing a fast version of your stuff

    • @randomneo4538
      @randomneo4538 4 месяца назад +1

      do it for free. do not make money on it. you'll get you thanks, but if you only care about money and profiting, do not cry about people complaining about it

  • @joels2495
    @joels2495 5 месяцев назад +44

    What would you have liked to seen contributed back to say Pylint or Flake8?

    • @vinitkumar2923
      @vinitkumar2923 4 месяца назад +13

      Money in the form of sponsorship would be a good way to say thanks for the thousand hours those developers put into building those?

    • @workflowinmind
      @workflowinmind 4 месяца назад +6

      @@vinitkumar2923 How is that their responsability? I'm trying to understand Anthony's take but I don't get the "property" aspect.

  • @ac130kz
    @ac130kz 5 месяцев назад +62

    I think they did a great job accumulating, rewriting everything at a single place, I'm sure they'll contribute to a similar project. It's like writing a review paper, the credit goes to the one, who gathered it all, and it's a totally valid thing, because it seriously moves the current state of the art

  • @stinkykyle96
    @stinkykyle96 5 месяцев назад +49

    The article in the video says “Astral’s mission is to make the Python ecosystem more productive by building high-performance developer tools.” And they mention later that all tools they build will remain free in the future. Idk it sounds like they’re contributing back in a big way here
    Also they say “Raising money gives us the ability to build that team (there are now three of us), to fully invest ourselves in the work, to support our community contributors, and to build for the long-term.” This doesn’t sound like 100% profit to me
    Not trying to defend them as I just heard of Ruff today, I’m just confused by the conflicting statements. Maybe they aren’t true to their word?

    • @anthonywritescode
      @anthonywritescode  5 месяцев назад +26

      if one of their goals is to support community contributions: shouldn't they start by supporting those whose work they derived from?

    • @eksortso
      @eksortso 5 месяцев назад +12

      ​@@anthonywritescodeThe Ruff team consists of three developers, they say. If this is the case, we could see where else they have contributed to upstream projects by reviewing those projects and their forums for their activity. Has any work been done to look into their other contributions?
      I know this is a hot-button issue right now. Despite the freedoms that open-source licensing provide, including making a profit, there are many naive developers who never took this into consideration when licensing their own work. They'd have a right to be upset, if they had not given that right away. I can sympathize with them; they very much wanted their work in linting and formatting to shape coders' environments, and they've been extremely successful. I admire that. Ruff's company will be looking at the same things as they figure out how to sustain themselves in the long run with their core product being under the MIT license. I wish them well, and good luck making it work.
      I currently use Ruff on my Python projects at work, and they've helped me keep my code in top shape, more than I could have imagined with flake8 and black alone. They're doing good work, and it doesn't bother me because they do cite all their influences in their rule documentation, which on its own is a significant achievement.

    • @anthonywritescode
      @anthonywritescode  5 месяцев назад +16

      perhaps you are confusing the _legal_ aspects with the _ethical_ ones. if you watched the video I made very clear that everything that's happening is well allowed legally

    • @eksortso
      @eksortso 4 месяца назад +11

      @@anthonywritescode I am definitely not confusing legal and ethical issues here. But when a permissive license is assigned, there are obvious consequences that can affect values that we seek that are not explicitly covered by open source licenses, like developer compensation. For this particular matter, the issues surrounding compensation are not addressed by the licenses, and frankly, I feel that the software license isn't the place to discuss it. That's not what the licenses were designed for. Unless someone is willing to make opportunities for a community aligned with compensatory action, perhaps tangentially with software-freedom goals, then those actions won't be taken. Perhaps share-alike licensing, like the many GNU or Mozilla public licenses, can help to bring such communities together, focused on both the software's integrity and the coders' needs.

    • @randomneo4538
      @randomneo4538 4 месяца назад +3

      telegram also claimed in the past that will be free forever. and where we are now?.. also I don't believe people that rewrites some opensource software and then starts making money on it...

  • @sarjannarwan6896
    @sarjannarwan6896 5 месяцев назад +61

    Their repo says it's under MIT so not sure what the issue is? As for profiting off your work, isn't that the assumption with open source? That your tool will be used at a company that will make money.
    Maybe it sucks that this will overshadow your project in the same way that nvim might overshadow vim. But I'm trying to see what the problem is here?

    • @vinitkumar2923
      @vinitkumar2923 5 месяцев назад +37

      Understanding the intricacies of open-source software (OSS) involves appreciating the dedication and effort poured in by individuals over years, often without financial compensation. These contributors form the backbone of many tools and frameworks we rely on daily. Take, for instance, the case of developers who invested a decade into crafting tools like flake8, pylint, black, among others.
      It's not uncommon for newer projects to leverage the groundwork laid by these pioneers, benefiting from their hard work and expertise. However, what sometimes falls short is reciprocity. While the MIT license allows for such appropriation, a more conscientious approach would involve giving back to the initial contributors, either through code contributions, financial support, or acknowledgment.
      Consider the scenario where a tool like Ruff gains prominence, potentially overshadowing existing linters and becoming the de-facto standard. There's a legitimate concern about the future direction of such projects, particularly if they are backed by venture capital and prioritize revenue generation. While it's not an indictment of the individuals behind these projects, history has shown instances of projects pivoting their licenses or business models, causing disruption within the OSS community.
      To safeguard the ethos of OSS and promote sustainability, it's crucial to advocate for foundations and non-profit organizations. These entities provide a stable framework for collaborative development while ensuring projects remain community-driven and resistant to commercial interests. By endorsing such initiatives, we uphold the principles of openness, collaboration, and long-term viability within the OSS ecosystem.
      In essence, while acknowledging the innovation and progress brought forth by newer projects, let's also champion a model that honors the foundational contributors and fosters a sustainable future for open-source software.

    • @sarjannarwan6896
      @sarjannarwan6896 4 месяца назад

      @@vinitkumar2923 I guess you could say this is similar to a DocumentDB/Elasticache type comparison. Which I guess does go too far as it copy and pastes OS work and coopts it almost entirely (not just using components of it). Maybe not as bad with the license used but it doesn't make me super comfortable.

    • @vinitkumar2923
      @vinitkumar2923 4 месяца назад

      @@sarjannarwan6896No, I am not comparing it with such or even with what Amazon did with ElasticSearch. It's more like taking a decade of hard work from folks like Anthony, and not giving enough credit and money back to the community when they raised millions in funding. Ruff wouldn't exist without tools and rulesets of tools like flake8, black etc. all made my volunteers spend their personal time on this.
      The Problem is that Ruff is much faster than these tools and many will switch to it and make it the de-facto standard. But what happens under VC pressure they are forced to switch licenses? There are many examples of this (take Redis for example). I would any day trust OSS tooling built by community than a company that raised money from VC and are going to bait and switch very soon.

    • @vinitkumar2923
      @vinitkumar2923 4 месяца назад +1

      @@sarjannarwan6896
      > Which I guess does go too far as it copy and pastes OS work and coopts it almost entirely (not just using components of it). Maybe not as bad with the license used but it doesn't make me super comfortable.
      I have been doing software for more than a decade now and believe me, there is no OSS tool built with VC money that has not done bait and switch or introduce a base and pro model when they get enough traction or become the standard. This single fact should make you uncomfortable.

  • @hydra147147
    @hydra147147 5 месяцев назад +83

    Ruff itself is released under an MIT license, doesn't this count as "contributing back"?

    • @Ash-qp2yw
      @Ash-qp2yw 5 месяцев назад +3

      Not really. Theres probably hundreds of thousands of lines of code that other people have written and updated being rewritten in rust with no mention of thanks given to the work that came beforehand.

    • @zbak1337
      @zbak1337 4 месяца назад +26

      @@Ash-qp2ywdo all the times pylint, flake8, etc are mentioned in the docs or in the talk python ruff episode not count as acknowledgment? And have you ever thanked the maintainers of those projects, or do you just use them?

    • @Ash-qp2yw
      @Ash-qp2yw 4 месяца назад

      @@zbak1337 straight up never heard of talk python, but a one-off mention in (what I assume is) a podcast doesn’t count. I use flake8 in pre-commit regularly in my personal projects and have been advocating for using it at work, and we used pylint at my last job.

    • @workflowinmind
      @workflowinmind 4 месяца назад +1

      @@Ash-qp2yw They acknowledge that everywhere what do you mean?

  • @markjackson264
    @markjackson264 5 месяцев назад +16

    Hey Anthony, I just wanted to say well done staying professional about communicating your perspective on Ruff. I personally know that it can be hard sometimes when you see others profiting off your work like this.

  • @andip3domi702
    @andip3domi702 4 месяца назад +6

    I understand the frustration.
    While all opensource work is mostly based on some other opensource work, it would be ethical to contribute upstream (code and monetary wise).
    But this is not mandatory.
    And, sadly, everyone who does MIT level opensource should be in peace with the fact that someone may copy 1:1 their work and make it better, making your own branch obsolete and "put you out of work".
    Said that, there is improving code and repackaging code and those are two different things.
    The first one relays on you having more/better/different knowledge to do something, the second one relays on the work of other people for you to "repackage". And if the upstream project dies you probably will not have much to "repackage".

  • @argus456
    @argus456 5 месяцев назад +27

    I agree fully with the principles you've stated, but I do wonder what kind of contribution you would expect to get back in this case? I don't think there is much that can be merged "upstream" as it's fully reimplemented, so would you want ruff's author to add work to flake8 and others that's not necessarily connected to ruff? I'm just wondering how you view this in practice

    • @Quarky_
      @Quarky_ 5 месяцев назад +5

      It's easy enough to backport fixes that are in ruff, but not upstream, and particularly after receiving seed funding, not sponsoring upstream projects financially doesn't look good.

    • @d3stinYwOw
      @d3stinYwOw 5 месяцев назад +1

      For example, ruff implements it's own rules. Would be great to see them merged over to projects from which ruff got inspiration.

    • @anthonywritescode
      @anthonywritescode  5 месяцев назад +17

      if significant funding is raised based on ripped off work how do you think? I didn't state it explicitly in the video because it should be blatantly obvious what the ethical thing to do would be.
      working together obviously would have been the desirable thing had it been approached from the start. but instead it was steal as much as possible until there's significant traction and then no reconciliation afterwards
      it's perhaps too late to fix at this point but at least I have presented my unfortunate perspective

    • @anthonywritescode
      @anthonywritescode  5 месяцев назад +9

      it would be "pretty cool" if the people who put in the decades of hard work saw a cent of it

    • @Ash-qp2yw
      @Ash-qp2yw 4 месяца назад

      @@MartynPSat the most, it would have been indirect in an “I worked on this cool project and listed it on my resume” kind of way

  • @pepemcpepe3949
    @pepemcpepe3949 Месяц назад

    good to hear your opinion on this. I've only heard of ruff from work and only thing mentioned is "fast".

  • @dmytroparfeniuk2670
    @dmytroparfeniuk2670 5 месяцев назад +1

    You know... kind of a thinking about leaving the ruff. Do you think that those situations may change opensource projects and their licences?
    btw, thanks for a huge impact on libraries that I am using every day.

  • @TreyKeown
    @TreyKeown 5 месяцев назад +11

    Interesting. I've been using ruff, not aware of a rift in the community. Totally understand the frustration at a company being formed around what should be community tooling.
    Still confused why a company was formed around ruff. Not sure where the long-term revenue source is supposed to come from.

    • @Ash-qp2yw
      @Ash-qp2yw 5 месяцев назад

      Feels like it's mostly going to be from VC like other companies that make open source software, tbh

    • @gentlemanbirdlake
      @gentlemanbirdlake 4 месяца назад +5

      maybe pocket change found amongst all the lint

  • @sillybuttons925
    @sillybuttons925 4 месяца назад +7

    The last words "that's ruff"

    • @lspai8367
      @lspai8367 4 месяца назад

      I was browsing the comments to find this one. (Sorry about my dark sense of humor 😅)

  • @chrisjsewell
    @chrisjsewell 3 месяца назад

    Hi @anthonywritescode I'm interested if you have any thoughts on how you would now approach any new endeavours similar to flake8;
    just not do it, keep it closed source (assuming the use of a compiled language), different licensing, ...?
    Definitely feel for you and the community, and makes me thinks twice how I approach starting open source projects

    • @anthonywritescode
      @anthonywritescode  3 месяца назад

      "not do it" is what I'm sticking to

    • @chrisjsewell
      @chrisjsewell 3 месяца назад

      @@anthonywritescode thanks for the reply, sad to hear 😢

  • @goncaloazevedo9822
    @goncaloazevedo9822 5 месяцев назад +2

    hey anthony, could you do a video on python memory profiling? thank you!

  • @rinaldo-rex
    @rinaldo-rex 5 месяцев назад +23

    Wow! Never knew of this. Been using Ruff for many projects now, and this... actually speaks a lot about how unaware people can be. (I was, till now) On day-to-day work, we often quickly miss out on things like this because "if it works, it works and I need to get stuff done"
    Thanks for shining a bit of light on this, Anthony. And thanks for all your work!

  • @JonathanPlasse
    @JonathanPlasse 4 месяца назад +1

    Thank you for sharing your perspective.

  • @d3stinYwOw
    @d3stinYwOw 5 месяцев назад +3

    About contributions, he jumps himself to projects which adopted ruff and does PRs to update stuff. But, like many other projects, it have some shades around...

  • @jps6734
    @jps6734 4 месяца назад +4

    As developers we want fast tools, but also healthy communities.

  • @re.liable
    @re.liable 5 месяцев назад +3

    Ah that's Ruff (sorry). I knew about Astral but didn't know about this situation. It'll be interesting to see how would things unfold onwards
    fwiw thank you (and the other contributors!) for your work

  • @nammant
    @nammant 2 месяца назад

    It's really hard to hear that they just reuse on what have been spend a lot of effort and are making a profit from it.

  • @thatrand0mnpc
    @thatrand0mnpc 5 месяцев назад +1

    Python should have high performent first party dev tools.
    Honestly pylint flake8 black mypy etc can take a while to respond when you have them running via ide extensions.

  • @michaelsterling3180
    @michaelsterling3180 4 месяца назад +4

    It seems like the next step is for somebody to pull apart the components of ruff so that they can be used by upstream projects while benefitting from the speed enhancements. It seems like it would make sense for the core file parsing, caching, etc. to be written in something performant like rust, while providing hooks from other languages for actually implementing the rules.
    I am extremely aware that there's a lot of handwaving in what I just said haha.

    • @tylerlaprade642
      @tylerlaprade642 3 месяца назад +1

      Rust is a fundamentally different paradigm. All the rules are written in Rust, often requiring very different implementation than the original code. If the rules aren't running in Rust, they aren't going to be fast, and there will be no benefit. This is why it doesn't make sense to "contribute the fixes upstream".

    • @michaelsterling3180
      @michaelsterling3180 3 месяца назад

      That makes sense that the rules might need to be implemented in Rust (though I'm not 100% convinced you couldn't have some python interface for that), but that wasn't exactly what I was focused on.
      Ruff took a bunch of ideas from a variety of linting projects like flake8 (specifically their rules) and reimplemented them all in rust for massive speed gains. I agree because of the very different implementations ruff can't contribute back upstream to flake8 in terms of code, but it did hugely benefit from all of the work folks had done to come up with all of the various rules in the first place.
      **If** the ruff team wanted to contribute back to the projects it benefited from, one way to do so would be to design the internals of rust in such a way that other more specialized linter projects like flake8 and isort could use ruff internally but still own the interface, rules, etc.
      None of this is to say that anybody here did anything wrong or that any of them are obligated to do anything like this. But it would be nice for the community!

    • @tylerlaprade642
      @tylerlaprade642 3 месяца назад

      @@michaelsterling3180 I feel that would actually be much worse for the community. The beauty of Ruff is I can run one thing and it fixes and lints my entire project. I absolutely would dread going back to the pre-Ruff days when I’d have to run 5 different tools just to check my project.

    • @michaelsterling3180
      @michaelsterling3180 3 месяца назад +1

      Fair enough! I also find having a single tool convenient.

  • @marco_gorelli
    @marco_gorelli 5 месяцев назад +6

    Just out of interest, why not use your experience to contribute to Ruff and join the project?

    • @anthonywritescode
      @anthonywritescode  5 месяцев назад +23

      eyyy Stockholm syndrome :)

    • @legion_prex3650
      @legion_prex3650 4 месяца назад +6

      yeah, Anthony should work for free and contribute for the people, which ripped off his work and make money big time out of it.... lol!

  • @luiskov
    @luiskov 4 месяца назад +1

    Now for a spin, let's rewrite ruff using web assembly do universal linting and call it fluff

  • @essamgouda1609
    @essamgouda1609 5 месяцев назад +10

    Interesting, I used ruff recently but I had no idea they did that !
    OSS and the unspoken honor system that comes with it is pretty important so everyone can thrive, I hope they address that !

  • @atugushev
    @atugushev 4 месяца назад +1

    Feel your pain.

  • @vinitkumar2923
    @vinitkumar2923 5 месяцев назад +8

    I feel your pain, Anthony. The least Ruff could have done is to at least give decent sponsorship to the org and individual who made those linters in the first place. While this is certainly not illegal, but feels bad faith to me.

    • @TboneIsRogue
      @TboneIsRogue 5 месяцев назад +3

      It definitely feels bad faith. Not to mention, it discourages people entirely who did this in good faith. It's a disheartening situation :(.

  • @marsninja
    @marsninja 2 месяца назад

    100% True, W Anthony!! Preach on brother!

  • @Quarky_
    @Quarky_ 5 месяцев назад +2

    Good point, never thought about this aspect. For me, the most important part of open source is contributing back. And if that cycle is broken, then it's stealing and a burden.

  • @iliya-malecki
    @iliya-malecki 4 месяца назад +1

    I feel like they are just pushing the whole world to switch to rust to continue the work. I mean, it is in some sense inevitable that a program that has to run fast will be rewritten in a compiled language sooner or later, and this is how things should be. Yes, i do feel like to work on python linting, or any other huge scale product, one should know rust/cpp.

  • @filthyE
    @filthyE 4 месяца назад

    Totally agree.

  • @legion_prex3650
    @legion_prex3650 4 месяца назад +2

    i won't be using ruff. Just don't like it. Like flake8 and black seperated more.

  • @ManInSombrero
    @ManInSombrero 5 месяцев назад

    That's really sad, man.

  • @RuslanKovtun
    @RuslanKovtun 5 месяцев назад +1

    I have tried ruff and it is nowhere near as good as python utilities. Yes, it is faster but its speed fades on the lack of ported features.

  • @dhruvakashyap
    @dhruvakashyap 5 месяцев назад +1

    Wow! Really sad to see this sort of thing in open source. Also sad to hear someone passionate about something wanting to turn away from great work that they've done. I hope the ruff people get their act together.