onyxleopard's recent activity

  1. Comment on Favorite function you've written? in ~comp

    onyxleopard
    Link
    Many years ago I cam across this fairly elegant implementation of generating n-grams in Python. I rewrote this to be totally lazy using some of the facilities of Python's itertools module: def...

    Many years ago I cam across this fairly elegant implementation of generating n-grams in Python.

    I rewrote this to be totally lazy using some of the facilities of Python's itertools module:

    def ngrams(iterable, n=1):
        """Generate ngrams from an iterable in a totally lazy fashion
        
        l = range(5)
        list(l) -> [0, 1, 2, 3, 4]
        list(ngrams(l, n=1)) -> [(0,), (1,), (2,), (3,), (4,)]
        list(ngrams(l, n=2)) -> [(0, 1), (1, 2), (2, 3), (3, 4)]
        list(ngrams(l, n=3)) -> [(0, 1, 2), (1, 2, 3), (2, 3, 4)]
        
        """
        from itertools import tee
        from itertools import islice
        yield from zip(*(
            islice(items, i, None) for i, items in
            enumerate(tee(iter(iterable), n))
        ))
    
    4 votes
  2. Comment on Neo-nazis are gaming Twitter’s new rules, exactly like people warned in ~tech

    onyxleopard
    Link Parent
    This is tricky. I'd say that "preventing a neo-nazi rally" is good in the macro sense, and doxxing a white supremacist might be a step that has the effect of preventing a neo-nazi rally, so it can...

    An online hate mob doxxing a games journalist for being a feminist is wrong; an antifascist group doxxing a white supremacist trying to organize a neo-nazi rally is good.

    This is tricky. I'd say that "preventing a neo-nazi rally" is good in the macro sense, and doxxing a white supremacist might be a step that has the effect of preventing a neo-nazi rally, so it can be deemed good in the sense of the end justifying the means. But, I'd still argue that doxxing, per se, is not good. It opens Twitter up to arguments about morality and how they determine what is good or bad.

    I think there are plenty of other steps that have nothing to do with Twitter that could be effective at preventing the neo-nazi rally from occurring. As such, I don't think it's Twitter's responsibility to insert itself into moral litigation like this when that can be handled externally (such as by laws). Neither do I think we should place that mantle of responsibility on Twitter's shoulders. Twitter policies (or corporate policies generally) shouldn't be dictated by moral principles. I think fairness and equity are much better guiding principles for policies like this, rather than moral principles.

    14 votes
  3. Comment on 100 years of whatever this will be in ~humanities

    onyxleopard
    Link Parent
    Is this axiomatic, though? I guess this question is a razor that can dissect a certain kind of pessimism from optimism. I guess you can label me somewhat of a technocrat in that I do believe there...

    And since we can't get rid of them

    Is this axiomatic, though? I guess this question is a razor that can dissect a certain kind of pessimism from optimism. I guess you can label me somewhat of a technocrat in that I do believe there could be technological solutions out there for many of our systemic problems. I'm not 100% sure, but it seems within the realm of possibility. I think that presuming that all human systems are doomed by by moral fallibility is too strong.

    But part of that system must also account for the human tendency to twist any system to selfish and ultimately cruel ends.

    Right, which is why it is appealing to look to universal laws, rather than human ones, to regulate selfishness and cruelty. If we can't self-govern in our own best interest, then maybe we can defer regulating our own worst interests with laws that we don't know how to break?

  4. Comment on Questions about Apple TV 4K (2021) in ~tech

    onyxleopard
    Link Parent
    Cool, so these are supported by apps. Have you used either of these? I could imagine latency issues unless the controller/keyboard/mouse you use is connected to the PC directly rather than hopping...

    Cool, so these are supported by apps. Have you used either of these? I could imagine latency issues unless the controller/keyboard/mouse you use is connected to the PC directly rather than hopping through the Apple TV and over the network.

    (Having tried Xbox Cloud Gaming, the latency is way too bad to be usable for me, but maybe on a local network it is playable.)

    2 votes
  5. Comment on 100 years of whatever this will be in ~humanities

    onyxleopard
    Link Parent
    I disagree. Physics can be exploited to monstrous ends (cf. nuclear bombs). It can also be exploited for other things (cf. nuclear power plants). These things are not mundane (or are you invoking...

    The perfect beauty of a mathematical system only retains that perfection when observed from a distance. Once it is invoked as a bases for practical application to human affairs it becomes mundane and usable simply in the act of choosing to invoke it, which is, in and of itself a human choice fraught with personal motivations and known or unknown desires to establish control or influence.

    I disagree. Physics can be exploited to monstrous ends (cf. nuclear bombs). It can also be exploited for other things (cf. nuclear power plants). These things are not mundane (or are you invoking the sense of “mundane” as in earthly/secular/non-spiritual?). It’s hard for me to see how decisions surrounding the practical application of technology relates to decisions surrounding systems, such as economics or politics. Those are systems that have historically not been backed by natural physics. That is the part that I see as appealing, and which, for better or worse, is what I think also appeals to the Jack Dorsey’s out there who see the perverseness of this and wish we could back well-designed or well-intentioned human systems with something as robust as what backs up nature.

    1 vote
  6. Comment on Questions about Apple TV 4K (2021) in ~tech

    onyxleopard
    Link
    I’m not familiar with AMD Link or Steam Link, but unless you can find evidence that Apple TV support these streaming features, I am highly doubtful Apple supports these things. Apple TV hardware...

    About game streaming directly from my desktop, how good does it work? I saw people saying the Shield is better for gaming but, if I use AMD Link or Steam Link, I would think it does not matter if it is the Apple TV or Shield, or? Maybe the Shield has better support for GeForce Now, but I do not use the service.

    I’m not familiar with AMD Link or Steam Link, but unless you can find evidence that Apple TV support these streaming features, I am highly doubtful Apple supports these things. Apple TV hardware is very app-centric. It is technically capable of streaming content over your network from a local Mac or PC, but that experience is really lesser than the experience of consuming content through dedicated apps like the Apple’s own TV app, Netflix, Hulu, HBO, etc.

    How easy is to watch / listen to my content that is currently on my laptop / desktop? I saw people simply saying to use Infuse or Plex and stream it to the Apple TV. Is there a better way?

    It’s not hard given that the media is first imported into the Music or TV apps on a Mac or iOS device. You can also use AirPlay from such devices, or set up a PC to do the same with various 3rd party softwares. AirPlay on a fast local network is fine. Not great, but given the bandwidth requirements, you really aren’t going to do better than 1080p or so. Given your TV is 1080p natively, that’s probably fine for you, though. (My point is mainly, if you have 4k content on your PC and you are hoping to stream it over AirPlay, it’s going to get compressed to all hell. It’ll still be watchable, but won’t be a great way to experience your content.)

    Are there things that I should be "careful" with the Apple TV? I remember the time that my wife bought our iPad, and it was hard to just find how to upload a TV series and run it with subtitles. (facepalm) There is no complexity like this on Android, honestly, no software to install on my pc, etc.

    Yes, if you are planning to watch content on Apple TV, you should probably convert video files using ffmpeg or HandBrake or some such tool using a preset that is known to be compatible your model. There are myriad vagaries of modern video formats that can muck things up, such as multiple video or audio streams and multiple subtitle tracks. Not to mention container formats like .mkv vs. .mp4 etc. See, for example, this post explaining the special flag you need to give to ffmpeg when converting HEVC files so that Apple recognizes it.

    I saw a lot of people complaining about the support of codecs on the Apple TV comparing to the Shield. Stuff like, no TrueHD audio, no DTS:X, no lossless audio pass-through, transcoding, etc. So many topics that got me confused, since I'm not an expert in this field. If my goal for the future is to buy an amazing 4K "smart" TV and soundbar that both have Dolby Vision and Atmos, and most of my content are local downloaded films or streaming from HBO or Netflix, how important are all of these missing "features" from the Apple TV? People also said to just use Plex or Infuse, and they will have the "audio features" that the Apple TV is natively missing. So, honestly, I didn't understand all the discussion regarding this and why was the Shield better if other apps can support the codecs and missing features.

    I think if you’re planning to mostly consume media that you store locally on your PC then setting up Plex or something of that nature is going to give you a much better experience than trying to consume it through an Apple TV. Apple has a lot of expectations about media to make it work properly, and unless you are willing to go quite far into the weeds, or just consume content from sources Apple has blessed (i.e., apps created for the Apple TV and distributed by Apple), you’re going to run into issues sooner or later.

    tl;dr Apple TV works very well if you’re consuming content from streaming services that have designated apps on the platform, or streaming content that has been prepared in a media format that it expects. It does not work well outside those expectations.

    2 votes
  7. Comment on 100 years of whatever this will be in ~humanities

    onyxleopard
    Link Parent
    While focusing on the women’s movement, that essay is also chock full of great insight on politics generally. A fantastic read.

    While focusing on the women’s movement, that essay is also chock full of great insight on politics generally. A fantastic read.

  8. Comment on 100 years of whatever this will be in ~humanities

    onyxleopard
    Link
    I thought there were some good points here, but it seems like there is a bit of cognitive dissonance when both appealing to a need for regulation, but also decrying that governments are failing at...

    I thought there were some good points here, but it seems like there is a bit of cognitive dissonance when both appealing to a need for regulation, but also decrying that governments are failing at fulfilling that duty.

    I guess my take at this very high level of general criticism of capitalism is that when Silicon Valley types get fed up with the vagaries of human systems, they appeal to the literal tyranny of physics. That’s the basis of all the crypto-cruft: exploit properties of information and entropy that are bound by physics. There is a beauty in it that I find appealing. There’s a reason we use terms like “mathematical rules” or the “laws that govern the universe”. It is a form of tyranny, but from a secular perspective, there is no agent behind this form of tyranny. Ultimately, physical laws are the regulators when all else fails, because, as far as we know, they cannot fail—not in the same way that cloud services, or states, or corporations might. And we’ve recorded enough modern human history now to know that those constructs inevitably do fail in unpredictable and sometimes perverse ways.

    I think there is truth (an inhuman, cold, hard truth, but still a truth) to the notion that regulatory apparatuses not backed by physics or mathematical certainty are destined to fail. I don’t know how to begin to think about replacing capitalism, systemically. But, since it is a human system, I’m confident that it’s not physically impossible to do it. I also don’t really see a replacement that we could smoothly migrate to, so I don’t want to be around when its regulatory systems catastrophically fail.

    2 votes
  9. Comment on Pixels are not little squares in ~comp

    onyxleopard
    Link Parent
    It’s definitely an abstraction to think about pixels vs. points. But, when your concern is say, normalizing image resolution across devices/file systems/image codecs, it can be a useful...

    It’s definitely an abstraction to think about pixels vs. points. But, when your concern is say, normalizing image resolution across devices/file systems/image codecs, it can be a useful abstraction. When the sub-pixel layouts of different digital display technologies come up, abstract pixels become a bit muddy, though. E.g., sub-pixels on many OLED displays are not simple RGB matrices. As with many technical terms, there’s a lot of domain-specific context that’s needed to understand what concept “pixel” signifies.

    3 votes
  10. Comment on Spiders in ~comp

    onyxleopard
    Link Parent
    I don't have experience with broad crawling, but I can imagine at least two strategies to deal with this: Fuzzy content duplicate detection / deduplication (i.e., "I've already seen a page that is...

    I don't have experience with broad crawling, but I can imagine at least two strategies to deal with this:

    1. Fuzzy content duplicate detection / deduplication (i.e., "I've already seen a page that is exactly like this one, except the date is different, so skip/deprioritize this."—locality sensitive hashing (LSH), such as simhash, is a good strategy for this, and that is how Google used to do it)
    2. Limiting the crawl either by depth, breadth, or simply put an upper bound on the number of URLs to crawl within a domain (i.e., "I've already spent 5 minutes of actual crawl time (not counting rate limits) on this or hit a cap of 10k URLs, so skip/deprioritize this.")

    One might consider deduplication to be something you perform as a post-process (e.g., how this paper describes post-processing Common Crawl), but I think attempting some simple deduplication as you go might be more optimal.

    3 votes
  11. Comment on My thoughts on Denis Villeneuve's Dune in ~movies

    onyxleopard
    Link Parent
    I may not have communicated my point clearly enough. I wasn’t disappointed due to lack of explanation, I was somewhat disappointed due to the focus on some things at the expense of others. The...

    I may not have communicated my point clearly enough. I wasn’t disappointed due to lack of explanation, I was somewhat disappointed due to the focus on some things at the expense of others. The source content is so rich, so choices about every second to put on screen must have been agonizing. There’s a difference between explaining things and hinting at them. For instance, using Paul’s holo-vid session to show the desert mouse was a neat touch. But there were missed opportunities like that all over. Opportunities to show the space navigators. To show the plot about how Leto’s men, (but not Leto) suspected Jessica of being the traitor. There was a magnificent decision tree of what to put on screen, and I was just expressing disappointment in which branches got lopped off. I’m not saying I wanted it to be longer and have more forced exposition, just to have followed some different threads here or there.

    4 votes
  12. Comment on My thoughts on Denis Villeneuve's Dune in ~movies

    onyxleopard
    Link Parent
    That’s exactly the art of film, though. The best films marry the content to the form in a manner that enhances both. It requires mastery at every stage of the creative process to accomplish. I...

    Text as a medium is forgiving: readers can re-read words, re-process them, and even go back pages for reference. But film is unforgiving: it pushes the viewer ever onwards toward the end like in a busy metro. Too much exposition and the viewer trips and gets trampled underfoot as the film hurriedly keeps pushing forward to its destination.

    That’s exactly the art of film, though. The best films marry the content to the form in a manner that enhances both. It requires mastery at every stage of the creative process to accomplish. I think this adaptation was good, but still fell short of its potential.

    2 votes
  13. Comment on My thoughts on Denis Villeneuve's Dune in ~movies

    onyxleopard
    (edited )
    Link
    I agree with your take on the whole. I saw it with 3 friends, two of which had read the books. We left the theatre and immediately had to explain to our uninitiated friend all sorts of aspects of...

    I agree with your take on the whole. I saw it with 3 friends, two of which had read the books. We left the theatre and immediately had to explain to our uninitiated friend all sorts of aspects of the world-building and politics that this adaptation did not include. For instance, there was no explanation of mentats, no explanation of the lack of computers/robots, no depiction of the emperor or the other great houses besides Harkonnen and Atreides. I felt like this was the tragedy of Leto Atreides, the film. It was very good as that, but I agree that the scope was narrowed and the source content is so rich that this felt sparse just by virtue of its focus. It could have been so much worse, and yet could have been so much better.

    I really hope the second film gets made (or the trilogy if they make Dune Messiah the third installment as Villenueve has expressed interest in).

    The one major criticism I have is that Yue’s betrayal didn’t feel impactful, as he had such little screen time. (I guess Mabe was similarly under-utilized.)

    3 votes
  14. Comment on The Trump SPAC is doing stonk things, which is hilarious in ~finance

    onyxleopard
    Link Parent
    I interpret this as basically Levine admitting that the stock market has gone full post-truth. What it seems to have revealed, though, is that the markets still keep on opening every day, and the...

    I interpret this as basically Levine admitting that the stock market has gone full post-truth. What it seems to have revealed, though, is that the markets still keep on opening every day, and the world hasn't ended.

    Doesn’t it feel like that world has ended and a new one has begun?

    See, not being initiated in the world of economics, what I wonder is was that previous world even real to begin with, or were economists and serious investors just collectively deluding themselves? I guess the interesting question to me is how could one falsify the dominant view? Do memes stocks falsify it? Or is there just a new market for cults of personality that had previously only been capitalized informally off of Wall Street?

    5 votes
  15. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    Right, I was mistaken in my analogy there because I had the formula for short interest wrong (and the analogy got away from us as I was also presuming that all eBay listings were listed by short...

    A loan isn't a "listing on ebay."

    Right, I was mistaken in my analogy there because I had the formula for short interest wrong (and the analogy got away from us as I was also presuming that all eBay listings were listed by short sellers, but I didn't specify that). I hope it's obvious how my logic was valid but unsound based on that false premise of defining short interest incorrectly.

    1 vote
  16. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    🤦‍♂️. It would have saved you so much trouble and me so much confusion if finance people understood what percentages are! It is a crime against common sense for short interest to be reported as a...

    I think part of the confusion is that usually a percentage is unitless; both the numerator and the denominator have the same unit.

    Here, they're just completely different things. One is counting the # of a type of transaction, the other is counting the # of shares that exist.

    🤦‍♂️. It would have saved you so much trouble and me so much confusion if finance people understood what percentages are! It is a crime against common sense for short interest to be reported as a percentage if this what that metric actually means.

    1 vote
  17. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    So, I guess this is the fundamental flaw in my understanding. I assumed that short interest is computed at some instant. I took your description of the world as a number of time steps that leads...

    So, I guess this is the fundamental flaw in my understanding. I assumed that short interest is computed at some instant. I took your description of the world as a number of time steps that leads to a final time step where the state is such that Evan has been lent an apple that ultimately Alice owns. At this time step, though, you're saying we go back through the previous steps to count the apples sold short as 2? Even though there is only 1 apple in question? Over what window of steps do we need to look to count short sales to compute short interest then? I thought that shares would be counted at one time step, but clearly that is wrong if the short interest is 200% for the state of the world that you described.

    Well, I have $50, and Alice has $30, so $80. Even though we started with $50, because we still count me as having my $50 even when I give it to the bank's custody as a deposit.

    Well, this is a domain-specific sense of "count" to me. In the lay understanding of "count", I would count you as only having $20, until Bob paid you back the $30 you lent him.

  18. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    Is this description of the state of apple-world complete enough that we can compute the short interest in apples from this information? As I explained, what I can't grok is what the state of the...

    Alice has an apple
    Alice lends to Bob (fine)
    Bob sells to Cindy (fine, because Bob has an apple in his hands that he can hand to Cindy)
    Cindy lends to Evan (fine)
    Evan can sell to Joe (fine, because Evan has an apple in his hand, lent from Cindy, that he can hand to Joe)

    Is this description of the state of apple-world complete enough that we can compute the short interest in apples from this information? As I explained, what I can't grok is what the state of the world looks like where short interest in apples is >100%, but nobody is naked shorting. You've explained a situation where I think I can accept that nobody is naked shorting, but I also don't see how this situation represents >100% short interest. (Maybe my misunderstanding has nothing to do with understanding naked shorting and has everything to do with how short interest is computed?)

  19. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    This is not clear to me (maybe I'm just too dense). I still can't imagine the situation where >100% short interest is possible without some short sellers not being naked. In my toy world with 2...

    In that vein, it is fine for there to be more short positions than assets - clearly, since that was the case here. What is specifically not fine is making a contract to sell an asset without having anything to give to that other person when you made the sale.

    This is not clear to me (maybe I'm just too dense). I still can't imagine the situation where >100% short interest is possible without some short sellers not being naked. In my toy world with 2 apples and 5 people, I still can't grok what the situation looks like where there is >100% short interest in apples, but nobody is naked.

  20. Comment on SEC report on Gamestop, AMC stock price jumps in January 2021 in ~finance

    onyxleopard
    Link Parent
    Thank you for your patience in explaining this, but I still don't understand. I understand this so far. I have shorted an apple, believing the price of apples will go down in the the next week. I...

    Thank you for your patience in explaining this, but I still don't understand.

    Let's say the price of an apple is $1. You believe that in a week, you'll be able to buy an apple for $0.50. You go to the grocery store and borrow an apple, promising to give one back in a week.

    I understand this so far. I have shorted an apple, believing the price of apples will go down in the the next week.

    Now you go on ebay and sell the apple for $1. The apple is now off in the void of ebay - your apple has gone who knows where. Your plan is to wait a week and buy back an apple from ebay for $0.50 to give back to the grocery store. Not necessarily the same apple, just an apple.

    I still follow.

    Now let's say I'm the guy who buys the apple from you on ebay. I have an apple - a physical apple, that clearly cannot be cloned. My friend bob also thinks that apples will cost $0.50 in a week. He asks if he can borrow my apple and give an apple back in a week. I agree.

    Now he goes and sells an apple for $1 on ebay.

    That's short selling twice.

    This is where I get lost. Since we're considering apples fungible here, it doesn't really matter which apple is which. But the total number of apples in the world is still of consequence. As I understand it, >100% short interest in apples would mean that there are more listings for apples on eBay than there are apples in the world. Logically, some of the people listing apples aren't in possession of an apple to sell.

    Let's keep things simple and imagine a world in which there are only 2 apples (we'll consider them fungible) and five people Alice, Bob, Cindy, Evan, and Dolly.

    Can you explain who owns these 2 apples in this world when there is >100% short interest in apples?

    1 vote