from Hacker News

NetBSD bans use of Copilot-generated code

by jaypatelani on 5/16/24, 1:00 PM with 39 comments

  • by GrantMoyer on 5/16/24, 1:53 PM

    This policy isn't meant to be enforceable; it's to signal to contributors — who may not have even considered the legal implication of using LLM codegen tools — that LLM codegen is not allowed because of the legal risk. It's an addendum to the existing guideline "Do not commit tainted code to the repository", which was already practically unenforceable, and it's intended to address a real and new phenomenon.
  • by jart on 5/18/24, 7:17 AM

    Here's an example of how easy it is to generate code on NetBSD using an open LLM:

        Last login: Fri May 17 23:58:08 2024 from 10.10.10.129
        NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021
        
        Welcome to NetBSD!
        
        We recommend that you create a non-root account and use su(1) for root access.
        $ ./curl -L -o tinyllama https://huggingface.co/Mozilla/TinyLlama-1.1B-Chat-v1.0-llamafile/resolve/main/TinyLlama-1.1B-Chat-v1.0.Q5_K_M.llamafile
        $ chmod +x tinyllama
        $ ./tinyllama -e -p '```c\nvoid *memcpy(void *dst,' -r '```\n' --temp 0 --log-disable
        <s> ```c
        void *memcpy(void *dst, const void *src, size_t n) {
            char *d = (char *)dst;
            const char *s = (const char *)src;
            while (n--) {
                *d++ = *s++;
            }
            return dst;
        }
        ```
        
        $
    
    I think tinyllama and llamafile are much more culturally compatible with NetBSD's values than something like Microsoft Copilot.
  • by firebaze on 5/16/24, 1:19 PM

    See also https://news.ycombinator.com/item?id=40375029: 99 points | LeoPanthera | 10 hours ago | 80 comments
  • by elromulous on 5/16/24, 1:16 PM

    This seems basically unenforceable. It very quickly becomes the war that schools are now waging on plagiarism.
  • by oefrha on 5/16/24, 1:17 PM

    This is like outlawing sneezing at home. Unless you’re sneezing so loudly that your neighbor decides to call the police (equivalent would be reproducing large blocks of existing code verbatim, but Copilot already has warnings for that kind of thing), good luck enforcing it.
  • by electrograv on 5/16/24, 1:20 PM

    Do they think Copilot/ChatGPT are usernames of contributor accounts which can be banned from a project/repo?

    It seems the underlying issue here is bad code submitted ultimately by human contributors. Consistently thorough code review and testing will always be necessary.