• 0 Posts
  • 19 Comments
Joined 3 years ago
cake
Cake day: March 25th, 2022

help-circle





  • (me not lawyer nor study law)

    I’ve seen some users add a license to the end of each of their comments. One idea might be this: Add a feature to Lemmy where each user can choose a content license that applies to everything they post. For example, one user might choose to no rights for their content (like CC0) because they don’t care how their data is used. Another user might not want companies profiting off their posts, so they’d choose a more restrictive license.

    I don’t think licensing your content prevents it from being used in AI models, considering that services such as Copilot were trained on data such as GPL licensed source code without having to comply with the terms it imposes when modifying or copying GPL licensed code (but it’s not just resticted to restrictive licenses such as the GPL, since according to licenses such as the MIT they would also have to credit the authors of the original work). It seems that, for now, copyright law doesn’t apply to data generated by AI models and that they don’t need to comply with the terms of the licenses of the training data (or at least they don’t seem to have been penalized for violating copyright law yet AFAIK).

    And even if it wasn’t licensed, companies can’t use your works without your permission (unless it constitutes fair use). When you license a work, you are simply giving permission to other people to do things with your work they would otherwise not be allowed to do.





  • But it is in no way worse than javascript in that regard, though?

    I don’t think static typing in Python is really so essential. I see it above all as a scripting language, so its applications don’t benefit as much from static typing as other languages do.

    Maybe a better hypothetical python would have used some kind of type inference system, like in haskell, which allows for static typing while still allowing to write code unencumbered from types and stuff, but I really think, for Python’s target domain, its type system is actually adequate or good. Maybe its documentation could benefit from type hints, though.


  • I haven’t worked with any 1-based indexing languages, but I can’t really see how it could be problematic. The only advantage I see about 0-based indexing is the simplicity in how the memory address is calculated. Just arr + index × sizeof(member) which I think even has its own MOV instruction on x86. But besides that I can’t see any more advantages. With 1-based indexing I see the advantage of the number of elements also being the index of the last element of the array, avoiding off-by-one errors when writing. Though, again, I’ve never used a 1-based indexing language.


  • Faresh@lemmy.mltoProgrammer Humor@lemmy.mlProgramming Languages
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    If by «loosely typed» you mean weakly typed, then that’s not true. Python is a dynamically and strongly typed language. Attempting to do an operation with incompatible types will result in a TypeError.

    >>> "3" + 9
    Traceback (most recent call last):
      File "", line 1, in 
    TypeError: can only concatenate str (not "int") to str
    

    You may be thinking of the following, but this only works because the __mul__ and __add__ methods of these objects have been written to accept the other types.

    >>> "A" * 4 + "H"
    'AAAAH'