Not avoided altogether. Static checkers cannot possibly follow all code paths, and they generally err on the side of false negatives rather than risking too many false positives causing people to disable them.
A problem I've had trying to do this for local dev is that the DNS name of the Keycloak server is "keycloak" inside of the Docker network, but "localhost" from the the outside. The user's browser will be redirected to localhost (since it's outside of the Docker network) but then there is a mismatch between hosts (it expects "keycloak" not "localhost") when it comes to an API server verifying the token.
I haven't tried this, but could you modify your /etc/hosts file (or analogous file on whatever operating system) to have `keycloak` as a valid hostname on your local computer? So that both within the docker container and in your host computer, `keycloak` was the hostname of the keycloak server?
> Weird scoping rules? This will rarely if-ever impact you in the real world.
It can be a problem if you have nested loops. Things would have been less error-prone if Python introduced a let keyword.
> The list comprehensions in Python are incredible, in fact people over-use them all the time in really gnarly ways. Like [x for x in [y for y in [z... and the consistency with the same system supporting all datastructures (sets, dictionaries, tuples, etc) is very intuitive.
They have been completely surpassed by those in other languages. For example, you can't do this in Python list-comprehensions:
xs = [
if some_flag:
yield 1
for y in ys:
yield y * 2
]
> Monkey patching is a liability? This is like saying a car is a liability because I am free to drive it off a cliff. You're technically correct, but you are the one in the drivers seat. The ecosystem does not do or encourage this behavior, with the exception of things like gevent where it is required.
Only if you are a solo developer. Unfortunately the Python ecosystem is built around things that compose poorly like annotations and exceptions.
> Mutability by default is common in virtually every language. You can't say it is good or bad, it's just a fact of life. There is a cost to immutable datastructures unless the language is designed from the get-go to utilize them efficiently.
It's a mistake, even though it is common. The cost is low in true FP langauges, because they can be optimized away.
> Lack of support for functional programming? Functions are first class in Python. You can pass them around all over the place, as args, put them in datastructures, etc. When you combine this with comprehensions and generators it is very powerful and lets you do lazy evaluation of complex transformations. There are lots of built-in tools in the stdlib to do functional programming. This is just straight up false.
Python lacks do-notation. It doesn't give you tail-call optimization. Function calls are slow. Immutability is very much opt-in. Lambdas can only be one line. If you do lots of FP in Python, you're in for a bad time.
> Deployment story remains extremely painful - again false, I do not know why people say stuff like this. Create a virtualenv (built into the standard library), and pip install your requirements. If you are using conda and all the other noise you are going to have problems.
In other language stacks it's pretty trivial to cross-compile from e.g. MacOS to Linux and things just work. In Python this basically requires Docker. Note that Pip install doesn't give reproducible builds. There's nothing like Go static binaries out-of-the-box, either.
> Slow execution of pure python code - this is the ONLY area where you are perhaps correct... but compared to what? For a lot of use cases, the speed of Python is not a problem. When it becomes a problem, you off-load that responsibility to something else. There is also something to be said for writing software quickly, which is a perk of Python for sure.
Python is about 100x slower than mainstream GC languages such as Java and C#. Having to drop into native code is not always possible and it's extra work besides.
> Tumblr's success was that it was an adult space that wasn't strictly pornography.
This is a common talking point here, but it just isn't historically accurate in terms of absolute numbers.
Tumblr was most successful in 2011-2012. It started getting huge in 2010 in large part due to having built-in photo and video support, at a time when Twitter didn't have these, and Instagram and Pinterest were still both tiny. Tumblr also offered built-in reblog functionality before Twitter had built-in retweeting.
For a little while there, Tumblr was a mainstream social network -- certainly a bit edgier and more liberal than most competitors, but still mainstream enough that many major brands had a Tumblr presence right alongside their Facebook and Twitter icons. Adult content was definitely present, but it was a single-digit percentage of posts at the time of Tumblr's peak historical traffic levels.
A lot of those mainstream users started to decamp to Instagram and Pinterest after that point, depending on their personal use-case.
That adult content percentage definitely rose over time, but timing-wise that coincided with total traffic decreasing, not increasing. It also scared off the brands, whose advertising dollars were sorely needed to achieve sustainability for the business. So to me, attempting to attribute Tumblr's "success" to adult content just seems way off-base.
Source: I was personally responsible for a decent chunk of Tumblr's scalability and capacity planning for several years.
It seems like a missing part of this was lack of ad safety council on Tumblrs part. Reddit has been getting away with it for over a decade (NSFW content I mean) without losing advertisers. I see a ton of mainstream ads on Reddit (I use their official app, for better or worse)
I don't think its simply the existence of NSFW content that makes advertisers wary. I think its lack of guarantees w/r/t placement
That's expected given Twitter leans more towards text content. The proportion of Tumblr posts that are images or video has always been much higher than Twitter's.
Twitter didn't even have built-in photo posts until mid 2011, and even then it was through a third-party integration with Photobucket for the first year. Images weren't shown inline in the Twitter timeline feed until late 2013! Meanwhile direct video upload was added even later than that.
What I'm trying to say is, to me, that just generally sounds like a pretty large share of adult content no matter how you shake it. I could be over-estimating, but I'd assume it outpaces all of the other major social media platforms and most websites of similar magnitude in general that do allow pornographic content but are not explicitly porn sites.
OK, but I'm not understanding your point. I mean it's all relative. Go back 10-15 years earlier and a very large percentage of uuencoded files uploaded to Usenet were adult content. That doesn't mean NNTP or uuencode were primarily for porn.
On the web, similar situation for DeviantArt and a lot of other sites.
Exactly. I always assumed porn's role in Tumblr was a bit exaggerated, but actually it seems like it really was pretty big, especially considering that we're talking about something that was far, far, far more mainstream than Usenet. (and thus at least in my mind, you'd expect it to be smaller by percentage.)
> DeviantArt
Of course it's complicated. DeviantArt never really allowed pornographic content, but obviously it wound up with a lot of fetish content that blurred the lines regardless. DeviantArt is basically a case study all on its own.
Unfortunately, it's not that simple. Tumblr allowing adult content would probably get it removed from app stores. Only a few major apps get away with it, and when they're gone, they're gone.
Before app stores existed, smartphones weren't used the way they are today. Consumer habits have shifted... you'd be missing out on a HUGE part of the market.
> MindGeek should buy Tumblr and allow adult content again.
MindGeek isn't interested in new investments allowing independent content creation.
MindGeek has been the target of active - and successful - campaigns from anti-pornography groups with explicit religious motivation (Exodus Cry, Morality in Media, etc., mostly funded by right-wing evangelicals). Those groups are the reason that Xtube shut down in 2021, and that Pornhub removed all independent content a couple of months later.
Those same groups are also behind the new "age verification" laws in a number of states, which are the reason that accessing many big-name tube websites (both from MindGeek and other properties) now requires uploading your drivers' license along with biometric face scans, even when viewed from states which don't have such laws on the books.
There's been a war on pornography on the Internet for the last several years, and the anti-pornography groups have won nearly every battle, in part because the only opposition has come from sex workers, who have very little lobbying influence. For some reason, most digital rights or general First Amendment advocacy groups have paid very little attention.
If you wrote on HN in 2017 suggesting the possibility of a total ban on pornography on the Internet within a few years, you'd have been dismissed outright. But we're actually pretty close to a de facto ban on pornography on the Internet. Very few websites still allow independent creators to upload pornography. Most of the ones that were around in 2017 either are dead, no longer allow pornography (Tumblr, Imgur), heavily restrict its visibility (Reddit), or only allow it from "verified creators", which limits it to commercial production (Pornhub).
Even self-hosting is going to become harder, as these groups are shifting their focus towards pressuring payment platforms and hosting providers to drop customers who produce sexual content.
Will pornography be literally banned on the Internet in a few years? Probably not. But will it be extremely difficult to either find or post sexual imagery or nudity within that timeframe? Probably - and so far, the anti-porn activists have actually been operating ahead of their own schedule.
While I don't disagree with the bulk of your comment, it's worth noting that PornHub / MindGeek didn't just shoot themselves in the foot but hurt the entire industry when there were numerous videos of missing teens and underage content found on their site.
I say this as someone who ran an adult website for 18 years, in Canada, until suddenly our bank informed us that they were closing our commercial accounts and we couldn't find a single other bank or credit union in this country that would take our business despite a pristine 18 year track record.
The only thing that had changed was the MindGeek scandal. Maybe the media misrepresented it, maybe the content issues were fabricated by "anti-pornography" groups. But one day everything is fine, the next day MindGeek (a Canadian company) is in the news and the next day we're shut down despite having done nothing wrong.
It's hard for me to scapegoat conservatives and anti-porn groups when they were WAY more vocal and active when I first started my business (back in 2004 this was when the George W Bush administration was prosecuting obscenity for the first time in decades, and passing USC 18 2557). By 2022 they had virtually gone away. Then MindGeek was caught allowing some some really shady shit on PornHub.
Also this was just a year or two after the Girls Do Porn scandal (Google it if you're unaware). Those girls suing those assholes for sexual abuse and contractual misrepresentation was not "anti-porn groups."
So my take, as a former business owner in the industry, was that it took a few public scandals and scares for the banks and corporate America to go "hmm... maybe we were wrong to get too liberal with this stuff." Some of that may have been fueled by the anti-porn lobby .. but if MindGeek had kept their nose clean it likely wouldn't have worked.
> While I don't disagree with the bulk of your comment, it's worth noting that PornHub / MindGeek didn't just shoot themselves in the foot but hurt the entire industry when there were numerous videos of missing teens and underage content found on their site.
This itself is a misconception driven by those anti-pornography groups. MindGeek was incredibly good about removing CSAM from their platform, not just reactively but proactively. If you look at the numbers, Facebook is actually a much larger source of child sexual exploitation material than Pornhub was. However, Exodus Cry doesn't care about CSAM on Facebook, because their goal isn't to end CSAM: it's to end pornography.
> It's hard for me to scapegoat conservatives and anti-porn groups when they were WAY more vocal and active when I first started my business
Anti-porn groups are way more active today than they were in the early Bush years. The difference is that, unlike then, their campaigns aren't receiving any attention outside the business, which is part of why they're so successful: there's no real opposition.
> if MindGeek had kept their nose clean it likely wouldn't have worked.
Anti-porn groups aren't going after these companies because they have scandals. They're going after them because they oppose pornography, and it fits their agenda. If they cared about ending child exploitation, they would go after companies like Facebook - but they don't, because that doesn't accomplish their explict, stated goal of ending commercial sex work.
It's missing the point to blame MindGeek for the "scandal" when they're nowhere near the worst offender - they're just being targeted by groups who have a specific political agenda. No matter how much work MindGeek does to eliminate CSAM, anti-porn groups will claim that it's not enough. The leader of the Exodus Cry campaign has literally said that they want to make it impossible for MindGeek to operate legally.
I say this as someone who ran an adult website for 18 years, in Canada, until suddenly our bank informed us that they were closing our commercial accounts and we couldn't find a single other bank or credit union in this country that would take our business despite a pristine 18 year track record.
Was there no way around it? Maybe with a shell company to hide your real business? I know it didn’t end up working out, I’m just curious if there looked to be any way out or if you really were just locked out of banking.
TL;DR to answer your question: shell company would have been our best bet, but not something we could do logistically or ethically. It would have worked but we'd live every single day knowing that at any moment we could get flagged and go through it all over again. And with a full time job outside outside of running the company part-time there was no time, money, energy or will to set up such a front and figure out legitimate business activities to cover the revenue that was coming in from adult entertainment.
I dug into one such report that broke and apparently it was around 30 videos that they had found. When I checked Pornhub, I believe it currently had over 20,000 videos, and that was presumably after they'd been under quite a bit of scrutiny. IMO there is quite a mismatch in magnitude there.
Of course, there probably were other illicit videos, but there is no reason, in my opinion, to suggest that Pornhub had an unusually large problem. Unfortunately though, a lot of the videos like this that wind up undetected likely have been spreading through the Internet for several years going unnoticed simply because it doesn't look particularly different from any other pornography. As it turns out, at least certainly late teens look a lot like young adults.
This does create an unfortunate conundrum for anyone allowing user generated content that is pornographic. Even ignoring explicit abuse, teens are relentlessly horny and will upload inappropriate things to the Internet, or even try to sell it. Seriously short-sighted behavior, but you know... they're teenagers. We've all been there. It's not some alien condition.
I understand that people have extremely strong emotions about this and want a zero-tolerance stance, but it's not possible. If you allow adult content, you inevitably get some ideally-infinitesimal trickle of illicit content, probably often strictly by accident. Best you can do is try to find it and clean it up as effectively as possible.
I fully understand why it's treated like toxic waste, and I'm not trying to justify it, but no matter how despicable the crime is, you can't fully eliminate crime, it doesn't work that way. I think keeping "legitimate" pornography sites like Pornhub was actually likely slowing the amount of said toxic waste because Pornhub actually did moderate, clearly, whereas the back alleys that people are likely to fall back to are going to simply be less well-moderated by their nature. At the end of the day, most social media platforms proliferate a lot more CSAM than Pornhub has even if you estimate very generously.
In the Omegle shutdown letter, the founder notes that Omegle's content moderation resulted in some criminals going to prison. Pornhub's moderation has undoubtedly done the same.
> , but there is no reason, in my opinion, to suggest that Pornhub had an unusually large problem.
How many videos or images of child exploitation are required before it becomes an "unusually large problem" ?
Again, as someone who worked in the industry, I can't even begin to tell you how fucking paranoid and diligent we were about that. One single instance would have been enough to shut us down and possibly land us in jail. Not to mention the ethics of it which are paramount! This was to the extent where I was never even comfortable with the concept of user-provided / generated content being hosted and distributed on/by my web servers at all.
PornHub played with fire. They didn't just burn themselves, they burned all of us.
It would have only taken ONE instance! Two becomes "numerous" by definition. But one would have been enough.
I actually can't believe that you're trying to downplay the severity of what was at stake. I'm not typically one to be all "think of the children", but this is that one case where it really is literally that and most people don't find the level of diligence that I'm describing as being at all unreasonable.
I mean you're basically saying "they only murdered like 3 people ... and were pretty good about making sure they didn't murder more... hardly 'numerous.'" And if you don't think that child sexual exploitation is on a similar level in terms of severity of the crime then I don't want to know you.
> I mean you're basically saying "they only murdered like 3 people ... and were pretty good about making sure they didn't murder more... hardly 'numerous.'" And if you don't think that child sexual exploitation is on a similar level in terms of severity of the crime then I don't want to know you.
This is absolutely insane logic. Pornhub didn't commit the crime. Did you know murder happens every day? A lot more than three times.
Perfect moderation is impossible. You're saying that they would have to have a success rate of 99.99+% at catching this, when again, it can be nearly impossible to actually tell just by looking.
What exactly do you expect them to have done? What exactly do you think Twitter does?
Are you really suggesting that because this stuff exists and is impossible to prevent with 100% success, no website should ever allow user generated pornographic content without having some rigorous and highly invasive process for validating each video's provenance? (Not that it matters: doing this kind of thing will just make backchannels the defacto channels. Not a good outcome for improving enforcement overall.)
(Come to think of it, if this is the actual logic of someone who worked in the adult entertainment industry, then I no longer have any difficulty understanding how dystopian chat/encryption/social media legislation manages to continue to be proposed and sometimes even become law.)