Skip Navigation

Posts
40
Comments
673
Joined
2 yr. ago

  • Bro... we know. That's the joke. 🙂 She finds a way to make it smooth, but there's no particular reason to spend a decent chunk of two whole separate pages of this fairly short letter just randomly talking about sexual abuse and serial rape, specifically going back to the 1990s and specifically the idea of letting it go unprosecuted and what a bad thing that would be.

    It's smooth, but it's extremely specific.

  • In my opinion, C is a difficult starter language, but one that sets you up for very good abilities in the future, because a lot of other languages' core concepts are built on C concepts. It's all bytes, and if you're comfortable with bytes then that'll put you ahead of someone who only knows the general concepts. It's similar to working construction before you go into architecture -- your buildings will be better even if you're thinking at a higher level than nails and shingles when you do most of your design.

    So, ChatGPT is tuned to sort of do things for you, but you can still have it do the troubleshooting with the right prompting instead of just rewriting:

    GPT-4 Prompt

    I'm trying to understand what's going wrong with my code -- can you point me to the line that's causing the issue and quickly explain what might be wrong?

     
        
    import random
    word_list = ["aardvark", "baboon", "camel"]
    chosen_word = random.choice(word_list)
    
    #Testing code
    print(f'Pssst, the solution is {chosen_word}.')
    
    #Create an empty List called display.
    #For each letter in the chosen_word, add a "_" to 'display'.
    #So if the chosen_word was "apple", display should be ["_", "_", "_", "_", "_"] with 5 "_" representing each letter to guess.
    
    
    display = ["_"] * len(chosen_word)
    
    
    guess = input("Guess a letter: ").lower()
    
    #If the letter at that position matches 'guess' then reveal that letter in the display at that position.
    #e.g. If the user guessed "p" and the chosen word was "apple", then display should be ["_", "p", "p", "_", "_"].
    
    for letter in chosen_word:
        if guess == letter:
            for i in range(len(chosen_word)):
                display.insert(i, guess)
    
    print(display)
    
      

    GPT-4's response

    The problem with your code is in this segment:

     
        
    for letter in chosen_word:
        if guess == letter:
            for i in range(len(chosen_word)):
                display.insert(i, guess)
    
      

    The logic you're using here is:

    • For each letter in chosen_word,
    • If guess matches the letter,
    • Insert the guessed letter at every index of the chosen_word.

    This will make the display list longer than it should be, and the letters will not replace the underscores but instead will be added alongside them.

    Instead, you should check if the guessed letter matches a letter in the chosen word at a specific position, and if it does, replace the underscore at that position in the display list.

    Here's the corrected segment of code:

     
        
    for i in range(len(chosen_word)):
        if chosen_word[i] == guess:
            display[i] = guess
    
      

    With this, the guessed letter will replace the corresponding underscore in the display list.

  • So - ChatGPT is great for breaking down concepts like this and answering questions about the basics until you get the hang of it. I would recommend crafting some programs while asking it for help on anything you get stuck with, until you can craft the programs without involving it (and still you can paste the programs into it and ask for pointers / fixes that it can see). I'm currently learning Go with assistance from ChatGPT and it's hugely useful.

    One other angle you could come at it from -- this might venture into unpopularopinion territory, but I would actually recommend learning C at a very early stage. It'll be tedious to make nontrivial programs with it, so you may not want to stick with it for your real projects, but since everything is bytes and pointers it gives you a chance to get extremely solid with the fundamentals before you start mucking around with slices / hashes / etc. I would recommend to try to get this particular problem working using C, which will be more work, but then when you come back and learn the Python concepts I think they'll make a lot of sense and you'll feel capable with them. IDK if it'll work that way for you, but that's what I did and I feel like it was a good way to go.

    Best of luck + keep plugging

  • How many kids are we willing to let die while we’re waiting for more evidence?

    So - I'm actually not saying we need to ban this use of these drugs until it's been studied more. The honest truth is, I have no idea about that side of it; my only real opinion on it is that it would be a really good thing to study them in a lot of detail and then make the recommendation based on that.

    That's what bothers me more than anything about the whole conversation. It's like this reaction of "Well you must be the ENEMY, you really hate trans people and you're just LYING about wanting to study the drugs, even you being allowed to say that is TERRIBLY DANGEROUS. Just approve the drugs, they're clearly safe, because I say so, and if you disagree there's something TERRIBLY WRONG WITH YOU." I don't know how else to say it: I am not the enemy, I don't think.

    As far as I can tell, the Economist article is saying that the drugs haven't been studied in adolescents as much as would be reasonable. I took a bunch of time to look over @sphenoid's sources in detail, because it's important to me, and my overall conclusion was in agreement with that statement. So I took time to respond, giving a bunch of detail from my own desire to know more about it, and then the conversation ended.

    It just seems weird that my whole viewpoint is "the enemy" and engenders this kind of hatred because everyone assumes that the reasons I'm saying it are borne out of some kind of hatred on my side.

  • So that's why the next really dangerous step is when the law enforcement apparatus (federal and local) starts to buy into the "all Republicans are patriots, all Democrats are the enemy" mindset in a big way. On Tyranny has a really great explanation of how this happens, backed up with some really extensive research on places where it did happen and exactly how it progresses. We're showing a lot of resilience against it in the US, but also, it's not at all impossible.

    Remember, the Nazis were a bunch of weirdos and incompetent losers too, until all of a sudden they weren't.

  • You have that option I think, yes. Why do y'all always assume you're going to win though? You had a chance on January 6th, you had a chance every time Trump calls for a big rally at some courthouse proceeding, Trump had his chance not to surrender and to hole up with all his brave warriors and dare the deep state to come and dig him out.

    I'm not saying there's not something very dangerous in these statements, because there is. But I can also confidently guarantee that just like with Ashli Babbit, as soon as bullets start coming back at Huckabee and a lot of these other extremely soft John "I-don't-do-all-that-well-when-my-plumbing-has-an-issue-let-alone-on-a-goddamned-battlefield" Eastman types, they're going to start all kinds of aggrieved moaning about how someone needs to enforce the laws against political violence, because this is crazy.

  • Yah I thought so. There are enough problems with facial recognition, and the US is such a unique animal in terms of its eagerness and ability to spy on its citizens, that I actually do think this is a problem, but I'm seeing all these people in this thread saying "This is a disaster! They'll be able to identify you now, when you cross the border!"

    Like buddy I have some bad news for you

  • ... because for most travelers, it's already been provided via APIS to the CBP. Like I say, I think the main motivations are (1) making sure that the person traveling matches the identity that was provided to and checked by the computer, which seems legit and (2) trialing the system so they can expand it beyond the international border, which seems far too worrisome to justify the small benefit of #1.

    Driving checkpoints I have no idea; I was honestly thinking only in terms of air and sea travel which is a little more formalized. Are they talking about scanning people's faces when they drive to Mexico also?

  • ?

    I'm not at all a fan of this, but surely presenting your papers when crossing an international border is not a new thing. I'm actually pretty sure I've done this facial scanning when traveling in the EU, and in that case I assumed that it was to detect people who don't match the passport they're holding, which actually seems like a pretty valid law enforcement thing to do. They already know who you are.

    I.e. I agree this is a bad thing but disagree with this particular reason for disliking it. Among other reasons, it surely won't remain only at international borders once the US has gotten some familiarity with the technology.

  • Dude, please take this with all the kindness in the world, but to me it looks like you asked some questions yesterday about contributing to Lemmy, you got answers you didn't like, and now you're asking the exact same question in a much more indirect way in hopes of steering the conversation back to what you want to hear and how you like to look at it.

    I and the other people who gave you answers before are trying to help you be more successful with your contributions. We're not trying to criticize or put you down or anything. I might be right or wrong about this or anything else, but I think it'd be to your benefit to slow down and really listen to what people are saying and how you can contribute in a good and productive give-and-take way, instead of just making your list of demands for how everyone else needs to be.

    Or not. It's up to you; just that's my recommendation based on my limited knowledge of the situation.

    1. Settings & Beta -> Data controls -> Export data
    2. Unzip
     
        
    Python 3.11.3 (main, Apr 21 2023, 11:54:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import json
    >>> with open('conversations.json') as infile:
    ...     convos = json.load(infile)
    ... 
    >>> for convo in convos:
    ...     for key, value in convo['mapping'].items():
    ...         message = value.get("message", None)
    ...         if message:
    ...             parts = message.get("content", {}).get("parts", [])
    ...             for part in parts:
    ...                 if 'text to search' in part:
    ...                     print(part)
    
      
    1. Customize to taste
  • This is just my personal take on it: Way too much of reddit is thought-free, just kind of spending time making in-jokes, or posting charming or funny one-off pictures, just kind of farting around. That is a fine activity, but it's very far removed from what the potential could be of this type of communication network, and what the original goal of reddit was, back in the Aaron Swartz days.

    I actually didn't really notice how far in that direction it had gone until I tried out Lemmy a few months ago, and I found it refreshingly free of the exact same types of vacuous content, and now I've been watching as all that stuff migrates onto Lemmy. I've been progressively unsubscribing from a lot of communities as the average worthwhileness of their posts progressively drops. I actually don't agree at all with the need to "win" by absorbing into Lemmy the user base of Reddit -- I think the goal is to have a high quality network where good discussion happens, which sometimes means more users, but more vitally should mean a good culture with worthwhile content.

    This is just kind of a side note, but the other thing I've observed is that the "you're not allowed to say certain things" mentality of reddit is now here on Lemmy as well. I actually tried out having a couple of heated debates with some tankies in Lemmy tankie forums, early on, curious about whether I would get banned or anything. They downvoted and yelled at me to no end, but no one deleted anything or said I wasn't allowed to have my opinion. Twice in the last couple of days I've had some thread I'm participating in get deleted because mods found it to be a discussion that people weren't allowed to have.

    I do think there's some valuable stuff on reddit, or basically anywhere -- people are great sometimes, and if you give them a place they can talk, sometimes they'll use it to say great stuff. But I do agree 100% with the reluctance to import reddit as it is and instead to try to make a distinct culture that's, for lack of a better word, better.

  • Fair question. There are lots of things which happen which are technically illegal which no one cares enough to prosecute. That doesn't mean those things are safe or a good idea. A person I know told me the story of his company deciding "Well if the government doesn't feel like prosecuting our employee for doing X, and they know about it, then probably it's fine" and then the dude got federally indicted a really hilariously short time later. These things do happen; that's why I bring up Aaron Swartz and the people the RIAA sued.

    Reddit is a different company from Twitter with different leadership. Twitter seems to be going in the direction of "interoperate with the fediverse and try to steer it" while reddit is still stuck in the mode of "keep stubbornly fucking up and search for people to blame and punish." (Twitter's doing that also, just as part of the fediverse now while they're doing it.) I think the risk of legal action from reddit is a lot more realistic.

    It'd be different if I thought that mirroring reddit was a perfectly reasonable thing to do, and they were going to try to prosecute people but that was wrong and so distributing reddit's contents to unrelated people's instances was involving them in something noble. My personal feeling is I don't think that though. I feel like if reddit wants to keep their content off the fediverse they should be allowed to do so, and so you're putting other instance operators at genuine legal risk to accomplish something which shouldn't be done in the first place. Just my personal moral / ethical opinion on it, which colors the way I look at the legal side.

  • It's virtually impossible to prevent people from doing it, yes. It's extremely easy to punish people who are doing it. Do you know what charges Aaron Swartz was facing, and what he was aiming to do that got him those charges?

    Edit: Actually, these people are a little bit better example, since Aaron Swartz did commit additional crimes in support of the original goal of distributing material from a web site.

  • Quick informal poll: Upvote if you're female and okay with the post title, downvote if you think the post title is offensive.

    I'm open to being wrong on this. I know that incel forums have a habit of using "female" as a noun somewhat awkwardly, so it can serve as a tag that the person speaking may be some sort of weirdo, but I've literally never heard of someone getting offended by the usage like it's a slur. If anything it's a sort of telling-on-yourself against the person speaking.

    I suspect that in this case, it's being treated as if it were some kind of slur purely as an excuse to get bent out of shape for performative reasons, but if this is actually something that women in the real world feel is important, it might change my view. Of course this comment thread is going to be a pretty skewed sample, but I'm still curious.

  • 🙄

    I do get the frustration of spending time on something and just wanting to be able to contribute it back to the world without a lot of arguing, but this seems like a very minimal baseline level of what they need to do to get their changes accepted. I actually do have some disagreements with stuff I've seen in my very brief experience with the Lemmy codebase + philosophy, but this here is all just normal minimal things when you're asking to make changes in someone else's repo.

    Guys: Whenever you do set up your fork, let me know whether you're okay with me showing up there with PRs which I'm going to insist that you take into your codebase. I suspect that it'll be a totally different story when it's "you having to accept other people's changes whether you want to or not" versus "Lemmy devs have to take your changes whether they want to or not."

  • I think generally speaking, the authors and maintainers of open source projects have 100% final say over what goes into the tree and how. People may not agree with specific decisions, with various degrees of justification, but I definitely don't think any author should "have to" take changes they don't want to take just because anyone or any majority wants them to. A lot of changes have some merit individually, or maybe not, but they just don't fit overall with how the project should go, or don't fit quality-wise in terms of how they're implemented, or maybe just don't justify the investment of time it would take on the author's part to accept them in.

    This specific example -- a request to contribute infinite scrolling, and the response that that sounds okay as long as it's an option, and off by default -- sounds like a 100% reasonable response from dessalines and co, and I'd probably say, at best, the same thing in their position honestly.

    I mean this is 100% why forks exist and why specifically in this space there are so many mostly-interoperable Mastodon forks. No one's ever going to tell you it's a bad thing if you take your proposed changes and incorporate them into a new "product." That lets you do whatever changes you want to make and publish them to the world with a minimal investment of effort on the part of the original authors. Was someone saying not to create a fork with whatever set of proposed changes included?

  • You went on a rant about how offensive speech in private places should not be removed.

    Actually offensive speech, I think should sometimes not be removed, yes. It depends on a lot of factors and there's a big grey area, between the two extremes, where people of good faith can disagree. If you want to talk about that totally separate topic, I'm open to it.

    Again, this isn't offensive speech to me though. Like I say, I'm genuinely having trouble wrapping my head around the assertion that it is. It sounds like you're very insistent that it is, to the point that I must obviously support all offensive speech if I support this. On that, we're gonna have to agree to disagree, I think.