I know the party line is to hate AI but y'all are simply wrong about this.

  • FuckyWucky [none/use name]
    ·
    edit-2
    5 months ago

    im kinda mixed centrist on this. its good for certain tasks, ive made scripts and smaller programs with it but its not a replacement for humans or human creativity and shouldnt be treated as such. of course, this is capitalism so...

    example

    i asked it to make a script to scrape all my comments on hexbear and write to a file, it did it without issues as the json structure was provided.

    example 2

    i asked it to make a script to allow me to hide posts on hexbear/lemmy and it came up with a working one after 2-3 iterations

    spoiler

    // ==UserScript== // @name Hexbear Hide Posts // @namespace http://tampermonkey.net/ // @version 1.0 // @description Hide posts on hexbear.net and store their state in local storage // @author You // @match https://hexbear.net/* // @grant none // @run-at document-end // ==/UserScript==

    (function() { 'use strict';

    // Function to create and return a 'Hide' button element
    function createHideButton(postHref) {
        let btn = document.createElement('button');
        btn.innerHTML = 'Hide';
        btn.className = 'btn btn-sm btn-link btn-animate text-muted py-0';
        btn.style.marginLeft = '5px';
        btn.addEventListener('click', function () {
            // Find the closest post container to the button clicked
            const postElement = this.closest('div.post-listing') || this.closest('article');
            if (postElement) {
                hidePost(postElement, postHref);
            }
        });
        return btn;
    }
    
    // Function to hide the post and save its href in local storage
    function hidePost(postElement, postHref) {
        postElement.style.display = 'none'; // Hide the post
        localStorage.setItem('hidden-' + postHref, 'true'); // Mark the post as hidden in local storage
    }
    
    // Function to process and potentially hide a post
    function processPost(post) {
        // Use the href attribute of the first anchor tag within the post as a unique identifier
        const postHref = post.querySelector('a').getAttribute('href');
    
        // Check if the post is already marked as hidden in local storage
        if (localStorage.getItem('hidden-' + postHref) === 'true') {
            post.style.display = 'none'; // Hide the post if it was previously hidden
        }
    
        // Find the dropdown button to insert the 'Hide' button after
        const dropdown = post.querySelector('[data-bs-toggle="dropdown"]');
        if (dropdown) {
            const hideButton = createHideButton(postHref);
            dropdown.parentNode.insertBefore(hideButton, dropdown.nextSibling);
        }
    }
    
    // MutationObserver callback to watch for changes in the DOM
    const observerCallback = (mutationsList, observer) => {
        for (const mutation of mutationsList) {
            if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
                mutation.addedNodes.forEach(node => {
                    if (node.nodeType === Node.ELEMENT_NODE) {
                        // Check if the added node is a post container
                        if (node.matches('div.post-listing, article.post-container')) {
                            processPost(node);
                        } else {
                            // Check if any child nodes are post containers
                            const postNodes = node.querySelectorAll('div.post-listing, article.post-container');
                            postNodes.forEach(processPost);
                        }
                    }
                });
            }
        }
    };
    
    // Set up the MutationObserver to watch for changes in the entire document
    const observer = new MutationObserver(observerCallback);
    const config = { childList: true, subtree: true };
    
    // Start observing the document
    observer.observe(document.documentElement, config);
    
    // Additionally, process any posts that are already in the DOM at script start
    document.querySelectorAll('div.post-listing, article.post-container').forEach(processPost);
    

    })();

    i think for creative tasks like writing, relying on LLMs entirely is just lazy and you can see that with AI Content farms on youtube.