News for hackers. Stuff that matters.
Re:Show HN: Whole Git repo was made with ChatGPT by rightbyte on Sunday December 04, 2022 @04:31PM (#33858126)
Well my mortgage is thankful for that.

I have a feeling though that tools like this will lower the skill threshold for programming by a lot.

I gave it this code I just made and asked it what it does and it figured it out:

    public class mean_sink {

        double sum;
        long n;
        
        public mean_sink(){
        }
        
        public void add(double d){
            sum += d;
            n++;
        }
        
        public double getMean(){
            if(n == 0)
                return Double.NaN;
            return sum/n;
        }
    }
I asked it to improve the numerical accuracy and it did it with BigDecimal instead. I asked it to only use doubles and it did some strange reciprocal summation when I was "hoping" for Kahan summation algorithm. Its "reciprocal summation" did not work. But it made a correct Kahan when I asked for it.

I dunno. This is insane anyway. It is really hard to grasp the consequences.

There are no comments on this comment yet.