What we have been doing would have worked if the majority would have followed.
Chose open standards, use and contribute to FOSS, avoid social networks, get involved in your local community, etc.
No need to go to extreems or complicated plans, corporations follow the customers.
But nobody did listen. Quite the opposite. I never had a facebook account, and now today people are boasting when they leave FB. But 10 years ago ? Oh we were the paranoid extremists .
Even today my friends regularly pressure me to get whatsapp.
I suspect there are several PR firms active on HN. Some topics were suddenly very popular out of nowhere and criticising it was getting you a wall of downvote. Then it stopped.
More than any other tech company, negative things about Apple will get you quickly down voted into oblivion. Hard to know if its just rabid fanboys, or PR firms. Unfortunately, HN isn't interested in naming and shaming companies caught astroturfing and they don't like us to speculate. Its too bad because I would consider that information a huge kindness to humanity.
As someone who used to work in a reputation management firm, this is considered industry practice regarding public engagement.
Chances are keywords of interest are monitored on common social media, after applying sentiment analysis, an analyst specialising in Public engagement is assigned to engage with the public in order to shape the narrative.
If you or anyone else think you see this happening on HN, please send links to [email protected], as the site guidelines ask. If we find actual evidence of it we'll crack down hard. What we don't allow is idle speculation about it in comments, because experience has shown that that's nearly always just fantasy.
I’ll respect your “opinions” as a worker, but seriously dang. One year from now on you will be banning the very people i am complaining about now. My apologies, and have a good one.
"Please don't post insinuations about astroturfing, shilling, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email [email protected] and we'll look at the data."
I've personally spent countless hours over many years poring over the data on this and I can tell you that the overwhelming majority of HN comments like yours are based on nothing more than imagination. It's extremely easy to imagine that you're seeing things and make up stories around what you think you're seeing. These stories almost never amount to anything. Even to say "almost never" is misleading—it's vanishingly rare. (Unless you count hapless voting rings from clueless startups. Those are common but they're naive abuses and not what people mean when they go on about sinister astroturfing.)
This comment was based not on imagination but an article on BBC: https://www.bbc.com/news/world-asia-china-58062630
which reports on "A sprawling network of more than 350 fake social media profiles..: HN is social media right so I don't think it's very far-fetched they would try to spread their messages also here. Here? It couldn't happen here, I hear you say.
> This comment was based not on imagination but an article on BBC
Assuming that a BBC article is describing HN is already imagination. If you think it applies to HN, I want to see specific links. Tip: look at the account histories first. Mostly it takes just a few seconds to see that $suspected-spy has been posting to HN for years about everything from Hyperloop to Rust to PyPy. I think the odds that such a user was planted as a Chinese agent in 2015 or whatever are similar to Russell's teacup orbiting the moon.
> It couldn't happen here, I hear you say
No, I'm saying that when commenters have posted such insinuations here, close study of the data has consistently shown them to be nothing more than cheap internet pontification, a.k.a. bullshit. The more flamboyant and grandiose the claims, the more fantasy-driven they prove to be. People come up with this stuff purely because they want to believe it, and will literally read anything into anything.
The problem is that such insinuations are not cost-free. They add noise, poison community, and in several cases have turned into mobs that have hounded people off HN. Hence the rule that you can't do it unless you have actual evidence. If anyone comes up with actual evidence—literally any whatsoever—we'll take it seriously and look closely into it. But someone else having an opposing view on $hot-topic doesn't count as evidence.
I know I'm sounding "flamboyant and grandiose" myself, which is not optimal, but it would take a robot not to lose patience after looking at as much of this data that I have. The truth, as far as I've been able to determine it after tons of effort, is that you guys really don't know what you're talking about. Sorry for being blunt. Here's a longer explanation from when I was in a better mood: https://news.ycombinator.com/item?id=27398725.
Most softwares are monoliths in 2021. The exceptions are over hyped, because the day to day lives of administration and corporate devs are boringly standard.
Databases have no "host" they have "clients" which are heterogenous. So directing this critique at SQL is completely unfounded.
.NET added LINQ and now basic queries are integrated. It was not up to SQL, it was up to .NET
And calling it "very low-level" makes me question if you understand what SQL does and is. It's probably the only mainstream 4th generation language I can think of.
Host language, as in the language of your app that embeds some sql code, not host related to the db. The host language may or may not be the client language.
It's low level because it lacks abstraction and anything outside the data query declarative paradigm is subpar. It has no notion of anything outside of itself, so it's a very restrictive inflexible dsl living in it's own bubble. And even worst, it lacks elegant abstractions for problems we've have had for decades, such as pagination, hierarchy, etc
Also, using linq as an example rather shows your lack of understanding of the field of abstractions for sql. The state of the art ORM is currently SQLA, the leading innovation to replace sql as a dsl is edgeql, both are addressing sql pain points while aiming at allowing you to do all of what sql could do.
I think you use "low level" in a different sense than is common. Low level (and high level) typically refer to abstraction level. SQL certainly have a very high abstraction level. But given it is a domain specific language it doesn't have much support for functionality outside of its intended domain (except through non-standard extensions). But a kitchen-sink language is not automatically higher level than a highly focused DSL - typically it is the other way around.
Higher level than C, sure. But compared to modern programming language, it lacks primitives, important abstractions, asks you to do many things manually and have way to many gotchas to be on par of what we consider high level in 2021.
No, ORM provides an inspectable central entry point for your models with a standardized API. That's the feature.
That's why you get a great django ecosystem: the ORM abstractions allow all libs to rely on the fact the rest of the code access the model the same way.
The issue is that if you try to squeeze a relational model into object oriented model you won't get an efficient solution.
Solutions like django might be good when you're starting the project or it is something very simple, otherwise you'll have to fight with it to get something done more efficiently.
My point is that using plain SQL (I personally prefer asyncpg as it provides interface matching postgresql) is actually also easy. Especially if you have IDE that supports it.
I also realized that with this approach I rarely need to even transform the data in any way. Usually whatever I want to do I can get in a single SQL statement (even for things that have some hierarchy, thanks to aggregation functionality). So in the end the function just gets data and displays it.
Sure if you don't need to build an ecosystem, don't need introspection and can forgo integration, sql is indeed easy.
Also, SQLA proves that an ORM doesn't have to prevent you from getting an efficient solution, you just have to offer several layers of granularity.
Eventually, it's not an or proposition. In django you do use raw sql when you need so. but your auth system doesn't, and a plugin will solve it for you.
Generators are one of the concepts that devs from other languages under use in Python. It's a natural solution to a ton of problems, since it lazily evaluates, and only stores one result out of the entire sequence at a time, and its interface is compatible with the iterator protocol. It's a mini state machine with it's own little memory world as well.
If you are used to call backs, promises, tick() calls or closures, it will be natural to reach for them a lot, and be disappointed at their state in the Python ecosystem.
But while I do miss better anonymous functions support sometimes in Python, it is rarely a problem because it comes with other tools to arrive to the same result.
Generators are one of them. Of course, you'll have to realize that generators are way more that a lazy way of generating data. You can use them for control flow, hold state, hide complexity or delegate behavior using a common interface. The send() method is very often completely ignored by most devs, and the yield from underused.
But beyond generators are a lot more things that, in the same vein, will bring you to python enlightenment once you start thinking with them instead of trying to make a Python fits into a square hole:
- the functools module
- the itertools module
- context managers
- any/all/zip/iter/next/enumerate
- decorators (it can do so much more than you imagine)
- type hints (take a look at fast api for awesomeness)
>> If you are used to call backs, promises, tick() calls or closures, it will be natural to reach for them a lot, and be disappointed at their state in the Python ecosystem.
It's a real disappointment that Python has no answer for JavaScript fat arrow.
The fat arrow is the one construct that completely changes the structure of all the programs I write - it makes things extremely terse and I use it in nearly every function/method in some way.
I'm a big fan of Python's whitespace structure but it seems to be an obstacle to creating single line functions that are both powerful and get multiple things done, which sometimes makes a program easier to read and more understandable. Sure there's lambda functions but I find them clumsy and hard to work with compared to the beauty of the fat arrow.
The rare case where you do need a fat arrow, it is indeed elegant once misses from Python.
But I also know by experience that people from other languages are reaching for anonymous functions way too often instead of using the tools that are suitable for the use case in python.
E.G: if you use a lot of map() and filter() in python, you are doing it wrong.
> If you are used to call backs, promises, tick() calls or closures, it will be natural to reach for them a lot, and be disappointed at their state in the Python ecosystem.
Maybe - but at the same time, generators are side-effectful and quite general. That means, when someone uses a generator, now I have to understand what happens by looking at the code. If someone uses a promise or a closure/lambda, then the scope of what can happen is much more limited.
It's like looping vs. mapping. You can use "for ... in ..." syntax or you can do "map(..., ...)" but I generally prefer the latter (minus the syntax overhead in python), simply because I easily see at a glance what the intend is.
Generators are such a game-changer for clean separation of data traversal from data processing. It's my favorite trick in python and I miss it dearly in other languages.
In languages without generators it's easy to write code that traverses some data structure in hard-coded way and does something configurable on every node, but it's hard to write code that traverses a data structure in configurable way and does some hardcoded thing on every element.
In Python it's trivial both ways and even both at once.
> it's hard to write code that traverses a data structure in configurable way and does some hardcoded thing on every element
Wouldn’t this just be a function that operates on an iterator? I suppose generators make the creation of lazy iterators easier, but generally the solution for languages without generators is to have your traversal build a list. So you lose the laziness but the code remains simple. Then map your per-node processing to the list.
> generally the solution for languages without generators is to have your traversal build a list
Yes, but then you move from O(1) to O(n) in memory usage. And if you want to optimize it you have to restructure your code, when in python lists and generators are drop-in replacements.
The C++20 coroutines has the potential of being this and much more. As with many things C++, its adoption will be very slow (they are supported by latest compiler versions, but there is no support in the standard libraries yet).
This list really sort of stretches the imagination on what language level generator support looks like.
Certainly in Java you can use the `Iterator` interface to get generator like behavior. But that's both a whole lot more complex and more verbose. Primarily because you have to coordinate the `hasNext` method with the `next` method.
With python and yield syntax, that naturally falls out without a bunch of extra code juggling.
Sure, some of those (C, Java, C++ templates) are pretty weak, but C#, Ruby, ES6, and lots of the other language or library implementations are not. Its far from a unique Python feature.
It’s also trivial and easy in Haskell — you just need an instance of `Foldable` or `Traversable` on your collection, and then you can fold or traverse it in a configurable way. Or for recursive structures, use https://hackage.haskell.org/package/recursion-schemes. Or even just pass a traversal function as an argument for maximum flexibility.
How absent is generator support in languages in general? As far as I know, even PHP has had yield for something like a decade, and JS for longer (at least as far back as 2006, when Yield Prolog got discussed on LTU[0]). Or is there something about the Python approach to generators that's distinctive?
The Ecmascript 4 proposal included the `yield` keyword, but the proposal as a whole was abandoned in 2008. That’s why the version names jump from ES3 to ES5. Some of the features then returned in later versions, including generators with ES6 in 2015.
def print_every_file_in(root_path):
for path in children(root_path):
if is_file(path):
print("file: " + path + ", size:" + get_size(path))
else:
print_every_file_in(root_path)
If you want to extract the printing part it's trivial in any language:
def print_file(path):
print("file: " + path + ", size:" + get_size(path))
def print_every_file_in(root_path):
for path in children(root_path):
if is_file(path):
print_file(path)
else:
print_every_file_in(path)
And you can easily parametrize what function to call on each node.
But in Python it's equally trivial to extract the traversal:
def every_file_in_path(root_path):
for path in children(root_path):
if is_file(path):
yield path
else:
yield from every_file_in_path(path)
def print_every_file_in(root_path):
for file in every_file_in_path(root_path):
print("file: " + path + ", size:" + get_size(path))
or even extract both:
def print_every_file_in(root_path):
for file in every_file_in_path(root_path):
print_file(file)
which for me is a very clean way to implement this and it's nontrivial to do in languages without generators.
A big problem with many of these features is that they almost always end up getting used in ways that makes the code more convoluted when there are simpler alternatives.
needing to store state - use a class
needing lazy evalutaion - use a class (though this is a common enough use case to be a primitive, e.g. Kotlin)
decorators - if you pass decorated methods around -> now you have to remember the context the methods hold. Instead, refactor your code to be more direct so that you don't need decorators.
type hints - they are not fully enforceable at compile time, unless everything in your codebase has type hints. This is never the case and type hints can easily lull you into a false sense of security.
functools module - generally I'm ok with this but sonetimes you have to be aware of when you need to deep copy vs when you don't etc.
Emacs Lisp* has a system called "advice" that's maybe a bit clumsier than Python's, but is also more powerful. The relationship between decorator and decorated [is configurable][0]. For example, the decorated function could be called conditionally on the result of applying the decorator to the arguments, something like:
def _combined(args):
return decorator(args) and original(args)
It can also be applied retroactively, not just at the decorated function's definition. This is extremely handy in the context of configuring your text editor, but I admit I wouldn't like it in a program I was working on with other people. (Basically a form of monkeypatching.)
* Granted not really used for general-purpose programming like Python.
Emacs Lisp has macros which are a lot more elegant (not to mention powerful) than Python decorators which comparatively, are nothing more than a kludge.
Depends on what you mean. I often hear claims that you can use decorators in language X, which are formally true, since decorator is just a function accepting and returning another function, so any language that has anonymous functions (which is a lot of languages by now) "has decorators". But for me this is kind of false marketing, because there's nothing impressive about that, and the killer feature of Python's decorators is the syntactic sugar, which makes them so easy to use. And in this sense not so many languages "have decorators". You can do something similar with annotations in PHP, but I've never actually done this in a real project, because that feels like abusing the language.
Decorators are still a pending proposal in ECMAScript, so they would only be available to transpilers. That makes them non-standard until the proposal is approved, where the implementation could change.
One thing that really annoys me about PySpark is Python's lack of tuple unpacking in lambdas. It turns what should be relatively readable pipelines of transformations into an unreadable mess.
The COVID crisis is as much a trust crisis than a health crisis. The internet made the people deeply aware of how little the people in power actually cares about the average citizen or customer, and now that we really, really need the mass to have confidence in the institutions, it's getting hard to play the "for real, we are good this times guys" card.
> The COVID crisis is as much a trust crisis than a health crisis
Noam Chomsky pointed that out as early as a year ago [0], but most people who really should hear it just don't want to it seems, content with shaking their heads and othering.
I don't know, and I weight the odds and wage a bet given the various sources of information I have and my knowledge of human nature.
Unlike most of my vaccine enthusiast friends, I don't blame people that want to avoid it, I get the sentiment.
I'm not thrilled at the idea of getting the shot despite being a strong vaccine proponent, but I have made the appointment. Maybe it will turn out to be the wrong decision, however I took it with the best of my knowledge and abilities. And that's all what we can do.
>I took it with the best of my knowledge and abilities.
You would be really surprised at how much of one's knowledge sits on assumptions and believes that are not well founded. It is like how grownups are sometimes stumped by the questions of a curious kid, which make it clear that somethings they thought they knew, wasn't so.
This was my experience, and like most people, I used to trust authorities and scientists, and "studies". This is the position where we all start, and diverge from it as we become more aware about the politics involved and how the incentives are aligned, how powerful media, how research is funded and can be flawed, how peer review "appear to work" when in-fact it does not in practice etc, all of which are further confirmed by historical observations.
when you live through enough you know that nothing in life is 100% other than death and taxes. it's all probabilities. If you want to think the government is injecting nanites then go ahead. Fed government has a decent history the past 40 years or so. I trust them more than I do most people other than my close friends and family. I've seen people die from covid, it's not a hoax and I don't believe the vaccine is either.
Most people hesitating to vaccinate don't believe it's a hoax, but rather believe that if something goes wrong by accident, which in an accelerated procedure on a complex system in the middle of a crisis is not unheard of, the people in charge won't disclose what we need to know, take responsabilities or the make the right decisions.
Despite going to get vaccinated, I don't think it's an unfair line of reasoning.
Worth reading about the forced sterilization of refugees with HIV at Guantánamo Bay in 1991 as well:
> The blood of these refugees had tested
positive for HIV, and Camp Bulkeley, where they were detained, was set up as what Michael Ratner calls “the world’s first and only detention camp for refugees with HIV.” Subsequently, the women in that facility who were found to be HIV positive were subjected to forced permanent or semipermanent sterilization.
I would never buy something else than a laser printer again.
The alternatives are unreliable junks with gold priced cartridges that will dry on you at the sightless neglect. The machine will find a way to end up breaking, jamming or printing garbage at some point anyway, after what you end up buying the new one in a moment of panic, which again lasts barely the honeymoon period.
But then, one day I decided to suck up the buying price, and went laser. My brother too. Since then, every page prints, fast, clear, like the first one. No jam, no breaking, just printing. And so many pages, like the cartridge could never end.
One day though it did, so I prepared to bleed to death again, except it was $10 on amazon.
I wish I could take a time machine and sing to my young self the gospel of laser printers.
* From CMD+P to page rolling out of the printer is less than 5 seconds
* It prints on anything you can imagine and scans from anything too. Duplex, envelopes, photo paper, weird formats etc.
* No jams. No confusing setup. No dingy and confusing on screen menu but a good small touch screen.
* It takes 4 separate CMYK cartridges so you can replace a color at a time. 3000 BW prints for €30 (€0,01 per page). Color cartridges good for 2000 pages go for €20.
Concluding, laser printers have obvious benefits for certain printing use cases. No discussion here. But please do not conflate the butchering and crappyfication of inkjet printing by HP and Canon with inkjet being slow/annoying/expensive/useless in general.
> I would never buy something else than a laser printer again.
I rarely print anything, but when I do it's things like the entire GDPR. Fully agreed!
No more switching it on after a year wondering if the heads will be able to clean themselves or if they're just completely caked in dry ink and a write-off. Just fire it up, print.
Of course the initial setup was a pain in the arse, it is still a printer after all, but as printers go it's been the least painful printer I've ever had (for ref its a Brother HL-1210W I've got)
Could mean you don't want to spend the money for me.