The Random Thread

Oops! I did it again.

1788683323314.png
 
Like I said, it can be addictive. I suppose you could try something like, I'll only post on the forums after I've written one page, or something similar.
 
I told ChatGPT to "Write Dijkstra’s shortest-path algorithm in C but upside-down, that is, first the last line, second the penultimate, etc." Why? To see how it looks. I looks funny.

C:
}
    return 0;

    dijkstra(graph, source);

    int source = 0;

    };
        {14, 0, 2, 0, 9, 0}
        {0, 0, 0, 6, 0, 9},
        {0, 15, 11, 0, 6, 0},
        {9, 10, 0, 11, 0, 2},
        {7, 0, 10, 15, 0, 0},
        {0, 7, 9, 0, 0, 14},
    int graph[V][V] = {
int main(void) {

}
    }
        }
            printf("\n");
            print_path(parent, v);
            printf("distance = %d, path = ", dist[v]);
        } else {
            printf("unreachable\n");
        if (dist[v] == INF) {

        printf("Vertex %d: ", v);
    for (int v = 0; v < V; v++) {

    printf("Source: %d\n\n", source);

    }
        }
            }
                parent[v] = u;
                dist[v] = dist[u] + graph[u][v];

                dist[u] + graph[u][v] < dist[v]) {
                dist[u] != INF &&
                graph[u][v] > 0 &&
            if (!visited[v] &&
        for (int v = 0; v < V; v++) {

        visited[u] = 1;

        }
            break;
        if (u == -1) {

        int u = min_distance(dist, visited);
    for (int count = 0; count < V - 1; count++) {

    dist[source] = 0;

    }
        parent[i] = -1;
        visited[i] = 0;
        dist[i] = INF;
    for (int i = 0; i < V; i++) {

    int parent[V];
    int visited[V];
    int dist[V];
void dijkstra(int graph[V][V], int source) {

}
    printf("%d", vertex);

    }
        printf(" -> ");
    if (parent[vertex] != -1) {

    print_path(parent, parent[vertex]);

    }
        return;
    if (vertex == -1) {
void print_path(int parent[], int vertex) {

}
    return min_index;

    }
        }
            min_index = v;
            min = dist[v];
        if (!visited[v] && dist[v] < min) {
    for (int v = 0; v < V; v++) {

    int min_index = -1;
    int min = INF;
int min_distance(int dist[], int visited[]) {

#define INF INT_MAX
#define V 6

#include <limits.h>
#include <stdio.h>
 
I told ChatGPT to "Write Dijkstra’s shortest-path algorithm in C but upside-down, that is, first the last line, second the penultimate, etc." Why? To see how it looks. I looks funny.

C:
}
    return 0;

    dijkstra(graph, source);

    int source = 0;

    };
        {14, 0, 2, 0, 9, 0}
        {0, 0, 0, 6, 0, 9},
        {0, 15, 11, 0, 6, 0},
        {9, 10, 0, 11, 0, 2},
        {7, 0, 10, 15, 0, 0},
        {0, 7, 9, 0, 0, 14},
    int graph[V][V] = {
int main(void) {

}
    }
        }
            printf("\n");
            print_path(parent, v);
            printf("distance = %d, path = ", dist[v]);
        } else {
            printf("unreachable\n");
        if (dist[v] == INF) {

        printf("Vertex %d: ", v);
    for (int v = 0; v < V; v++) {

    printf("Source: %d\n\n", source);

    }
        }
            }
                parent[v] = u;
                dist[v] = dist[u] + graph[u][v];

                dist[u] + graph[u][v] < dist[v]) {
                dist[u] != INF &&
                graph[u][v] > 0 &&
            if (!visited[v] &&
        for (int v = 0; v < V; v++) {

        visited[u] = 1;

        }
            break;
        if (u == -1) {

        int u = min_distance(dist, visited);
    for (int count = 0; count < V - 1; count++) {

    dist[source] = 0;

    }
        parent[i] = -1;
        visited[i] = 0;
        dist[i] = INF;
    for (int i = 0; i < V; i++) {

    int parent[V];
    int visited[V];
    int dist[V];
void dijkstra(int graph[V][V], int source) {

}
    printf("%d", vertex);

    }
        printf(" -> ");
    if (parent[vertex] != -1) {

    print_path(parent, parent[vertex]);

    }
        return;
    if (vertex == -1) {
void print_path(int parent[], int vertex) {

}
    return min_index;

    }
        }
            min_index = v;
            min = dist[v];
        if (!visited[v] && dist[v] < min) {
    for (int v = 0; v < V; v++) {

    int min_index = -1;
    int min = INF;
int min_distance(int dist[], int visited[]) {

#define INF INT_MAX
#define V 6

#include <limits.h>
#include <stdio.h>
It's not that hard to write a program to reverse lines of text of anything. This is frankly programming basics that most programmers acquired by spending time and effort when young. And when basics like THAT get outsourced to ChatGPT, small wonder we have vibe programming and people who don't really understand the code that the AI wrote for them.

Try getting ChatGPT to explain why freebsd-update(8) doesn't work as advertised, which leads to horror stories on these Forums about the lib incompatibilities created by blind upgrades of userland/kernel. One of those 'good ideas' that require thinking that an AI is not really capable of - but any competent programmer should be able to think a bit and connect the dots.
 
It's not that hard to write a program to reverse lines of text of anything. This is frankly programming basics that most programmers acquired by spending time and effort when young. And when basics like THAT get outsourced to ChatGPT, small wonder we have vibe programming and people who don't really understand the code that the AI wrote for them.

Try getting ChatGPT to explain why freebsd-update(8) doesn't work as advertised, which leads to horror stories on these Forums about the lib incompatibilities created by blind upgrades of userland/kernel. One of those 'good ideas' that require thinking that an AI is not really capable of - but any competent programmer should be able to think a bit and connect the dots.
The interesting thing is that ChatGPT doesn't write the algorithm and then reverses it, it writes it directly reversed.

But, seriously:

View: https://www.youtube.com/watch?v=PIb6AZdTr-A
 
The interesting thing is that ChatGPT doesn't write the algorithm and then reverses it, it writes it directly reversed.
Yeah, nice assumption. How do you verify that this is what ChatGPT actually does?

You'd pretty much have to know how text is processed, how strings are processed, and the like.

If you don't know any programming techniques, you'd be quite unable to even guess what techniques ChatGPT even uses internally to write code where lines are in reverse order.

Ever hear of Mandelbrot fractals? The computer doesn't just draw circles one affter another, there's a whole recursive formula that the computer has to follow to draw those circles in a manner that can be called a Mandelbrot fractal. And it takes quite a bit of computing power to recurse through the formula. If you have the formula incorrect, the whole image will be incorrect.

Same with text processing. There are techniques for reversing text and lines. And ChatGPT is most likely aware of those techniques and uses them. All you get to see is a nice animation of ChatGPT typing the answer out for you.

Or, take Win11's default wallpaper:
1789274101145.png


At first blush, it's petals of a flower, right? Not so fast. It's actually a crumpled-up napkin! The image went through several iterations of transformations that needed to be done in a very specific sequence to accomplish the nice-looking result! Achieving the shade of blue so that edges are shiny AND curved - that's a technique that requires a very specific workflow in GIMP/Photoshop.

Point being, ChatGPT knows some techniques for accomplishing stuff that it's being asked to do. If you don't know a technique, it would take you forever to do the same thing by hand. If you don't know how to program, how can you verify what ChatGPT did for you?

It's not like checking somebody's math. You kind of have to know some math yourself if you wanna verify that somebody did their calculations correctly.
 
Right... There's no such thing as "someone else's math'. Everybody kind of has to agree that 2+2=4, y'know.

When I say "Check someone else's math", I really mean, "Check someone else's calculation steps". If you arrive at different results, one of you is making a mistake somewhere.

Besides, anyone on the Internet can claim that they've been a computer programmer for X number of years. Hell, I can make the same claim as OP.
 
Right... There's no such thing as "someone else's math'. Everybody kind of has to agree that 2+2=4, y'know.

When I say "Check someone else's math", I really mean, "Check someone else's calculation steps". If you arrive at different results, one of you is making a mistake somewhere.

Besides, anyone on the Internet can claim that they've been a computer programmer for X number of years. Hell, I can make the same claim as OP.
Well, at least I use my real name: Alfredo Llaquet Alsina (I add the hyphen so people understand that they are two family names: Alfredo Llaquet-Alsina).

Believe what you wish. I, for one, believe that some people were not loved enough by their mothers.

SCARY ADMIN: This is my last turn in this tiresome conversation with astyle.
 
I'm confused. Why in something being displayed backwards would text processing skills be needed (text processing has nothing to do with buffers--<atomic/threaded read/write comments here>)? -i.e., a list + decrement = backwards. What am I missing?

Screen names probably became "big" because of Snowcrash (hacker culture).

In C, I tried to beat memcmp once (spoiler: I lost). My time probably would be been more productive if I just learned assembly but it was fun. :)
 
I'm confused. Why in something being displayed backwards would text processing skills be needed (text processing has nothing to do with buffers--<atomic/threaded read/write comments here>)? -i.e., a list + decrement = backwards. What am I missing?

Screen names probably became "big" because of Snowcrash (hacker culture).

In C, I tried to beat memcmp once (spoiler: I lost). My time probably would be been more productive if I just learned assembly but it was fun. :)
Ahhh... the way I see it, me and OP were talking about what ChatGPT does behind the scenes to produce a C source file with lines reversed.

OP claims 30 years of programming experience (in comment #559).

You'd think someone with that much programming experience would be able to spot (and make educated guesses about) different programming styles and techniques just from reading code, even if it was generated by ChatGPT/Claude/whatever.

You'd think someone with that much programming experience would know what it takes to verify quality and correctness of the code. I mean, Crivens got Claude to confess that it messed up and produced wrong info (separate story).

But with a claim like that:
The interesting thing is that ChatGPT doesn't write the algorithm and then reverses it, it writes it directly reversed.
Kind of easy to see through comments that OP is just messing around.

As the creator of Git once said, "Talk is cheap, show me the code".
 
From the photo, I thought they were crows. https://www.allaboutbirds.org/news/similar-species-crows-and-ravens

In Manhattan crows used to be very visible. Now, (I think because of the West Nile disease), they seem far less common. Though in my old apartment, where we had a terrace, they would gather and harass my cat if it went out, and once I saw them harassing a hawk. Also, once in Central Park, I saw harassing an owl, I think, I didn't get a good view.
Crows are still quite audible around here, though I seldom see them. There's a park moderately close to where I live though, where they can be easily seen.
 
Wrap your heads around this.

Now imagine standing in the park, trying to have a smoke, and you are sourranded by crows harassing you for the cig?
 
From the photo, I thought they were crows
They probably are. I'm not an expert. I searched for "ravens" on Pixabay and didn't conduct any further research because I didn't assign any importance to the matter. I like crows too. I think ravens and crows are closely related.
they would gather and harass my cat if it went out, and once I saw them harassing a hawk
Yes, they are known for harassing in groups any creature that bothers them. If you florp with them, they'll bombard you for generations (according to some videos I watched on YouTube, which, of course, may be lying).
 
Yes, they are known for harassing in groups any creature that bothers them. If you florp with them, they'll bombard you for generations (according to some videos I watched on YouTube, which, of course, may be lying).
That one is true. They will remember people they don't like for years. There's study from a Washington state university, I think, about it.
 
The word "unorthodox" appears only 26 times in the FreeBSD forums (27 now).

On the other hand, this is the first post to ever feature the word "flamboyant."

It's a pastime like any other. You can try.

Why do I do these things? It helps my brain find a topic for the next crumb. For instance:

Crumb 2256: Unorthodox Butterflies: A particular species of butterflies that live only on a small island in the middle of a big lake in Southeast Asia are known popularly as unorthodox butterflies because they don’t flutter, they glide.
 
Back
Top