• driving_crooner
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    7 months ago

    Normal people using AI: look how stupid this shit is!!

    Terence Tao using AI: As an experiment, I asked #ChatGPT to write #Python code to compute, for each 𝑛, the length 𝑀(𝑛) of the longest subsequence of (1,\dots,n) on which the Euler totient function ϕ is non-decreasing. For instance, 𝑀(6)=5, because ϕ is non-decreasing on 1,2,3,4,5 (or 1,2,3,4,6) but not 1,2,3,4,5,6. Interestingly, it was able to produce an extremely clever routine to compute the totient function (that I had to stare at for a few minutes to see why it actually worked), but the code to compute (M(n)) was slightly off: it only considered subsequences of consecutive integers, rather than arbitrary subsequences. Nevertheless it was close enough that I was able to manually produce the code I wanted using the initial GPT-produced code as a starting point, probably saving me about half an hour of work. (and I now have the first 10,000 values of (M)). The results were good enough that I would likely turn to GPT again to provide initial code for similar calculations in the future. https://chat.openai.com/share/a022e1d6-dddc-4817-8bbd-944a3e742d9f​

    • psud@aussie.zone
      link
      fedilink
      arrow-up
      34
      ·
      7 months ago

      Yeah. I asked GPT3 for some heliostat code, to keep reflected sunlight stationary. It was wrong, it hallucinated libraries that didn’t exist, but it roughed out a program that was easier to fix than it would have been to start from scratch.

      Maybe its superpower is beating inertia, getting you started

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

        Yeah, I’ve used it for a lot for one off data processing / graphing code, stuff that is to big to process in a spreadsheet. It usually gets like 95% there. The real issue I have is if you ask for too many one off adjustments it gets confused and reverts previous changes when you ask it to make new ones.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        How good is it at correcting things you point out directly? I haven’t used it for coding yet but have noticed it’s ok at correcting mistakes when you point them out. Still hit or miss though.

        • psud@aussie.zone
          link
          fedilink
          arrow-up
          3
          ·
          7 months ago

          It was ok. I and it went through about four iterations going from “that’s a sun tracker, I asked for a heliostat” through undeclared variables, global variables that should have been local until it was a fine program with just the fault that there was no such library as solar::heliostat [azimuth, altitude]

          I have read that people have run into that sort of problem and have written the library the AI called for, but I looked up a real astronomy library

    • 11111one11111@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      10
      ·
      edit-2
      7 months ago

      Fuckin thank you! People down play how amazed I am/was when I first started fucking with it. I have taken 1 or 2 general req csc classes that taught basic OS management shit. I was a CNC machinist for some time and that was the bridging the gap moment. Inputing prewritten prompts perfected in notepad first before providing to gpt and using the same mentality when I would have to write g-code programs to do shit the Mazatrol parameters wouldn’t allow. Give prompts loops, identify what is the goal, this is very poorly explained lol I used to have a sheet I would use, basically using drilled down syntax, formatting (like ising scripting notations to comment out when you are providing commentary or elaborating on a focus point)

      Basically in less than a year I went from procurement managers who was ace at excel and working at learning how to write macros to being able to write python scripts that would apply Apriori Algorythms, Eclat to track commonly purchased together items but for industrial PVF supplies, High pressure and hydraulic fittings, Awwa flanged and bw fittings and sanitary fittings. Basically tens of thousands of individual product types from every fluid processing industry, selling to end users on an ecommerce platform. If any of that made sense, it’s very difficult to guess what people buy togethet because they could be fixing a tractor, a brewery, a SpaceX rocket, that idiot that sank the sub trying to take selfies with the titanic, or a multi million dollar marijuana processing facility.

      Other scripts used Seasonal projections and basic patterning functions for overall sales and reorder analysis but with exponential smoothing and relim functions applied to give less distorted feedback from massive anomalies that would fuck my shit up when I did it all in excel. (Not try and do those scripts I’m excel. I just meant before I ever considered using scripts and was basically responsible for having an eye on every transaction to prevent 1 wierd shopping cart of the dreaded 2-1/2" NPS sized fittings and nipples in qty’s of thousands when we only sold maybe 1000 every 10 years lol.

      GPT gave a 3x college drop out who didn’t start getting into fucking with co.puters until after my 2nd DWI grounded me @30y/o an absolute blindside of tools and technical understanding to do shit life time IT nerds couldnt do. I’d say 2 years ago I really enjoyed the new procurment position and learning more about macros, excel but never actual scripting, so 2 years I was able to have python scripts that would:

      Parse out our entire customer database by industry, purchase history, target customer grades and basically the same spectated tags for the customers our customers served. Improving marketing campaigns, sales conversions, reduced operating costs accrued from mistaken data entries and duplicate profiles.

      One of the non-code writing tools I used gpt for was having a seperate gpt account when they allowed you to input global parameters to follow and basically loosely train it to return better replys to individual accounts. So I had it set up to basically get fed the body meat from email exchanges for quote request responses. It was so much more polite and was soooo much quicker than me trying to be fuckin charming.

      The largest project I completed was the scraping of 900 customer drawings pdfs of every shape and size flange. The script downloaded each pdf, concerted them all to png, then I cant remember if it was a Gimp plugin or python library but the script basically cut out the border engineering drawings have by just using a set number of pixels from the edge, took the naked drawings and pasted in a blank template I made with our companies logo amd (this was definitely python library) took the scale of the drawing itself and reduced it in increments of 3% for every time it resized but still had a layer conflict between any non white pixel color value. Lastly I used the xlsx file used to upload the specs, standards, cert, mat’l type & grade and peessure rating, mapped the cells from the blank border template to the xlsx or csv whatever it was and filled in all the pertinent specs for each of the 900 flange png files. The bow and ribbon was the final conversion back to pdf, and saving 1800 newly created pdf files for every flange type for BOTH 304 and 316 options. Redundant as fuck if real person was doubling the needed number of files. But with GPT the building of the script i did at home on my own time over 3-4 weeks. The entire thing ran, scraping, converting file type, editing logically, then editing dynamically, filling in spec data, recomverted file type, amd looped back repeating everything after the scrape data function in under 10 mins. Updating amd creating spec sheets and pdfs for all existing and additional expansions was a full time job. It took our IT girl 6-8 months just to update the sanitary fitting sku numbers to the industry standard skus along with everything I just laid out as far as updating dimensions, drawings, mfgurer spec sheets, asme/astm standards, 3A standards. Every time you add or loose a vender you are either finding one that matches the last vendors specs or you are updating everything.

      Not guna lie most of my scripts were scraping driven for both competitors and vendors. Live library of real time competitive pricing scraping competition prices. Made an infallible purchasing database which had every single vendor sku paired with out sku. That I did long way in excel with if match index formulas. But couldn’t check it’s accuracy till gpt.

      Sorry I just quit this job in Feb/march and 100% loved it there. Loved the work, never knee I loved data management, loved the people, loved the pay. It really has been something ive been not thinking about because of how much it kills me that I left. Didn’t mean to totally write a fucking novel all about fucking ME.ME.MEMEME.MEMEME *RIP Tobby Keith

      Either way, fuck yeah buddy. Tools are only ever as useful as the people using them. Lear as much as you can and practice your fucking trade and 100% of the time you will make more money than your coworkers because if you do practice that good work ethic shit then it doesn’t matter if you work somewhere that pays or treats employees like shit because you will know there is nothing keeping you from finding what you market value is. Come back to current employer with your competing offers with the ultimatum I will need x amount of money to continue working her. Then the only difficult part is keeping to your word and going to the competing offer.

      I mean it doesn’t apply to every career path but it’s worked for me when I was landscaping over summers, cooking/playing chef thru 3 college failed attempts, CNA it did not work in because everyone but the charge nurse/head RN were on the same level. So all the LPNs made about the same, all the CNA the same etc., Machining it worked, and the job I just described which could be labeled technical sales specialist, inventory/warehouse manager, procurement manager, ngl I’ve tossed out project manager titles if the work load and audience was appropriate lol.

      Anywho. TLDR: middle aged man yells accomplishments outloud to the lonely void but feels mentally stable doing so because if anyone caught him he could say SEE I WASNT talking to my self I was just texting outloud while I was sharing my sage role modeling advice on the greatest unfederated social media platform ever made.

      Edit: wholey fuck me that is so obnoxiously long. I’m sooo fuckin sorry. It’s really a comment about nothing. Like the Seinfeld motto that would’ve really been Larry David’s credit, right? A show about nothing. Wasn’t Seinfeld plot basically just young Larry David situations?

      • borari@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        14
        arrow-down
        1
        ·
        edit-2
        7 months ago

        Yeah bro, keep writing code, it keeps the security people like me employed. Also I’m pretty sure you might be on meth.