• 0 Posts
  • 235 Comments
Joined 3 years ago
cake
Cake day: June 20th, 2023

help-circle
  • I’ve coded this and I’m a retard. Relative portion from a method:

    from urllib.request import urlopen
                foundrss = False
                for line in urlopen(self.channelurl):
                    for word in line.split():
                        if foundrss:
                            if not self.feedurl:
                                self.feedurl = word.split(b'"')[1].decode("utf-8")
                                if 'xml' not in self.feedurl:
                                    raise Exception("'xml' not found in feedurl")
                            elif not self.channelname: # feed url is set, extract the channel name that comes soon after
                                if word.startswith(b'content='): # start collecting words
                                    self.channelname = [word.split(b'"')[1].decode("utf-8")]
                                    if word.count(b'"') == 2: # channel name is a single word
                                        self.channelname = self.channelname[0]
                                        return
                            else: # we have channelname started, just collect the rest of the words now
                                if b'"' in word: # get text to the left of "
                                    self.channelname.append(word.split(b'"')[0].decode("utf-8"))
                                    self.channelname = ' '.join(self.channelname)
                                    return
                                else:
                                    self.channelname.append(word.decode("utf-8"))
                        elif word == b'title="RSS"':
                            foundrss = True
    


  • JTskulk@lemmy.worldtoLinux@lemmy.mlRTFM
    link
    fedilink
    English
    arrow-up
    7
    ·
    25 days ago

    RTFM doesn’t have to literally mean to read text, just like saying “let me google that for you” doesn’t have to literally be google. Both statements are similar; the point is instead of burdening others with teaching you something, go learn it on your own whether that be the manual or random Indian tech youtuber.







  • It’s really just a difference of opinion. GPL enjoyers such as myself believe that Free software is the best and it should be kept free with a copyleft license. BSD license enjoyers also love Free software, but they believe in putting next to zero conditions on their software. They’re just happy if their freely released software is used to make anything better, even if it means proprietary projects incorporating it and not contributing.






  • I watch both and I think Brood War is more interesting to watch because there are more fights that last longer and the RNG factor means you can’t tell how the fight is going to go before it happens. There are a lot of tense and exciting moments in Brood War compared to SC2. How many shots will miss when shooting up a cliff? Will this mine detonate and kill 3 dragoons? How long will it take the player to notice that a DT is slaughtering drones without a notification? Will the reaver shot connect or dud? Will the scourges connect?

    Basically SC2 is a lot easier to play with very little RNG. Pro players don’t even attack each other early anymore because every cheese is solved. Brood War has a really good rock/paper/scissors balance that has shockingly lasted 25 years with no real balance patches. Also the game was remastered and the graphics are beautiful now.