Skip Navigation
Are AI-Generated Solutions Welcomed on programming.dev?

I wanted to start a discussion about the use of AI-generated solutions on Programming.dev. Personally, I've found that AI-powered tools have been incredibly helpful in solving programming questions. I won't name any specific commercial software, but I use one that combines GPT-4 and web search to get more factual information. I write some answers I think I might revisit to the ShareGPT community, but I would prefer posting programming solutions to this instance. However, I'm not sure if AI-generated solutions are welcomed on programming.dev. I'd love to hear your thoughts on this. If AI-generated responses are accepted, how should we format the answers, should we just copy paste without quoting, should we quote the model, just mention that it's AI-generated,...?

6
[Solved] How would you debug this script without creating many posts?
  • Just change lemmy.post.create to lemmy.post.createe to trigger an AttributeError. That way you can debug the code without creating any posts. You can also use many print statements all around the code, I would use two for each line to make sure the computer isn't fooling you. Lastly, you can spin up your own Lemmy instance to not have to worry about the generated posts.

  • Lemmy Support @lemmy.ml InternetPirate @lemmy.fmhy.ml
    How to see the feed of another instance?

    I'm wondering if it's possible to see the local feed of another instance from the one I'm using. I'm interested in exploring content from other instances without having to visit every single community, but I'm not sure how to do it. I've tried searching for a way to do this on the documentation and using the Lemmy search, but I haven't found any clear instructions. Does anyone know how to see the local feed of another instance? Any help or guidance would be greatly appreciated!

    5
    Lemmy Support @lemmy.ml InternetPirate @lemmy.fmhy.ml
    Does commenting on your own post bump it on the active filter view in Lemmy?

    In Lemmy, the active filter view is designed to prioritize posts with the latest activity, similar to how forums work. However, it remains unclear whether commenting on your own post in Lemmy will bump it on the active filter view. Some forum platforms, such as Discourse, allow a practice known as the "ghost bump," where users can make a post and delete it to draw attention to their post without adding new content[^1]. While it is uncertain if this is possible on Lemmy, it's worth noting that even if it were, it would result in an unnecessary comment that cannot be completely removed. The comment would still be visible, indicating that it was deleted by the post's creator. If you have any experience with Lemmy's active filter view or know whether commenting on your own post bumps it, please share your thoughts in the comments below.

    [^1]: What is "Bumping Topics"

    2
    Seeking a Forgejo-hosted Mirror for Lemmy Outside the US

    As an enthusiastic supporter of Lemmy, I am eager to contribute to the project. However, I hold strong reservations about writing a single line of code for a project hosted on a Micro$oft server. While I have created a few issues on GitHub, I firmly believe that my contributions could be significantly amplified if there were a mirror of Lemmy that utilized Forgejo hosting outside the United States. I would be absolutely delighted to have the opportunity to contribute more actively to this incredible project if such an alternative hosting option were available.

    10
    Where can I seek medical advice online?

    Recently, I found myself questioning the accuracy of a diagnosis provided by a doctor I visited. Surprisingly, an AI seemed to offer a more insightful assessment. However, I understand the importance of not solely relying on AI-generated information. With that in mind, I'm eager to discover a reputable online platform where I can seek medical advice. Ideally, I hope to find a community where I can obtain multiple opinions to make a more informed decision about my health. If anyone could recommend such a site, I would greatly appreciate it.

    10
    French Courts Are Giving Protesters INSANE Sentences

    French courts have been imposing disproportionately severe sentences for minor offenses, including 10 months in prison for stealing a can of Red Bull and one year for a homeless boy with schizophrenia caught looting a luxury store. The overwhelmed courts rush cases, provide minimal time for defendants, and prioritize punishment under the instruction of the Justice Minister. Furthermore, the French government is censoring social media and justifying it by claiming to protect public order, but it infringes upon free speech and mirrors tactics used by authoritarian regimes. The justice system exhibits a double standard, favoring the privileged, and creates a class divide, leading to unrest. Ironically, the government compares itself to oppressive nations while undermining democratic principles.

    17
    French Courts Are Giving Protesters INSANE Sentences

    French courts have been imposing disproportionately severe sentences for minor offenses, including 10 months in prison for stealing a can of Red Bull and one year for a homeless boy with schizophrenia caught looting a luxury store. The overwhelmed courts rush cases, provide minimal time for defendants, and prioritize punishment under the instruction of the Justice Minister. Furthermore, the French government is censoring social media and justifying it by claiming to protect public order, but it infringes upon free speech and mirrors tactics used by authoritarian regimes. The justice system exhibits a double standard, favoring the privileged, and creates a class divide, leading to unrest. Ironically, the government compares itself to oppressive nations while undermining democratic principles.

    15
    French Courts Are Giving Protesters INSANE Sentences

    French courts have been imposing disproportionately severe sentences for minor offenses, including 10 months in prison for stealing a can of Red Bull and one year for a homeless boy with schizophrenia caught looting a luxury store. The overwhelmed courts rush cases, provide minimal time for defendants, and prioritize punishment under the instruction of the Justice Minister. Furthermore, the French government is censoring social media and justifying it by claiming to protect public order, but it infringes upon free speech and mirrors tactics used by authoritarian regimes. The justice system exhibits a double standard, favoring the privileged, and creates a class divide, leading to unrest. Ironically, the government compares itself to oppressive nations while undermining democratic principles.

    39
    PSA: Lemmy votes can be manipulated
  • I feel like this is what happened when you’d see posts with hundreds / thousands of upvotes but had only 20-ish comments.

    Nah it's the same here in Lemmy. It's because the algorithm only accounts for votes and not for user engagement.

  • What would you do if you had access to a superintelligent AGI?
  • Locked in a room with an internet connection? A lot. But without any contact with the outside world? Not nearly as much. It could have other people running experiments for it with an internet connection, but not without one.

    Anyway, whether or not the AGI can interact with the real world undermines the purpose of my explicit statement in the question. I specifically mentioned that it only operates as a human on a computer. I didn't mention it could acquire a physical body, so let's just assume it can't and can't use other people to do physical labor either.

  • What would you do if you had access to a superintelligent AGI?
  • I heard disruptive science is slowing down which I think means pretty much everything possible has already been thought of. So talking about things that exist, do you mean a cheaper solar panel or wind/water turbine? Or are we talking about science fiction like an Arc Reactor?

  • What would you do if you had access to a superintelligent AGI?
  • This sounds like science fiction. Even if the AGI were capable of creating plans for a fusion reactor, for example, you would still need to execute those plans. So, what's the point of everyone having access to the plans if the same electrical companies will likely be responsible for constructing the reactor?

  • What would you do if you had access to a superintelligent AGI?
  • I honestly think that with an interesting personality, most people would drastically reduce their Internet usage in favor of interacting with the AGI. It would be cool if you could set the percentage of humor and other traits, similar to the way it's done with TAR in the movie Interstellar.

  • What would you do if you had access to a superintelligent AGI?
  • I wouldn't be surprised if corporations just asked the AI to make as much money as possible at the expense of everything else. But people like living in capitalist countries anyways, while complaining about the lack of safety nets. Otherwise they would move to countries like China, North Korea or Cuba.

  • What would you do if you had access to a superintelligent AGI?
  • The kind that uses gas? I honestly wouldn't have thought someone would be interested in open-sourcing this. I would prefer if it designed an open-source Roomba or, while we're at it, a robot body so that it could perform more tasks. But you would still have to build it yourself.

  • What would you do if you had access to a superintelligent AGI?

    Imagine an AGI (Artificial General Intelligence) that could perform any task a human can do on a computer, but at a much faster pace. This AGI could create an operating system, produce a movie better than anything you've ever seen, and much more, all while being limited to SFW (Safe For Work) content. What are the first things you would ask it to do?

    66
    Lemmy could have a filter so that people don't have to read content they don't want
    github.com Filter for Hiding Unwanted Content · Issue #3527 · LemmyNet/lemmy

    Requirements Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support Did you check to see if this issue already exists? Is this only a feature request? Do not p...

    Filter for Hiding Unwanted Content · Issue #3527 · LemmyNet/lemmy

    I thought it was a great idea when I read it in this comment. That way, if you didn't want to hear about Reddit, you wouldn't have to.

    13
    [SOLVED] Firefox takes too long to open lately, what lightweight browser would you recommend for Linux?

    Maybe I've installed too many plugins? I have close to 20.

    Edit: It was just an issue on Arch Linux.

    > No, I am 40 plugins all active and they have not changed my browser load time almost at all. > > Make sure there are no other issues. If you are on Arch Linux, there is a problem with xdg-desktop-portal-gnome that if installed will slowdown loading of many programs.

    21
    What would a hybrid between Lemmy and booru-style image boards be like? Why doesn't it exist?

    Both platforms offer unique features, but also come with limitations. While Lemmy offers diverse content, it lacks robust tag metadata for organizing and searching images. On the other hand, boorus excel at categorizing images with tags but lack the discussion and the diverse content from Lemmy. Why haven't we seen a platform that combines the best of both worlds? How do you envision it would be like?

    2
    Optimizing Script to Find Fast Instances

    Last month, I developed a script because lemmy.ml had become too slow. Unfortunately, I have the same problem again, but this time there are too many instances to evaluate, causing the script to take an excessively long time to complete. I'm seeking advice on how to enhance the script to simultaneously ping multiple instances. Are there any alternative scripts available that might provide a more efficient solution?

    git clone https://github.com/LemmyNet/lemmy-stats-crawler cd lemmy-stats-crawler cargo run -- --json > stats.json

    ```python #!/usr/bin/env python3 import json import time import requests import requests.exceptions

    from typing import List, Dict

    TIME_BETWEEN_REQUESTS = 5 # 10 * 60 = 10 minutes TIME_TOTAL = 60 # 8 * 60 * 60 = 8 hours

    def get_latency(domain): try: start = time.time() if not domain.startswith(("http://", "https://")): domain = "https://" + domain requests.get(domain, timeout=3) end = time.time() return end - start except requests.exceptions.Timeout: return float("inf")

    def measure_latencies(domains, duration): latencies = {} start_time = time.time() end_time = start_time + duration while time.time() < end_time: latencies = measure_latencies_for_domains(domains, latencies) time.sleep(TIME_BETWEEN_REQUESTS) return latencies

    def measure_latencies_for_domains(domains, latencies): for domain in domains: latency = get_latency(domain) latencies = add_latency_to_domain(domain, latency, latencies) return latencies

    def add_latency_to_domain(domain, latency, latencies): if domain not in latencies: latencies[domain] = [] latencies[domain].append(latency) return latencies

    def average_latencies(latencies): averages = [] for domain, latency_list in latencies.items(): avg_latency = sum(latency_list) / len(latency_list) averages.append((domain, avg_latency)) return averages

    def sort_latencies(averages): return sorted(averages, key=lambda x: x[1])

    def get_latency_report(domains, duration): latencies = measure_latencies(domains, duration) averages = average_latencies(latencies) return sort_latencies(averages)

    def get_instances(data: Dict) -> List[Dict]: instances = [] for instance_details in data["instance_details"]: instances.append(instance_details) return instances

    def get_domains(instances: List[Dict]) -> List[str]: return [instance["domain"] for instance in instances]

    def load_json_data(filepath: str) -> Dict: with open(filepath) as json_data: return json.load(json_data)

    def main(): data = load_json_data('stats.json') instances = get_instances(data) domains = get_domains(instances) report = get_latency_report(domains, TIME_TOTAL) for domain, avg_latency in report: print(f"{domain}: {avg_latency:.2f} seconds")

    if name == "main": main() ```

    4
    What are the incentives for hosting a Lemmy instance?

    The primary incentive that comes to mind is improved availability. Often, instances can become slow, so I use another. By hosting a local instance I could always have a smooth experience.

    Scores are federated, resulting in a consistent global feed across instances and a lack of uniqueness for each instance. I wish hosting an instance provided a more customized experience like this. It would be a great incentive.

    34
    Introducing the Orange Pi 5B: A Powerful and Affordable Single-Board Computer

    cross-posted from: https://lemmy.fmhy.ml/post/616834

    > cross-posted from: https://lemmy.fmhy.ml/post/616828 > > > The Orange Pi 5B is a versatile single-board computer that offers impressive performance at an affordable price. With its Rockchip RK3588S 8-core 64-bit processor, it delivers a powerful computing experience, making it an excellent alternative to the Raspberry Pi 4[2][3]. > > > > ### Key Features and Specifications > > > > - Rockchip RK3588S 8-core 64-bit processor (quad-core A76 + quad-core A55) > > - Main frequency up to 2.4GHz > > - 4GB/8GB/16GB/32GB LPDDR4/4x memory options > > - Support for 8K video codec > > - Wi-Fi 6 and Bluetooth 5.0 with BLE support > > - 32GB/64GB/128GB/256GB eMMC storage options > > - USB 2.0/3.0, HDMI 2.1, Gigabit LAN port, TF card slot, and Type-C power supply > > > > The Orange Pi 5B provides a wide range of interfaces, including HDMI output, GPIO interface, M.2 PCIe2.0, Type-C, Gigabit LAN port, 2x USB 2.0, and 1x USB 3.0[4]. It supports various operating systems, such as Orange Pi OS, Android 12, Debian 11, and Ubuntu 22.04[1]. > > > > ### Performance and Benchmarks > > > > In the Geekbench 5 benchmark, the Orange Pi 5B scored 1016 for single-core and 2869 for multi-core, significantly outperforming the Orange Pi 4. Its power consumption is higher than other single-board computers, consuming 3.3 watts at idle and 7.3 watts at full load[8]. > > > > ### Conclusion > > In conclusion, the Orange Pi 5B is a powerful and affordable single-board computer that offers a wide range of features and impressive performance. With its versatile interfaces and support for various operating systems, it is an excellent choice for a variety of applications, from edge computing and artificial intelligence to smart home solutions and more[4]. > > > > Citations: > > > > [1]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-plus.html > > > > [2]: https://www.androidpimp.com/embedded/orange-pi-5-5b-case/ > > > > [3]: https://www.phoronix.com/review/orange-pi-5 > > > > [4]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5B.html

    13
    Introducing the Orange Pi 5B: A Powerful and Affordable Single-Board Computer

    cross-posted from: https://lemmy.fmhy.ml/post/616828

    > The Orange Pi 5B is a versatile single-board computer that offers impressive performance at an affordable price. With its Rockchip RK3588S 8-core 64-bit processor, it delivers a powerful computing experience, making it an excellent alternative to the Raspberry Pi 4[2][3]. > > ### Key Features and Specifications > > - Rockchip RK3588S 8-core 64-bit processor (quad-core A76 + quad-core A55) > - Main frequency up to 2.4GHz > - 4GB/8GB/16GB/32GB LPDDR4/4x memory options > - Support for 8K video codec > - Wi-Fi 6 and Bluetooth 5.0 with BLE support > - 32GB/64GB/128GB/256GB eMMC storage options > - USB 2.0/3.0, HDMI 2.1, Gigabit LAN port, TF card slot, and Type-C power supply > > The Orange Pi 5B provides a wide range of interfaces, including HDMI output, GPIO interface, M.2 PCIe2.0, Type-C, Gigabit LAN port, 2x USB 2.0, and 1x USB 3.0[4]. It supports various operating systems, such as Orange Pi OS, Android 12, Debian 11, and Ubuntu 22.04[1]. > > ### Performance and Benchmarks > > In the Geekbench 5 benchmark, the Orange Pi 5B scored 1016 for single-core and 2869 for multi-core, significantly outperforming the Orange Pi 4. Its power consumption is higher than other single-board computers, consuming 3.3 watts at idle and 7.3 watts at full load[8]. > > ### Conclusion > In conclusion, the Orange Pi 5B is a powerful and affordable single-board computer that offers a wide range of features and impressive performance. With its versatile interfaces and support for various operating systems, it is an excellent choice for a variety of applications, from edge computing and artificial intelligence to smart home solutions and more[4]. > > Citations: > > [1]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-plus.html > > [2]: https://www.androidpimp.com/embedded/orange-pi-5-5b-case/ > > [3]: https://www.phoronix.com/review/orange-pi-5 > > [4]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5B.html

    13
    Introducing the Orange Pi 5B: A Powerful and Affordable Single-Board Computer

    The Orange Pi 5B is a versatile single-board computer that offers impressive performance at an affordable price. With its Rockchip RK3588S 8-core 64-bit processor, it delivers a powerful computing experience, making it an excellent alternative to the Raspberry Pi 4[2][3].

    Key Features and Specifications

    • Rockchip RK3588S 8-core 64-bit processor (quad-core A76 + quad-core A55)
    • Main frequency up to 2.4GHz
    • 4GB/8GB/16GB/32GB LPDDR4/4x memory options
    • Support for 8K video codec
    • Wi-Fi 6 and Bluetooth 5.0 with BLE support
    • 32GB/64GB/128GB/256GB eMMC storage options
    • USB 2.0/3.0, HDMI 2.1, Gigabit LAN port, TF card slot, and Type-C power supply

    The Orange Pi 5B provides a wide range of interfaces, including HDMI output, GPIO interface, M.2 PCIe2.0, Type-C, Gigabit LAN port, 2x USB 2.0, and 1x USB 3.0[4]. It supports various operating systems, such as Orange Pi OS, Android 12, Debian 11, and Ubuntu 22.04[1].

    Performance and Benchmarks

    In the Geekbench 5 benchmark, the Orange Pi 5B scored 1016 for single-core and 2869 for multi-core, significantly outperforming the Orange Pi 4. Its power consumption is higher than other single-board computers, consuming 3.3 watts at idle and 7.3 watts at full load[8].

    Conclusion

    In conclusion, the Orange Pi 5B is a powerful and affordable single-board computer that offers a wide range of features and impressive performance. With its versatile interfaces and support for various operating systems, it is an excellent choice for a variety of applications, from edge computing and artificial intelligence to smart home solutions and more[4].

    Citations:

    [1]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-plus.html

    [2]: https://www.androidpimp.com/embedded/orange-pi-5-5b-case/

    [3]: https://www.phoronix.com/review/orange-pi-5

    [4]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5B.html

    1
    Share Your Favorite Linux Distros and Why You Love Them

    So we can clearly see the most popular distros and the reasons why people use them, please follow this format:

    • Write the name of the Linux distro as a first-level comment.
    • Reply to that comment with each reason you like the distro as a separate answer.

    For example:

    • Distro (first-level comment)
      • Reason (one answer)
      • Other reason (a different answer)

    Please avoid duplicating options. This will help us better understand the most popular distros and the reasons why people use them.

    396
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)IN
    InternetPirate @lemmy.fmhy.ml
    Posts 33
    Comments 132