struct resource {
resource(ctx *c, ...) {index = c->store(...); ...;}
size_t index;
ctx *c;
~resource() {c->free(index);}
// copy constructor+op creates new handle
// move constructor+op copies the handle, maybe zeroes the current one
};
With this you can rely on RAII, smart pointers, upcoming lifetime checks and annotations, etc. The core idea is that you treat objects of classes like this as values and everything works out seamlessly. Even if they are 'pointers' in all but name. You can also overload the dereference operator for it to have pointer-like syntax, but that is discouraged.
When you have just once resource this might be overkill but for large projects with tangled webs of resources, this sort of setup really makes the code simpler and easier to design.
That's C++ for you, simple things look complex but once you get into big hairy projects things stay at the same level of complexity instead of becoming an unmanageable mess.
D almost supports RAII, and the compiler seems to do some automated copy to move conversion, but this is the sort of thing that really, really needs a large number of users and compiler implementers to iron out issues and corner cases. Nothing against D, the language is pretty neat!
But if I'm not mistaken, this is just handling index allocation, release and avoiding dangling manually. The programmer is still responsible, right? And I don't think Rust can do better for indices, since indices are normal, "eternal" values.
> this is just handling index allocation, release and avoiding dangling manually
No, it is abstracted away. You just have to follow best practices when writing a library.
resource foo(...); // This gets freed at the end of scope. See RAII.
auto x = make_unique<resource>(...); // can be moved, freed when owner is.
auto y = make_shared<resource>(...); // freed on zero reference count
Steal from the rest of society? Would you cop yourself on. Governments levy taxes and use that tax money to fund things that they think will benefit society. A la carte funding of the bits you think are worth funding is not a workable proposal. The Irish government funds lots of things I don't agree with but characterising that as theft is ludicrous.
I mean 20-50% on top of income tax. Putting your money where your mouth is. That percentage should not be too much for anyone truly passionate and willing to make some sacrifices.
I can't afford a painting. Noone in my neighbour can afford one. Together, we might, and we could put it on a wall in a communal building. Let's call it a museum.
Fast personal transportation is so high utility that people will dismiss many externalities. If you offered teleportation anywhere in the world except it would pick a random African and kill him at a 1E-6 to 1E-4 chance (depending on your skill at Tetris while being teleported), I suspect many in the West would do it without a question.
If you spent an hour watching traffic in Lagos, Nigeria, you'd see that West Africans themselves value the utility of personal transportation above the safety of their neighbors on the road.
And what indication do you have the opposite wouldn’t happen if the tech were available for them to use with the same caveats except the victim having to be from from somewhere outside of Africa?
The only time I ever hear something about vegans or crossfitters are from people complaining about them. Rarely to never do I hear something from them.
His father was killed (whilst riding a motorbike) by a drunk driver, so I think he has every right to want traffic laws to be upheld. The only people who don't like what he's doing are habitual law-breakers who don't like the idea that laws apply to them.
That caught my eye too. Is it illegal in the UK to look at your phone while stopped at a light? If so that's a very silly law, it hurts nobody to look down while the car isn't in motion.
There have been people injured and killed by drivers who believe that kind of claptrap. The problem is that drivers take time to adjust from staring at a screen to looking ahead at the road. I've seen some estimates that it takes between twenty and forty seconds for a drivers attention to context switch like that. What happens is that a driver barely looks up when the vehicle in front might start to move and they just carelessly think that they should move forwards as well, even though they haven't spotted a filtering cyclist or road-crossing pedestrian.
The law was brought in specifically to try to save lives - hardly a "silly" reason.
What percentage of drivers actually put their phone down when they start moving, would you say? Anybody will slowly normalize the behavior. It's just stopped traffic. It's a traffic jam, we're only moving 5mph. I'll put the phone down if we actually get going, etc.
It's illegal in most US states as well, though it appears to be rarely enforced. The worst outcome of being distracted while stopped is simply holding up traffic, so perhaps police feel it's petty to enforce it.
No, the worst outcome is much worse than that. You need to keep track of what is going on around, or you won't be able to account for you surroundings when you start moving again. I see these failures all the time: a driver of a stopped car is distracted, then realizes that the lights have turned green (or, even more commonly in these types of situations, a space has opened for them to merge into or pass through) and they "have" to get moving, now. Now they are in a hurry, and obviously can't afford to take a moment to take a careful stock of everything going on around them, so inevitably, they end up missing something. Usually someone else (such as myself, pushing a stroller) will be able to react in time and an accident is avoided, but it should not go like that. If you can't or aren't willing to attend to traffic, get out of it.
That's the thing - even if it is illegal, it isn't hurting anyone, and no doubt cops do it as well. He may as well go around filming people jaywalking on empty streets for all the good it's doing.
The problem is that distracted drivers do kill, main and injure other people.
"Jaywalking" was an invention by motor car manufacturers to try to victim blame pedestrians for careless driving incidents - luckily we don't have that in Britain.
Yes, 2 other people pointed that out almost a full day ago. Instead, you can replace jaywalking with some other mundane thing that technically might be illegal but which most people do and harms no one.
You're missing the very important distinction between illegal driving that can and does kill and injure other people, and "technically illegal" acts that do no harm.
Can you understand why the rule of law is used to prevent people causing harm to others?
I think it's nonsense to harass people for technically illegal things that are not harming anyone.
I think it would be fantastic if Mikey was passive in filming actual illegal acts that had potential for death or injury.
I don't approve of him inserting himself into situations to try and intervene because I think that just increased the potential for an accident or other undesirable outcome.
You keep implying that drivers distracting themselves with their phone whilst stopped in traffic are harmless, whereas it's very dangerous - that's precisely why the law was drafted to specifically make even just holding a phone whilst in control of a motor vehicle to be illegal.
Drivers are not able to quickly switch contexts between staring at a phone and looking around their vehicle and this "whatsapp-gap" is painfully obvious when cycling past slow/stopped traffic. It does lead to collisions with other road users - typically pedestrians and cyclists as drivers tend to only bother looking for other car-shaped vehicles and even more so when they're in the 30 second re-adjustment of their attention.
There is no "safe" use of a phone when driving - even using it in a cradle/hands-free which is legal in the UK, leads to a higher level of distraction and there would be a strong argument for making that illegal too, but we should focus more on enforcement of the existing traffic laws.
There's people like Mikey trying to make the world a bit better, and then there's people like you who make apologies for dangerous and illegal drivers. Maybe you should re-examine your attitude.
> You keep implying that drivers distracting themselves with their phone whilst stopped in traffic are harmless, whereas it's very dangerous - that's precisely why the law was drafted to specifically make even just holding a phone whilst in control of a motor vehicle to be illegal.
It's not dangerous at all. Checking a text message at a red light for significantly less duration than the red light is by definition harmless.
> There's people like Mikey trying to make the world a bit better, and then there's people like you who make apologies for dangerous and illegal drivers. Maybe you should re-examine your attitude.
I have no need. Mikey is in it for the ego and the guise of 'making the world a bit better'. Anyone who can't see that needs to take a step back and reexamine their assumptions.
Checking a text message at a red light affects drivers' ability to focus and recognise what's going on around then. You might as well say that drinking a shot of whisky at a red light for significantly less duration than the red light is harmless.
Mikey is absolutely not an egotist - you're just pushing some nasty little agenda of your own by trying to cast doubt on his reasons. His father was killed by a drunk driver and he now attempts to work with the police to catch drivers in illegal behaviour before someone else is hurt and killed.
If you do much road cycling in the UK, it becomes painfully obvious that there's a significant proportion of drivers that do not know how to drive safely or how to pay sufficient attention to what they are doing. I use front and back cameras in an attempt to similarly record bad driving and submit it to the police - it's a small attempt to make the roads safer. I certainly don't put as much time and effort in as Mikey, but I know exactly where he is coming from and it's just ridiculous when people think he does it for the recognition.
> Checking a text message at a red light affects drivers' ability to focus and recognise what's going on around then.
This is nonsense. Cite some studies to support your point if you like, but I doubt you will find any. Most people can check a message responsibly.
The countries that don't make doing so illegal don't tend to have worse accident rates. There's really nothing to support your belief.
> Mikey is absolutely not an egotist
He absolutely is. It's why he forces himself into situations. Not to mention he benfits financially from doing so.
> he now attempts to work with the police
He doesn't work 'with' the police, he forwards footage, that's it.
> to catch drivers in illegal behaviour before someone else is hurt and killed.
He catches some dangerous behavior, he also catches harmless behavior that is common and costs people money. I wish him all the worst.
> I use front and back cameras in an attempt to similarly record bad driving and submit it to the police - it's a small attempt to make the roads safer.
Are you ever worried about someone jacking the cameras if you have an accident?
The problem with trying to justify phone use when driving is the "normalisation" effect. People may start off being ultra careful with phone use, but unless there's some process to warn them, they end up using their phone more and more. One advantage of Mikey's shopping in of phone users is that it provides at least some negative adjustment of drivers' phone use.
I won't address your remarks about Mikey as they are largely matters of opinion, though I seriously doubt that he makes anything more than pocket change from his work and likely that is swallowed up by the costs incurred with buying bike cams.
As far as "working" with the police, that's very much the line that the police bring out for encouraging the public to submit video evidence of traffic offences.
"Harmless behaviour that is common" - as discussed, the behaviour is not harmless which is precisely why the phone use law was introduced and why the police are interested in prosecuting for it. Luckily, it's only a fraction of drivers that do injure others due to phone use, but the same can be said for speeding etc. The idea is to try to prevent careless/dangerous driving that will predictably lead to a greater chance of a collision (NB not an accident as accidents are unavoidable and unpredictable).
> Are you ever worried about someone jacking the cameras if you have an accident?
Again, "accident" is better replaced with "collision" as "accident" implies that it's uncontrollable and "just one of those things", whereas the vast majority of collisions are due to driver behaviour such as lack of attention, speeding etc. (I tend to think of "accident" as something like a tree falling onto your vehicle). I've thought about what would happen if a driver did try to grab my cameras, but it would seem to be a very low probability event - I frequent https://road.cc and there's often rider submitted videos of terrible driving and there's very few where the driver has attempted to grab a camera and I can't think of any where they've been successful. I'm fairly tall and muscular, so I don't think I'd be an obvious target and I try to not react emotionally to close passes, though that does take some practise.
My wife had one incident where she was shouting at a driver that dangerously obstructed her on a roundabout (i.e. he pulled straight out ahead of her when she was already on it) and he ended up going all the way round the roundabout in order to follow her. She was turning left just afterwards and he deliberately tried to swing the front of his car at her, either to scare, intimidate or injure her just after the corner - she shouted something like "it's on camera, b*ch" as she has trouble with emotional regulation. He then went ahead and pulled into a side road and exited his car, so he might have been about to assault her, but luckily her journey was about 50m further along at her mum's house, so she didn't find out. The police took her report and video seriously.
> I am indeed biased (I walk/cycle and don't drive), but that is irrelevant.
It's really not, not if it's informing your view more than fact and reason is.
I applaud you for providing some data (although none peer reviewed and published in standard journals from what I can see), but I have to be skeptical of their results.
Look at rideshare drivers as a counter - they typically have their phones mounted, and see new jobs, texts etc as they come in. If phones were so damaging, don't you think rideshare drivers would be involved in more incidents than most, and an uptick in accidents since ride-sharing became normal? Nothing like that has happened, though.
If the average is 23 seconds, I assume there's some elderly people skewing things, and the mode might be much closer to 5 or 10 seconds. The average in this case could very much be non-representative.
> People may start off being ultra careful with phone use, but unless there's some process to warn them, they end up using their phone more and more.
You could say this for anything though. By all means have zero tolerance and harsh penalties for using a phone while the vehicle is in motion, but I think some places even have laws punishing using a phone in the drivers seat in a parked car, which is just ridiculous.
> As far as "working" with the police, that's very much the line that the police bring out for encouraging the public to submit video evidence of traffic offences.
Sure.
> "Harmless behaviour that is common" - as discussed, the behaviour is not harmless which is precisely why the phone use law was introduced and why the police are interested in prosecuting for it.
I don't think you've made your case that the behavior is not harmless, and a more cynical guess at a motive might just be easy money.
> I don't think you've made your case that the behavior is not harmless, and a more cynical guess at a motive might just be easy money.
Well, I've provided some evidence that demonstrates that phone use is far more distracting than people believe - it's similar in my mind to the various tests of human perception such as "The Invisible Gorilla" whereby the brain fools people into thinking that they are perceptive and can see obvious objects, but actually testing their perception shows up a big mismatch between their expectations and their actual performance.
Presumably, the "easy money" you refer to is providing an incentive to police forces to prosecute phone using drivers, but the fines go to central government, not the local police forces, so apart from statistics, they have little incentive apart from the obvious traffic safety argument. Often, police forces seek to send a warning letter as it's easier for them to do so - that demonstrates that they are not focussing on fine revenues and are attempting to educate the problematic drivers.
One aspect we haven't touched upon is that it is a lot easier to prosecute drivers for using a phone whilst in control of a vehicle rather than only prosecuting drivers using a phone whilst in motion. I don't have a problem with drivers who pull in to the side of the road to use their phone, though the law does state that they should turn off their engine to do so. The difference between that and being stuck in traffic is that they have control over when they choose to rejoin the traffic flow and won't just blindly follow what they think the driver in front is doing.
This does remind me of an incident I had a while back. I was cycling along a dual carriageway and a tractor driver behind me used his horn aggressively (i.e. there was nothing that required the horn use) and then overtook. I passed him at the next set of lights at a roundabout and noticed that he was visibly using his phone, so of course the police got the full video (they require two minutes before and after incidents anyhow) and I was smugly satisfied to catch him out as aggressive behaviour can be down to interpretation, but not the phone use.
> Well, I've provided some evidence that demonstrates that phone use is far more distracting than people believe
But as I said, the average is not necessarily representative at all. Also, at least one of the sources would benefit from showing the problem to be bigger than it is.
> they have little incentive apart from the obvious traffic safety argument.
I don't believe so. They've undoubtedly got various performance measures for the various police forces, but I don't think they have a simple arrest quota for individual officers. If they did have to ramp up their numbers, then I think it'd be an easy job for a cycling officer with a camera to go around and capture all the blatant phone use. Unfortunately, when Avon&Somerset police (my area) provide a positive response to video submissions, they use a standard phrase like "As a result of this report I can confirm a positive outcome in that the driver(s) identified in the submission(s) will receive either a warning letter, a fixed penalty or a prosecution." which doesn't provide much feedback as to what action they are taking (a warning letter is barely an action though I do think they're a good idea). I have also had responses where they also mention a possible NIP (notice of intended prosecution).
As a counter-example of police just looking to make easy arrests, there plenty of reports on https://road.cc where certain forces (e.g. Lancashire) seem to bend over backwards to not take any action on cyclist submitted videos. It's a bit of a lottery as to which areas take things like close passes seriously or not.
Don't forget the people who voted for "Get the Government off the [rich] people's back". Ronald Reagan and every subsequent government since. Neoliberalism. The rest of the Anglosphere followed suit.
It (Neoliberalism) was supposed to re-energize American Capitalism. Instead it gave birth to Rentier-Capitalism. See Brett Christophers for a more detailed analysis.
Although I'm not a fan of Chomsky, neither of his political-philosophical, nor his linguistic work, he's never come across as dishonest, and I won't believe implications until corroborated by hard evidence.
The last 10ish years of his intellectual life were unfortunately not great.
He took the wrong positioning on the war in Ukraine. Along with others.
And it looks here like he made a series of personal relationship mistakes.
The man can't speak for himself anymore, but it's not a good look and I don't think his partner has done him any favours here by deflecting responsibility.
Chomsky is very well known for the fact that his anti-US imperialism stance is strong enough that he becomes a standard bearer for any malodorous regime the US is against, starting from his denial of the Cambodian genocide and attempted habilitation of the Pol Pot regime through to, most recently, his denial of any Russian atrocities in Bucha, Ukraine (his last major public commentary before his stroke).
It is entirely in line with Chomsky's historical pattern that Epstein could walk up to him, say "the US government hates me and claims I'm a pedophile" and for Chomsky to then treat him like his best friend. It is also worth noting that when he eventually recanted his Cambodian genocide denial, he basically said something along the lines of "how could anyone have possibly known just how bad the regime was?" which is... essentially what this response is attempting to be, "how could we have possibly known that Epstein was actually a pedophile?"
I always got the feeling Chomsky went for "the big picture" so to speak, and ignored the details. At least, that would be consistent between his political and his linguistic work. In the latter, he built systems that were simply too complex to be representative of the human mind. I can imagine that he saw himself as a kind of continuation of Marx and Hegel, where the system matters, and human life is just a detail.
Chomsky spent the latter half of his career decrying the capitalists and telling us that we should be suspcious of them. It certainly shows that he didn't walk the walk.
I don't think Chomsky's relationship with Epstein is in any way defensible, but I've seen similar comments to yours all over the interwebs and I'm confused by them. Chomsky never decried capitalists or told us to be suspicious of them on a personal level. Or at least, not in any of his political work that I've ever read. He was anti-capitalist, but he didn't have a simplistic view of the world where individual capitalists were inherently evil.
He has very selective skepticism. It always applies when talking about US, Israel, and others on his list of bad guys, but is mysteriously dropped when discussing whether e.g. Khmer Rouge are "democratic" or whether Russian invasion of Ukraine was "provoked" by US.
He has double standards and cherry-picks for everything. He selects sources, dishonestly. Quotes people out of context, makes wrong moral equivalences.
Any tyrant or autocrat who opposes America is somehow not that bad. For example: The Cambodian Genocide by Khmer Rouge in 1970s were exaggerated by "Western propaganda", The Srebrenica Massacre, some killings but not genocide.
Russia. He argues that the U.S. "provoked" Russia by expanding NATO eastward. Russian attack against Ukraine was American fault. In his logic superpower like Russia should having a "neutral" buffer zone is a legitimate security concern. Smaller European countries can't have their own sovereignty. They must be either US puppets or part of reasonable Russian sphere of influence. At the time he is against US sphere of influence in the South America.
You must also have noticed that he never engages his critics honestly. He just dismisses them as "elite propaganda".
Noam Chomsky, the man who has spent years analyzing propaganda, is himself a propagandist. Whatever one thinks of Chomsky in general, whatever one thinks of his theories of media manipulation and the mechanisms of state power, Chomsky's work with regard to Cambodia has been marred by omissions, dubious statistics, and, in some cases, outright misrepresentations. On top of this, Chomsky continues to deny that he was wrong about Cambodia. He responds to criticisms by misrepresenting his own positions, misrepresenting his critics' positions, and describing his detractors as morally lower than "neo-Nazis and neo-Stalinists."
Wrt to the remarks about this being bad design: not everything is meant for (immediate) usability. Sometimes, a web page functions or doubles as marketing material.
And there's more than "minimal number of interactions" functionality. People generally like good looking stuff. While it may be superfluous, it may feel more pleasing than yet another dark gray text on a light grey square. It may even help remembering navigation, since it's easier to remember deviating design.
Idk. What are these programmers doing afterwards? Build more shoddy code? Perhaps it's a better idea to focus on what's necessary and not run from feature to feature at top speed. This might require some rethinking in the finance department, though.
Yeah, it’s important to note that heritability is a statistic about today’s population, not a deep natural parameter that tells you about causality. Heritability of smoking went up when smoking became less socially approved, for example.
reply