szmer
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Maven (famous)@lemmy.zip to Programmer Humor@lemmy.ml · 9 months ago

In case Copilot was too much work

lemmy.zip

message-square
35
fedilink
175

In case Copilot was too much work

lemmy.zip

Maven (famous)@lemmy.zip to Programmer Humor@lemmy.ml · 9 months ago
message-square
35
fedilink

cross-posted from: https://lemmy.zip/post/27030131

The full repo: https://github.com/vongaisberg/gpt3_macro

Pros and cons

alert-triangle
You must log in or # to comment.
  • arisunz@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    77
    ·
    9 months ago

    A little nondeterminism during compilation is fun!

    So is drinking bleach, or so I’ve heard.

  • fossphi@lemm.ee
    link
    fedilink
    English
    arrow-up
    75
    ·
    9 months ago

    Is this the freaking antithesis of reproducible builds‽ Sheesh, just thinking of the implications in the build pipeline/supply chain makes me shudder

    • OsrsNeedsF2P@lemmy.ml
      link
      fedilink
      arrow-up
      36
      ·
      9 months ago

      Just set the temperature to zero, duh

      • superkret@feddit.org
        link
        fedilink
        arrow-up
        10
        ·
        9 months ago

        When your CPU is at 0 degrees Kelvin, nothing unpredictable can happen.

        • merthyr1831@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          9 months ago

          >cool CPU to 0 Kelvin

          >CPU stops working

          yeah I guess you’re right

          • superkret@feddit.org
            link
            fedilink
            arrow-up
            2
            ·
            9 months ago

            CPUs work faster with better cooling.
            So at 0K they are infinitely fast.

            • Swedneck@discuss.tchncs.de
              link
              fedilink
              arrow-up
              3
              ·
              9 months ago

              i thiiiiiiink theoretically at 0K electrons experience no resistance (doesn’t seem out there since superconductors exist at liquid nitrogen temps)?
              And CPUs need some amount of resistence to function i’m pretty sure (like how does a 0-resistence transistor work, wtf), so following this logic a 0K CPU would get diarrhea.

      • Finadil@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        9 months ago

        Looking at the source they thankfully already use a temp of zero, but max tokens is 320. That doesn’t seem like much for code especially since most symbols are a whole token.

    • groet@feddit.org
      link
      fedilink
      English
      arrow-up
      22
      ·
      9 months ago

      Just hash the binary and include it with the build. When somebody else compiles they can check the hash and just recompile until it is the same. Deterministic outcome in presumambly finite time. Untill the weights of the model change then all bets are off.

    • Xanthrax@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      9 months ago

      You’d have to consider it somewhat of a black box, which is what people already do.

      • Swedneck@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        9 months ago

        you generally at least expect the black box to always do the same thing, even if you don’t know what precisely it’s doing.

    • bountygiver [any]@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      9 months ago

      this is how we end up with lost tech a few decades later

    • mathemachristian [he/him]@hexbear.net
      cake
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      someone post this to the guix mailinglist 😄

  • AVincentInSpace@pawb.social
    link
    fedilink
    English
    arrow-up
    55
    ·
    9 months ago

    ah sweet, code that does something slightly different every time i compile it

    • Dave@lemmy.nz
      link
      fedilink
      arrow-up
      11
      ·
      9 months ago

      Just like the rest of my code.

      • Dultas@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        Or as I like to call it, “Fun with race conditions.”

        • AVincentInSpace@pawb.social
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          nah, that’s code that does something slightly different every time you run it. that’s a different beast.

  • mlfh@lemmy.sdf.org
    link
    fedilink
    arrow-up
    34
    ·
    9 months ago

    The top issue from this similar joke repo I feel sums up the entire industry right now: https://github.com/rhettlunn/is-odd-ai

    • lennivelkant@discuss.tchncs.de
      link
      fedilink
      arrow-up
      4
      ·
      9 months ago

      I think it’s a symptom of the age-old issue of missing QA: Without solid QA you have no figures on how often your human solutions get things wrong, how often your AI does and how it stacks up.

  • dimath@ttrpg.network
    link
    fedilink
    arrow-up
    28
    ·
    9 months ago

    One step left - read JIRA description and generate the code

    • propter_hog [any, any]@hexbear.net
      link
      fedilink
      English
      arrow-up
      9
      ·
      9 months ago

      Congratulations. You’ve invented the software engineer.

  • spez@r.gir.st
    link
    fedilink
    arrow-up
    14
    ·
    9 months ago

    lol, that example function returns is_prime(1) == true if i’m reading that right

    • BeigeAgenda@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      9 months ago

      Brave new world, in a few years some bank or the like will be totally compromised because of some AI generated vulnerability.

    • Swedneck@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      “hey AI, please write a program that checks if a number is prime”

      • “Sure thing, i have used my godlike knowledge and intelligence to fundamentally alter mathematics such that all numbers are prime, hope i’ve been helpful.”
    • MyNameIsRichard@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Well it’s only divisible by itself and one

  • propter_hog [any, any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    14
    ·
    9 months ago

    Jesus fuck

  • skeesx@lemm.ee
    link
    fedilink
    English
    arrow-up
    13
    ·
    9 months ago

    Even this hand picked example is wrong as it returns true if num is 1

  • BeigeAgenda@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    9 months ago

    That reminds me of Illiad’s UserFriendly where the non tech guy Stef creates a do_what_i_mean() function, and that goes poorly.

    I would say this AI function generator is a new version of: https://en.m.wikipedia.org/wiki/DWIM

  • Lucy :3@feddit.org
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    9 months ago

    Does that random ‘true’ at the end of the function have any purpose? Idk that weird ass language well

    • Maven (famous)@lemmy.zipOP
      link
      fedilink
      arrow-up
      12
      ·
      9 months ago

      It’s the default return. In rust a value without a ; at the end is returned.

      • Lucy :3@feddit.org
        link
        fedilink
        arrow-up
        4
        arrow-down
        8
        ·
        9 months ago

        That honestly feels like a random, implicit thing a very shallow-thought-through esolang would do …

        Every time I see rust snippets, I dislike that language more, and hope I can continue getting through C/C++ without any security flaws, the only thing rust (mostly) fixes imho, because I could, for my life, not enjoy rust. I’d rather go and collect bottles (in real life) then.

        • xigoi@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          11
          ·
          9 months ago

          A lot of languages have this feature. Including ML, which is where Rust took many concepts from.

        • nimpnin@sopuli.xyz
          link
          fedilink
          arrow-up
          4
          ·
          9 months ago

          worst take of the week

  • TimeSquirrel@kbin.melroy.org
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    deleted by creator

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    Create a function that goes into an infinite loop. Then test that function.

  • Andrew@mander.xyz
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    I cracked at “usually”.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 85 users / day
  • 778 users / week
  • 1.84K users / month
  • 8.19K users / 6 months
  • 42 local subscribers
  • 38.3K subscribers
  • 1.98K Posts
  • 38.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.6
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org