• 0 Posts
  • 5 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle

  • For your second part:

    A lot of open source projects exist to make people’s lives easier at work. The people developing these projects are often also people who have jobs as devs and have a use for the projects. It just so happens that it’s easier to use these libraries at work and share them with others when they’re more permissively licensed, and there are community benefits when people all contribute back to it.

    There’s nothing wrong with wanting to go the AGPL route and forcing everyone into open source, but that makes it much harder to use these tools at work, which often kills the motivation behind building them in the first place.

    I tend to be of the opinion that community tools should be GPL/AGPL, while libraries can be anything. It works as a compromise for both - so devs can have an easier time at work while also forcing contributions back to community-developed tools.

    Edit: I should also mention dual licensed AGPL/paid commercial. That model is probably my favorite, but unfortunately uncommon.


  • TehPers@beehaw.orgtoProgramming@programming.devThe Innocent Loop
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 days ago

    This seems to me more like a complaint about JS’s functional methods on arrays being eager rather than a complaint about loops. All of this is solved in languages with iterators (or async iterators for a potentially better solution).

    For example, in C#, .Where does nothing immediately on enumerable types, and on IAsyncEnumerable, you can go as far as streaming/chunking results from a DB into the enumerable and filtering off the DB asynchronously just by passing the enumerable into an await foreach. In Rust, you get the same options (though more verbose) using streams from futures.

    Edit: the rest of the article doesn’t really have much to do with loops, but these are all solved problems in C#, Rust, and I assume other languages too. Even Python has iterables, and you can configure your thread pools however you want to for concurrency.


  • For your goals, I would stick with Python unless you want to learn another language. There’s not much value to switch away when all the tools you need are primarily designed for Python.

    As far as functional programming goes, with AI stuff, my experience is that you generally are more interested in orchestrating services than FP. For example, run input through model #1, then based on the output, run one of these other 3 models (or multiple of them in parallel), then eventually pass it all back into another service/function to aggregate and format the outputs. You can think of each of these as being “functions”, but they’re much higher level than what you’d traditionally consider functions in FP and more along the lines of microservices.