Hacker Newsnew | past | comments | ask | show | jobs | submit | thewickedaxe's commentslogin

Rsync's name might be a little misleading. It doesn't attempt to sync the directories unless you ask it to, aka just copy. However I remember studies from a while ago showing that rsync actually performs worse than cp/scp under certain circumstances. May that's something you can try to address


> Rsync's name might be a little misleading. It doesn't attempt to sync the directories unless you ask it to, aka just copy.

rsync will "just copy" if you point it at an empty destination. Otherwise it will try to sync.

  rsync source/ dest/
rsync has options to preserve ownership, modification date/time, etc. similar to cp's -a (archive) mode. Most important to me and I think a lot of rsync users: it can restart failed transfers. That's more important when transferring over a network but it works on local copies too.

> However I remember studies from a while ago showing that rsync actually performs worse than cp/scp under certain circumstances.

Maybe you're thinking of these threads:

https://serverfault.com/questions/43014/copying-a-large-dire...

https://stackoverflow.com/questions/6339287/copy-or-rsync-co...

Not really seeeing significant performance difference but maybe you can find data. In the case of maintaining a copy of a directory of files that gets added to and changed that's an exact description of what rsync does, and it has years of optimizations for exactly that.

scp, on the other hand, is both slower than rsync for non-trivial cases (more than a few files), and less secure. "The scp protocol is outdated, inflexible and not readily fixed. We recommend the use of more modern protocols like sftp and rsync for file transfer instead." (from OpenSSH 8.0 release notes, 2019-04-17). scp was informally deprecated in favor of rsync a long time ago.


For what it's worth, as of OpenSSH 9.0 the scp command actually just became a client for sftp commands: https://www.openssh.com/txt/release-9.0


His actual name is Prakash a thielvedi. He anglicized it to not get his name butchered on zoom calls.


I'm a little confused. Inheritance, types and all that stuff are just language concepts right? Simula may have been one of the first to implement inheritance as a means to an end, but how could they have "invented" inheritance? I'm sure the idea of inheritance was already there in language proofs.

[I might be really really wrong here]


Theory usually comes after practice. People create something that works, then theorists formalizes it into a well defined concept.


I hold the view that programming patterns were invented as solutions to technical problems. It was then later that some theoretical "usefulness" or "elegance" was attached to them.

One should know the technical benefits and drawbacks of programming patterns before applying them. Just because some language or environment or majority of programmers promotes it, doesn't mean that its ok to apply it. Without knowing the technical reason for applying a pattern is just cargo cult programming.


I hold the view that programming patterns were invented as solutions to technical problems. It was then later that some theoretical "usefulness" or "elegance" was attached to them.

IIRC, there was impetus from Christopher Alexander's architectural "pattern language", and the desire to do something similar in software, which was a bit of an unguided mess at the time.


Simula 67 is (surprise) from 1967, Smalltalk-76 from 1976. Both supported objects and inheritance (http://progopedia.com/language/simula-67/, http://worrydream.com/refs/Ingalls%20-%20The%20Smalltalk-76%...)

“A pattern language” is from 1977; its application to programming from 1987 (http://c2.com/doc/oopsla87.html)

So, in the context of “Simula may have been one of the first to implement inheritance as a means to an end, but how could they have "invented" inheritance?”, I think this discussion is diverging a bit.

I would guess the idea of inheritance was already used in some assembly programs. It would start with people using structures that shared initial fields, and passing them to functions that didn’t care about the other fields (functions handling intrusive linked lists, for example). Passing a pointer to a function that _does_ know the exact type of the fields would be the next step.

The next step would be to allow heterogenous collections and use logic to discern between the various variants (many lisps do that by going through an “is it an atom?, is it a number? etc. chain, and likely did that years before Simula 67 appeared)

Chances are somebody also embedded a function pointer or two inside such objects, but I guess that would have come fairly late, as a function pointer in each object would have been expensive, memory-wise in the ‘60s and ‘70s.

Anyway, I think ‘inheritance’ indeed was invented/discovered, but gradually, and without explicitly naming it.


> which was a bit of an unguided mess at the time

Oh, come on. There was https://en.wikipedia.org/wiki/Structured_program_theorem and https://en.wikipedia.org/wiki/Modular_programming. There was a discussion about functional programming, for example famous John Backus article - https://dl.acm.org/doi/pdf/10.1145/359576.359579.


I was really thinking lower-level, specifically OOP, though yes I should've said it. OOP was going to save the world but no one knew how to design properly with it. GoF patterns were a set of off-the-shelf tactical designs intended to get you started in the right direction.


The other day I got into a heated debate with a C# developer on the merits (or lack thereof) of adding an "I" prefix to interfaces.

Turns out in C# there's no syntactic difference between implementing an interface and inheritance, so it makes sense in C# to explicitly state that something is an interface but, arguably, only there.


The argument against “I” is that the user (client code) of an instance shouldn’t have too care whether the type of the reference is an interface or a class. Concerns of the implementor shouldn’t determine the naming visible to the client code.

Of course, it’s an established C# convention (and inspired by the naming convention for COM interfaces) so one better sticks with it, but I think the convention was a bad choice for the reason stated above.


Yeah, IMV its a similar problem to the convention of prefixing DB objects with T (table) or V (view), but not as bad because refactoring between class and interface should be rare.


100% agreed. My day job is in front-end development and we unfortunately had this convention in a few projects.

Problem is, sometimes the are changes in how types are composed and what used to be an interface can end up as a type alias and vice versa.


Many language features followed that route, yes. Languages themselves are typically first introduced, and then (maybe) formalized. Meanwhile, some other "patterns" or features, like higher-order functions or recursion, were originally introduced in the context of theoretical CS (e.g. they can be described in the lambda calculus), and it took some effort to implement them in practice.


> It was then later that some theoretical "usefulness" or "elegance" was attached

This Chicken v Egg pondering is interesting. I mean, surely the term "inheritance" was used in this instance because it already resembled something that had been established in theory?


Just like some artists create art? First they do then they explain.


idea > practice > formalization or idea > formalization > practice


I share your confusion to a degree. To me it always seemed that the concept emerged from the work on Semantic Networks [0] by Collins and Quinlan.

What's interesting is, looking at this now that these two different aspects of what we nowadays consider to be a fairly well defined computer science concept both seem to have emerged around the same time.

Could it be C & Q were inspired by the Simula guys, or vice versa maybe Simula adopted the term because the implementation "resembled" the semantic definition. Or perhaps they independently emerged from concepts that were popular at the time!

[0] https://en.wikipedia.org/wiki/Semantic_network


I would put OOP's solid theoretical foundations at the Liskov Substitution Principle invented in ~1988. This seems relatively late compared to OO's popularity. It was less than ~10 years between "structured programming" and the structured programming theorem (and lots of useful formal steps on the way), vs. 20+ for OOP and LSP (and at least at today's distance, LSP along with Meyer's contemporary substitution principles seems more like a sea change).


This law is way way way overdue. American Corporations are killing Mexico's youth with junk food. I know kids who exclusively drink soda. Healthy, beautiful kids who deserve to go out and play and live their best lives.


I know it's in vogue to blame everything on America, but Mexico has a thriving domestic junk food industry too. And frankly, many of their snacks are much better than anything America makes (Takis in particular, I think I'm addicted to them...)

Anyway I support this law. Banning junk food/drinks for kids is long overdue. It's little different from banning the sale of cigarettes to kids.


Yes, Bimbo is a fully Mexican company and makes products like gansitos, negritos (now just "nitos"), barritas, Duvalin etc. that Mexicans love. That's not even getting into other sweets that Mexicans love like pan dulce, paletas, bolis and so on.

Frankly to blame America is to take agency away from Mexican people and reeks of paternalism and ethnocentricity.


I don't think most people blame USA, it's just "progress". Yesterday at the supermarket I noticed the disproportionate ratio between healthy food (and I count there red meat) and junk food (snacks, sweets,...)


Low- or zero-prep junk food is also incredibly cheap. When I see comparisons done it's usually ingredient costs of healthy food to full-price junk food costs, but that's not how poor people shop for junk food. They go to Taco Bell when the tacos are like 60¢ each or less, through promotions or coupons. They buy Totino's frozen pizzas eight at a time, on sale at half-off. They buy giant bags of store brand sugary cereal and pairs of 3L bottles of store-brand soda, again, on sale. Costco pizzas (they are so cheap on a calories-per-dollar basis, for zero-prep hot food) and bakery items for the enterprising slightly-less-poor who can scrape together the annual fee. Whichever chips or snack crackers are on sale. Off-brand pop tarts—holy crap those are calorie bombs and very cheap and you wouldn't believe how many kids have a couple of those for breakfast most every day. And so on.

Even relatively-healthy-but-not-really-healthy frozen meals can't compete with the outright crap. It's so very cheap.


I think it's pretty easy to tie that "progress" back to American interference in local economies - I can't really speak to how much that is attributed, but blaming America certainly isn't a stretch.


Fuego con limon , spicy chips with a hint of lemon are by far my favorite chip I discovered in Mexico. It took me a few months to find them when I came back state side. I wasn't able to find the standard chip, only oven baked when I got back to the USA. Although I'm sure the oven baked are healthier, it definitely came at the expense of flavor and enjoyment


You can't blame this on Americans. Walk into any tiendita in rural Mexico and you will find isles of candy and sugary beverages, much of which Americans wouldn't recognize. Mexico loves sweets.

I'm glad they're recognizing that dietary health is a serious issue and trying to make changes. But I wonder what effect this will have on paleterias? They're one of the many things I miss from Mexico.


We certainly can. There's a huge amount of influence america has on global eating habits. Coca-Cola, Frito-Lay, and McDonald's are some of the major corporate villains, in case you forgot, and they deserve their reputations.


Mexico has Jarritos, Sabritos, Barcel, and lots of other local brands that are much more prevalent than their American counterparts. If Coca-Cola, Frito-Lay, and McDonalds all vanished suddenly, it would not significantly change the diet of most Mexicanos. You might be able to formulate a coherent hippie rant about "corporate food" but it isn't a specifically American phenomenon.


It's unclear whether all of those soft-drinks would be as successful as they are if Coca-Cola didn't open up that market though.


"Open up the market"?? Maybe you're thinking of Cortez?

You obviously aren't that familiar with the subject since Jarritos is the only soft drink in that list (the others are snack brands). I feel there's an undercurrent of paternalistic racism in this thread - "those noble naive Mexicans would be so healthy if they only hadn't been enslaved to imperialist American fast food corporations!"

Mexico is a whole country full of educated, modern, free-thinking individuals with their own strong, vibrant culture. They're incredibly proud of it. They have their own tastes and their own products serving those tastes and yes, they struggle with dietary health just like everyone else in the world. Walk up to a native Mexican sometime and tell them that they only like pan dulce because Americans have brainwashed them, see how well that goes over.


I'm not totally sure - if you go out to rural, poorer Mexico, away from the corporate chains and packaged snackfoods, the traditional Mexican diet isn't especially healthy. Lots of lard, simple carbs, etc.


Since when? And what happened?


Then stop eating it. Whatever happened to personal responsibility? If I can say no to sweets anyone can.


> I know kids who exclusively drink soda.

Their parents probably do too.

Also worth noting, there are places in Mexico where it's easier and cheaper to get a bottle of Coca-Cola than one of potable water. [1]

[1] https://www.nytimes.com/2018/07/14/world/americas/mexico-coc...


Not just a Mexico problem. There are many towns in California where I wouldn't even consider asking for a cup of water at a restaurant.


Its not just American Corporations. The US, Canada and EU and Switzerland were all opposed to this law because it impacted they big food industry.

https://www.reuters.com/article/us-mexico-health/mexicos-new...


Most kinds of soda are available in sugar-free form, so drinking soda shouldn't be the problem.


Aspartame is pretty terrible for you, so sugar-free alternatives that use artificial sweeteners (instead of just naturally savory flavorful options) aren't great either.


That's a highly controversial statement.


[flagged]


Some quick googling says 35k murders in 2019 for a population of about 9M. So, in mexico city, over 99.5% of the population follows the law that says you can't murder people. Not sure what your point is.


That's for the whole of Mexico, so more than an order of magnitude off (120 million). Still an insane number of murders, what a tragedy.


That's 30 per 100,000, which is less than several U.S. cities: https://en.wikipedia.org/wiki/List_of_cities_by_murder_rate Though, there are alot of Mexican cities on that list. And the only countries of comparable size that have a higher murder rate are Venezuela (30m) and South Africa (60m): https://en.wikipedia.org/wiki/List_of_countries_by_intention... (Interestingly, arguably it's Central America and the Caribbean that stand out for their high murder rates, not any specific country in the region, which suggests a more complex phenomenon than straight US-funded cartel violence.)


Ah good catch. Thanks. So we're looking at >99.9% of the population not committing murders.


Doesn't that stat just mean that >99.9% of population has not been murdered. It says nothing to the number of people doing the murdering. It could be a single individual on a massive serial spree, or an individual murder per killing which I find just as unlikely. The point is, your stat isn't stating what you think it is


The calculation above is putting an upper limit on the number of murderers (probably, that's discounting groups of participants in murders, but I'm fine with that as serial murderers are far more common than murder groups)


35k murders is a lot of fucking murders.


Yes, but to put it in context, heart disease and diabetes cause a lot more deaths [1] and obesity has been shown to increase the risk of those conditions.

[1] https://www.statista.com/statistics/960030/mexico-causes-dea....


I believe you are committing the logical fallacy of "Whataboutery" [1] here.

[1]: https://en.wikipedia.org/wiki/Whataboutism


Where are the parents?


Caving to marketing designed to make children nag their parents.


When I was a kid my parents only let me watch PBS. No saturday morning cartoons -> no sugary cereal commercials -> no desire/nagging for sugary cereal.

Install adblockers on any computer your kids use. Cancel your cable television subscription. Deny these corporations the opportunity to pump their propaganda into your kids.


Saying 'no' and limiting your child's access to TV, etc., that's parenting, indeed.

But again it's easier to give up and let them watch TV than having to actually deal them.


I still remember the hate I felt when I watched my sister turn from a really calm child to a screaming brat because of Hannah Montana. I don't watch the TV, now around 12 years.


It's a parenting issue then, because saying 'no' to a nagging child is basic parenting, always has been.


Parenting issue or not we protect children with laws all the time. Think no further than alcohol and tobacco products whose sale to minors is banned. Sure we could say "where are the parents" but that's not how reality works and good solutions are the one that work in reality not on paper.

Without legal push to make everyone work in unison there will always be an entity (a corporation) willing to invest enough to push the right buttons and coax people into the most unhealthy habits. After all the profits will belong to that company while the expense is paid by society. The overwhelming majority of individuals are completely unqualified to see through the onslaught of marketing (especially the covert kind), the social pressure, or even to understand the risks they're taking.


You're ignoring the point. The issue is one of culture (and parenting when it comes to children), in Mexico and in all other countries.

Corporations are an easy scapegoat that also fits a political ideology on the left.

It's also a complete fallacy to claim that people cannot see through things. People are not stupid they know that it is their diet that makes them fat. People deserve at least this credit and respect.

Alcohol and cigarettes sales to children are obviously completely different and a very poor analogy.

So... Following the logic, either we accept that people are free to make their own decisions, that parents are responsible for their children, or we take children away from parents because the state knows best.

Personally I think we should do the maximum we can to teach good diets at schools, and perhaps provide classes for adults, and to label products then people can do whatever they want but live with the consequences.

But I think the likely outcome (as we start to see in some countries), which must be politically acceptable and cheap, will be similar to the path taken for cigarettes: PR campaigns and tax. This is a way to let people do what they want while nudging them, and to let them pay for the consequences (healthcare where it is financed through tax).

When it comes to children parents won't be blamed (although they should be) because this is not good to win votes. It will be easier to continue blaming ads and corporations, and to ban things.


> Corporations are an easy scapegoat that also fits a political ideology on the left.

Calling things 'left', 'ideology', 'fallacy' and randomly saying things are 'completely different' aren't great arguments if you keep it at statements instead of an argument.

Marketing is _very_ effective. Further, people are paid for to ensure it is effective. Having rules to restrict that behaviour does go against some peoples idea of what a government should do. IMO that's exactly what the government should do, protect the people (among other things!).

> When it comes to children parents won't be blamed (although they should be) because this is not good to win votes.

You're making this a parent thing, and an either/or thing. It's much easier to do multiple things at the same time. Ensure parents are educated, ensure children cannot be marketed.


Well, I'm happy to hear your arguments, then...

It seems obvious to me that alcohol and cigarettes are not the same thing as telling people what to eat or feed their children. I'm happy to hear your take on this.

It also seems obvious to me that people in fine choose what to eat and drink. No-one ever put a gun to my head, for example. I absolutely agree that marketing influences choices, but only up to a point. Certainly the quantity is a personal choice. Giving Coke to your children for breakfast (I have seen it here in England) is a personal choice. A crap diet is a personal choice.

I also think that parents are responsible for their children. Marketing targeted at children is beside the point. Of course it will work, but again only up to a point: in fine it is the parents' decision to let anything go or to impose limits. I am a parent, I know but I'm also happy to hear your views on this.

And finally, it is also clear to me that blaming corporations (and behind them capitalism) for people's bad diets is a political stance because it fits the view that people are oppressed and victims of the system. But it's also the politically easy and low-risk thing to do because you don't scold people you want to convince to vote for you.

I agree that parents and children should be educated, that's even what I wrote in my previous comment. But let's also acknowledge people's responsibility in their life choices.

My take on the situation (at least here in England) is not that people don't know or that they are victims, it's simply that they couldn't care less.


> Corporations are an easy scapegoat

When they lobby (pay) to get more influence than you have as a voter then I'd say they they are nnot just "scapegoats" but actually guilty together with the politicians they bri... I mean lobbied with. And corporations get to profit from this while the society as a whole pays the price for the fallout.

> political ideology on the left

Why do some people always need to turn everything into a political ideology thing? Contrary to your belief it adds nothing to your argument, if anything it subtracts most of the little weight it had to begin with. Off the bat after a single line your comment holds about as much weight as a wet paper bag.

> are obviously completely different and a very poor analogy.

Is it? It's the state banning something considered unhealthy in one way or another. Why is drinking 100% sugary drinks totally acceptable but a glass of wine or beer, or a piece of pornographic material are illegal?

> So... Following the logic

Then by all means, follow the logic don't just replace it with your skewed one and pretend that it was somehow a natural progression of what I said.

> then people can do whatever they want but live with the consequences.

So... Following your logic governments shouldn't be allowed to ban anything. But people can still do anything they want. They will just have to live with the consequences exactly as you said. In this case the consequence is that if you sell this stuff to kids you get a fine.

Ban them, tax them, disincentivize people to buy them, claw back from the corporations the costs of having a society hooked on, disabled, or slowly killed by those very products. It just has to be a clear sign that the state and the society at large shouldn't bear the costs of supporting a person who has severely undermined their health from the age their brain and body are still developing. And it's also society protecting itself by protecting kids from parents' mistakes.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: