Read about universal hash functions (the writeup on wikipedia is not that bad). They're not a hack.
You don't necessarily use a small space, either -- a 64-bit hash is not normally regarded as a small space, thought it is often smaller than the bit size of what is hashed into it.
Two problems with trees are that you need to define a comparison (you can often concoct one, but they're not always given to you) and though memory is cheap, *probes* into memory are not. If a hash function can get you there in 1 step with high probability, that's interesting.
Carefully chosen file names (a lot of them) can DOS file system performance. Whether this could be escalated to a network vulnerability, hard to say -- if an attacker over the net can figure out a way to induce particular file names on the server, that would be worse.
It's a little sad that people are still forgetting about this failure mode of hash tables and hash functions; either there's got to be a randomizing secret swizzled in, or a better (more nearly cryptographically strong) hash function, or both.
Right, but I was talking about existing nuclear plants. We don't avoid decommissioning costs by shutting them down early because gas is cheap and safety upgrades are expensive. It's possible that decommissioning ten or twenty years from now might be cheaper; one of the claimed advantages of the thorium-based reactors is that they can "burn up" the leftover crap from existing reactors.
Pretty sure a big contributor to reduced emissions is cheap fracked gas replacing coal in power generation; for a given amount of energy, it produces less CO2. This is not the result of some grand strategy, and it has inherent limits (there's still a C in CH4), and we'll run out of gas someday.
Harvesting methane that was going to be emitted anyhow (because of how much we have goosed the climate for the next few centuries with the GHGs we've already emitted) and burning it is a net "win" (which is to say, it is a smaller loss, not an actual win). Otherwise, you get methane's potent effects in the atmosphere for a few decades, then it converts to the same CO2 we would have had from burning it.
Another unhappy thing I learned today, from a friend who works in the nuclear industry, is that the combination of really cheap natural gas and aggressive safety measures in the wake of Fukushima have made it uneconomical to run quite a few nuclear plants. This is not necessarily a good thing; when the NG runs out, the nuke plants will be long gone, and what's our plan for power then? Coal? We're not spinning up the green stuff fast enough, we're not building the grid yet to let us average variable sources across time and space in the way that we should.
You stupid fuckers can't even poll before an election properly, and you want us to think you understand science and global warming, or that it is all some silly political construct? Have you noticed that nuclear plants are not getting as much of the stink-eye from the left that they once did?
Ground pressure is pretty nearly equal to tire pressure, from which you can also calculate contact patch. 60psi tires, 300 lbs, gives 5 square inches. Unless you're in toe shoes, your foot's footprint is surely larger, and the psi thus surely lower.
(Carbide) Studded tires, Nokians. Two years ago I rode out on a frozen pond, I figured if people were ice fishing, the ice must be thick. They got behind the curve plowing the bike path that that year, too, and I rode 2 miles on kinda-rumply ice.
You're 30. Most people make it to 30 without trips to the hospital for anything other stitches. You might want to start thinking about what you want your life to be like when you are 50% older, or even 100% older.
Hi, 6', 220lbs, 52 here. 9.5 miles one-way over the 300' hill (max grade is 10%), 10.5 if I take the flat route, 12.5 if I take the fewer-cars-buy-groceries-on-the-way route. I have two advantages -- I raced as a kid, so I *knew* what was possible for "old" people, and I have a really bad attitude, which is a force that can be used for good.
So. The first time sucked. The second time sucked. So did the third time. Somewhere in there I did a one-week, 300 mile bike trip with a bunch of boy scouts (sleeping, first three nights, involved finding a part to lie down on that was neither a sore muscle nor a poky bone -- i.e., none of the available parts). That helped a lot, but even afterwards I noticed definite improvement for the next few months.
It continued to slowly get easier for the next three years, and since then has reached the don't-give-a-shit stage. The legs just go, though sometimes I'll noticed that they're sore if I do a lot 4 days in a row. So I would say it probably goes on a scale of weeks-months-years. I know that in the space of a few months there were substantial improvements in my blood chemistry (because you know, cholesterol, triglycerides, crap like that).
What I recommend: (1) do NOT obsess about weight. The weight weenies have ruined cycling in this country. I break bike parts, because the weight weenies wanted to save a few more grams, and the manufacturers complied. I ride a bicycle that weighs 65 pounds. (2) Get good tires. I recommend Schwalbe; they sell sizes that fit very many bikes, excellent quality, low rolling resistance, durable. If you have an old mountain bike or hybrid, you might be able to manage Big Apples (huge slick tires) or Fat Franks. (3) You probably want to avoid those straight flat bars that so many mountain bikes come with. Why do they put those on bikes? I have no fucking idea, they are poison to my wrists, and the same for many of my friends. You want "North Road", "Albatross", "Porteur", or "Left Bank" (I recommend Left Bank). Don't be afraid to complain, don't be too afraid to spend a little money (filled up my wife's car today, that was the cost of a pair of handlebars). (4) Saddle. Not sure I can help you there; I seem to have an iron butt. Brooks leather saddles are popular, look nice, have modest snob appeal, and work for me, but they don't work for everyone. Be wary of the plush-fat-ass saddle; that's a great short-term solution that may not work for very many miles. A little padding might be all you need; you don't want to bruise, but all that squoshy stuff on some saddles will also provide friction over a large part of your butt, and may also squoosh into places that it is not welcome (use your imagination). A hard saddle might be improved by a seat cover, especially a slippery one that provides a trace of padding (Aardvark is the brand I like).
The tire and handlebar advice are doubled if you must ride with traffic -- you want to see the cars, you want them to see you, and you want a tire that will be your friend if you have to eat a pothole or hop a curb because some clown failed to notice you in the road and you need to be elsewhere fast.
Also, lights. I'm not organized enough to keep batteries charged, so I spent money for a dynamo hub, and just run my lights all the time, day and night. Modern LED lights are awesome, though pricy. I built my own (3 caps, 4 diodes, hex-puck mounted CREE power LEDs, stock lenses, aluminum angle for heat sink and mount, acrylic mirror to keep the light out of my eyes, and P clamps and bell clamps for mounting hardware).
Stats are very, very mixed. There's accident reports, but those are disputed (clearly an unbiased source).
There was a study in Orlando based on accident reports that focussed solely on mitigation, not fault, but it is no longer available on line, and it's Orlando-centric -- meaning, roads down there are designed differently from roads in some of the more urban areas (I grew up biking in Florida, and have since lived elsewhere, I think I am qualified to make this judgement). Biking without lights is dangerous, driver or biker drunk is dangerous, drivers need to do a better job yielding right-of-way and entering roads form driveways, and bicyclists need to be more careful about stopping (stopping and looking before running is far less dangerous than just rolling through, no surprise).
There was a helmet-cam study in Australia with two results, one that I regard as statistically dubious (because knowing that you have a camera on your helmet, do you think that might change your behavior?) the other not, and interesting. No surprise, in encounters with camera-carrying cyclists, the motorists were more often at fault in dangerous interactions (I have no doubt that they were at fault, but I would expect such cyclists to be on their best behavior, hence the ratio is not reliable). More interestingly, the motorists who were "at fault" did not appear to realize that they were at fault. That article also cites another English study that points out the interesting result that many of these statistical comparisons dump all cyclists, all ages, into the "cyclist" category. If you exclude those people who cannot rent automobiles (under 25), the share of blame that accrues to motorists goes up.
You are probably right about the risk of no-lights at night. Besides the Orlando study, I have read, somewhere, that the most-vigorously enforced cycling safety law in the Netherlands is that one. My bikes, and my kids' bikes, are equipped with a simple circuit attached to a hub generator, with no off switch -- bike rolls, lights go on. On-the-other-hand, you must know that from the POV of someone riding a bicycle at night, people driving (and that often includes me) have really terrible vision. On the local MUP, riding at night, I spot pedestrians by the glow of their cellphones, by the reflective bits on their shoes, or the retroreflection of their dogs' eyeballs (dog hears me long before the owner does, looks, I see the eyes, I know what's up). This is just what you do on a bicycle, if you like to arrive undamaged, and not risk hurting other people. Your gaze is very much forward. Drivers expect that they will not need to "share" the road in this way, and aren't taking the time to look that hard -- because if they did, they would see, just like cyclists do.
No, it's not. For every year of life you save by avoiding bicycle crashes (by not bicycling), you lose 10 or more to diseases of the couch potato. Or, non-cyclists have a 39% higher mortality rate (both references appear above). Or, regular cyclists can expect to live 2-5 years longer. And Michael Bluejay's not entirely reliable; you need to check his numbers carefully (I've caught him making mistakes in the past; if he gets an answer he likes, he does not check his work thoroughly for errors -- though he does correct them, without attribution, if they are brought to his attention:-).
The problem with your safety claims is that they only consider violent, on-road death. That's not that large a risk of death for most people, cyclists or not. In practice, we die of strokes, heart attacks, cancer, and the cumulative effects of chronic conditions like diabetes and failing circulation -- all of which are made (much) worse by lack of exercise. When you look at all causes of death (and not just the eye-catching ones), even when adjusted for age, weight, and other risk factors, choosing to drive a car to work (in Denmark) leads to a 39% higher mortality rate. In another country (England) with road (un)safety closer to ours, the estimate is that for someone choosing to ride a bike in "moderate" amounts (to work, around town, so in the 30-100 mile/week range), each expected year of life lost to a bicycle crash is paid back 10-20x by years gained from improved health.
A citation for your deaths-per-mile comparison would be good. The only estimate I've seen was done years ago by someone at Failure Analysis Associates (and attempts to further vet the numbers have been fruitless) and it was that per-hour (not mile) cycling and driving were about equivalent in risk. That's going to give you 2-3x for cycling per mile, with the numbers obviously skewed by special infrastructure designed for the safe distance travel by cars (interstate highways) and no infrastructure of similar quality anywhere for bicycles in this country (do you "share" your road with roller-bladers, dog walkers, and parents with baby-joggers 2-abreast?)
If your bike commute is that slow, yet you want it to be a workout, you're doing it wrong. My doctor has no complaints. I've ripped handlebars in half (twice) and split firewood with an ax, so somehow the upper body is getting something from somewhere.
Perhaps he lives in some part of the country where cotton does not, in fact, "kill" in the winter. (Yes, I know exactly what you are talking about, I own all sorts of wool and stretch polarfleece for winter use, but I live in New England. I spent the first 34 years of my life in much warmer places, and cotton was no problem there.)
Mod parent up. My own real-world screwup (that worked great in simulation, of course) was a bicycle standlight that used some MOSFETs to turn on the standby power. Walk up to bicycle in the real world (insulated from ground by rubber tires), touch it (sometimes, some places), and boing! on come the lights. Three cheers for high-impedance gates.
Problem fixed with software -- if the microcontroller wakes up and doesn't see a spinning wheel, it leaves the power off. No idea how many times it turns on and plays possum.
"or run a heat exchanger with some anti-freeze" Got that covered for you.
My driveway will not sink into the cold north Atlantic if too much ice builds up on it, nor am I at risk of being swept out to sea when I shovel the snow off of it. Loss of craft and loss of life are both costs that you need to include in your analysis.
Unless they are constructed carefully, pipes embedded in concrete or asphalt can be broken when the concrete cracks or the asphalt shifts (this is a common failure mode, talk to anyone with an "Eichler" in Silicon Valley, also seen in heated driveways where I live). A ship that cracks has bigger problems. In addition, cleaning a driveway with heat includes the cost of the heat itself, where a ship has waste heat from its engines.
Sanity check -- waste heat exceeds power, so use power of engine to estimate heat available. 1kwH = 860kCal = 14 kg ice melted (60 cal/g heat of fusion). Artika class icebreakers have reactors on board totalling 340MW (I think that is heat power, not engine power, so take half of that, 170MW), therefore enough waste heat to melt 2380 metric tons of ice per hour (roughly = 10% of the displacement of the boat, also 2380 cubic meters of ice. Cross section of ship below waterline is also vaguely in the ballpark of 238 square meters, so melting your way forward would only get you 10 meters/hour.). Perhaps, rather than routing the antifreeze through pipes, it would make sense to have a few centrally mounted hose connections for spraying (very) warm sea water where you wanted ice melted.
Read about universal hash functions (the writeup on wikipedia is not that bad). They're not a hack.
You don't necessarily use a small space, either -- a 64-bit hash is not normally regarded as a small space, thought it is often smaller than the bit size of what is hashed into it.
Two problems with trees are that you need to define a comparison (you can often concoct one, but they're not always given to you) and though memory is cheap, *probes* into memory are not. If a hash function can get you there in 1 step with high probability, that's interesting.
True, but good random numbers (good hashes) have interesting and powerful statistical properties.
Carefully chosen file names (a lot of them) can DOS file system performance. Whether this could be escalated to a network vulnerability, hard to say -- if an attacker over the net can figure out a way to induce particular file names on the server, that would be worse.
It's a little sad that people are still forgetting about this failure mode of hash tables and hash functions; either there's got to be a randomizing secret swizzled in, or a better (more nearly cryptographically strong) hash function, or both.
Right, but I was talking about existing nuclear plants. We don't avoid decommissioning costs by shutting them down early because gas is cheap and safety upgrades are expensive. It's possible that decommissioning ten or twenty years from now might be cheaper; one of the claimed advantages of the thorium-based reactors is that they can "burn up" the leftover crap from existing reactors.
Pretty sure a big contributor to reduced emissions is cheap fracked gas replacing coal in power generation; for a given amount of energy, it produces less CO2. This is not the result of some grand strategy, and it has inherent limits (there's still a C in CH4), and we'll run out of gas someday.
Harvesting methane that was going to be emitted anyhow (because of how much we have goosed the climate for the next few centuries with the GHGs we've already emitted) and burning it is a net "win" (which is to say, it is a smaller loss, not an actual win). Otherwise, you get methane's potent effects in the atmosphere for a few decades, then it converts to the same CO2 we would have had from burning it.
Another unhappy thing I learned today, from a friend who works in the nuclear industry, is that the combination of really cheap natural gas and aggressive safety measures in the wake of Fukushima have made it uneconomical to run quite a few nuclear plants. This is not necessarily a good thing; when the NG runs out, the nuke plants will be long gone, and what's our plan for power then? Coal? We're not spinning up the green stuff fast enough, we're not building the grid yet to let us average variable sources across time and space in the way that we should.
You stupid fuckers can't even poll before an election properly, and you want us to think you understand science and global warming, or that it is all some silly political construct? Have you noticed that nuclear plants are not getting as much of the stink-eye from the left that they once did?
When he's not shooting his friends in the face, our former vice president.
Why are we so excited about this particular instance of animal cruelty?
This happens in other places, for example, Massachusetts.
And if the women is not paid for sex, her body has a way to shut those infections down?
Another way to calculate it:
Ground pressure is pretty nearly equal to tire pressure, from which you can also calculate contact patch. 60psi tires, 300 lbs, gives 5 square inches. Unless you're in toe shoes, your foot's footprint is surely larger, and the psi thus surely lower.
And for some reason, a whole bunch of people have chosen NOT to live in Houston.
In a cargo bike, of course.
(Carbide) Studded tires, Nokians. Two years ago I rode out on a frozen pond, I figured if people were ice fishing, the ice must be thick.
They got behind the curve plowing the bike path that that year, too, and I rode 2 miles on kinda-rumply ice.
You're 30. Most people make it to 30 without trips to the hospital for anything other stitches. You might want to start thinking about what you want your life to be like when you are 50% older, or even 100% older.
Hi, 6', 220lbs, 52 here. 9.5 miles one-way over the 300' hill (max grade is 10%), 10.5 if I take the flat route, 12.5 if I take the fewer-cars-buy-groceries-on-the-way route. I have two advantages -- I raced as a kid, so I *knew* what was possible for "old" people, and I have a really bad attitude, which is a force that can be used for good.
So. The first time sucked. The second time sucked. So did the third time. Somewhere in there I did a one-week, 300 mile bike trip with a bunch of boy scouts (sleeping, first three nights, involved finding a part to lie down on that was neither a sore muscle nor a poky bone -- i.e., none of the available parts). That helped a lot, but even afterwards I noticed definite improvement for the next few months.
It continued to slowly get easier for the next three years, and since then has reached the don't-give-a-shit stage. The legs just go, though sometimes I'll noticed that they're sore if I do a lot 4 days in a row. So I would say it probably goes on a scale of weeks-months-years. I know that in the space of a few months there were substantial improvements in my blood chemistry (because you know, cholesterol, triglycerides, crap like that).
What I recommend: (1) do NOT obsess about weight. The weight weenies have ruined cycling in this country. I break bike parts, because the weight weenies wanted to save a few more grams, and the manufacturers complied. I ride a bicycle that weighs 65 pounds. (2) Get good tires. I recommend Schwalbe; they sell sizes that fit very many bikes, excellent quality, low rolling resistance, durable. If you have an old mountain bike or hybrid, you might be able to manage Big Apples (huge slick tires) or Fat Franks. (3) You probably want to avoid those straight flat bars that so many mountain bikes come with. Why do they put those on bikes? I have no fucking idea, they are poison to my wrists, and the same for many of my friends. You want "North Road", "Albatross", "Porteur", or "Left Bank" (I recommend Left Bank). Don't be afraid to complain, don't be too afraid to spend a little money (filled up my wife's car today, that was the cost of a pair of handlebars). (4) Saddle. Not sure I can help you there; I seem to have an iron butt. Brooks leather saddles are popular, look nice, have modest snob appeal, and work for me, but they don't work for everyone. Be wary of the plush-fat-ass saddle; that's a great short-term solution that may not work for very many miles. A little padding might be all you need; you don't want to bruise, but all that squoshy stuff on some saddles will also provide friction over a large part of your butt, and may also squoosh into places that it is not welcome (use your imagination). A hard saddle might be improved by a seat cover, especially a slippery one that provides a trace of padding (Aardvark is the brand I like).
The tire and handlebar advice are doubled if you must ride with traffic -- you want to see the cars, you want them to see you, and you want a tire that will be your friend if you have to eat a pothole or hop a curb because some clown failed to notice you in the road and you need to be elsewhere fast.
Also, lights. I'm not organized enough to keep batteries charged, so I spent money for a dynamo hub, and just run my lights all the time, day and night. Modern LED lights are awesome, though pricy. I built my own (3 caps, 4 diodes, hex-puck mounted CREE power LEDs, stock lenses, aluminum angle for heat sink and mount, acrylic mirror to keep the light out of my eyes, and P clamps and bell clamps for mounting hardware).
Stats are very, very mixed. There's accident reports, but those are disputed (clearly an unbiased source).
There was a study in Orlando based on accident reports that focussed solely on mitigation, not fault, but it is no longer available on line, and it's Orlando-centric -- meaning, roads down there are designed differently from roads in some of the more urban areas (I grew up biking in Florida, and have since lived elsewhere, I think I am qualified to make this judgement). Biking without lights is dangerous, driver or biker drunk is dangerous, drivers need to do a better job yielding right-of-way and entering roads form driveways, and bicyclists need to be more careful about stopping (stopping and looking before running is far less dangerous than just rolling through, no surprise).
There was a helmet-cam study in Australia with two results, one that I regard as statistically dubious (because knowing that you have a camera on your helmet, do you think that might change your behavior?) the other not, and interesting. No surprise, in encounters with camera-carrying cyclists, the motorists were more often at fault in dangerous interactions (I have no doubt that they were at fault, but I would expect such cyclists to be on their best behavior, hence the ratio is not reliable). More interestingly, the motorists who were "at fault" did not appear to realize that they were at fault. That article also cites another English study that points out the interesting result that many of these statistical comparisons dump all cyclists, all ages, into the "cyclist" category. If you exclude those people who cannot rent automobiles (under 25), the share of blame that accrues to motorists goes up.
You are probably right about the risk of no-lights at night. Besides the Orlando study, I have read, somewhere, that the most-vigorously enforced cycling safety law in the Netherlands is that one. My bikes, and my kids' bikes, are equipped with a simple circuit attached to a hub generator, with no off switch -- bike rolls, lights go on. On-the-other-hand, you must know that from the POV of someone riding a bicycle at night, people driving (and that often includes me) have really terrible vision. On the local MUP, riding at night, I spot pedestrians by the glow of their cellphones, by the reflective bits on their shoes, or the retroreflection of their dogs' eyeballs (dog hears me long before the owner does, looks, I see the eyes, I know what's up). This is just what you do on a bicycle, if you like to arrive undamaged, and not risk hurting other people. Your gaze is very much forward. Drivers expect that they will not need to "share" the road in this way, and aren't taking the time to look that hard -- because if they did, they would see, just like cyclists do.
No, it's not. For every year of life you save by avoiding bicycle crashes (by not bicycling), you lose 10 or more to diseases of the couch potato. Or, non-cyclists have a 39% higher mortality rate (both references appear above). Or, regular cyclists can expect to live 2-5 years longer. And Michael Bluejay's not entirely reliable; you need to check his numbers carefully (I've caught him making mistakes in the past; if he gets an answer he likes, he does not check his work thoroughly for errors -- though he does correct them, without attribution, if they are brought to his attention :-).
The problem with your safety claims is that they only consider violent, on-road death. That's not that large a risk of death for most people, cyclists or not. In practice, we die of strokes, heart attacks, cancer, and the cumulative effects of chronic conditions like diabetes and failing circulation -- all of which are made (much) worse by lack of exercise. When you look at all causes of death (and not just the eye-catching ones), even when adjusted for age, weight, and other risk factors, choosing to drive a car to work (in Denmark) leads to a 39% higher mortality rate. In another country (England) with road (un)safety closer to ours, the estimate is that for someone choosing to ride a bike in "moderate" amounts (to work, around town, so in the 30-100 mile/week range), each expected year of life lost to a bicycle crash is paid back 10-20x by years gained from improved health.
A citation for your deaths-per-mile comparison would be good. The only estimate I've seen was done years ago by someone at Failure Analysis Associates (and attempts to further vet the numbers have been fruitless) and it was that per-hour (not mile) cycling and driving were about equivalent in risk. That's going to give you 2-3x for cycling per mile, with the numbers obviously skewed by special infrastructure designed for the safe distance travel by cars (interstate highways) and no infrastructure of similar quality anywhere for bicycles in this country (do you "share" your road with roller-bladers, dog walkers, and parents with baby-joggers 2-abreast?)
If your bike commute is that slow, yet you want it to be a workout, you're doing it wrong. My doctor has no complaints. I've ripped handlebars in half (twice) and split firewood with an ax, so somehow the upper body is getting something from somewhere.
Seat cover on a slippery leather saddle works pretty well. "Aardvark" brand works for me, and at least for a little while it is also waterproof.
Perhaps he lives in some part of the country where cotton does not, in fact, "kill" in the winter. (Yes, I know exactly what you are talking about, I own all sorts of wool and stretch polarfleece for winter use, but I live in New England. I spent the first 34 years of my life in much warmer places, and cotton was no problem there.)
Mod parent up. My own real-world screwup (that worked great in simulation, of course) was a bicycle standlight that used some MOSFETs to turn on the standby power. Walk up to bicycle in the real world (insulated from ground by rubber tires), touch it (sometimes, some places), and boing! on come the lights. Three cheers for high-impedance gates.
Problem fixed with software -- if the microcontroller wakes up and doesn't see a spinning wheel, it leaves the power off. No idea how many times it turns on and plays possum.
"or run a heat exchanger with some anti-freeze" Got that covered for you.
My driveway will not sink into the cold north Atlantic if too much ice builds up on it, nor am I at risk of being swept out to sea when I shovel the snow off of it. Loss of craft and loss of life are both costs that you need to include in your analysis.
Unless they are constructed carefully, pipes embedded in concrete or asphalt can be broken when the concrete cracks or the asphalt shifts (this is a common failure mode, talk to anyone with an "Eichler" in Silicon Valley, also seen in heated driveways where I live). A ship that cracks has bigger problems. In addition, cleaning a driveway with heat includes the cost of the heat itself, where a ship has waste heat from its engines.
Sanity check -- waste heat exceeds power, so use power of engine to estimate heat available. 1kwH = 860kCal = 14 kg ice melted (60 cal/g heat of fusion). Artika class icebreakers have reactors on board totalling 340MW (I think that is heat power, not engine power, so take half of that, 170MW), therefore enough waste heat to melt 2380 metric tons of ice per hour (roughly = 10% of the displacement of the boat, also 2380 cubic meters of ice. Cross section of ship below waterline is also vaguely in the ballpark of 238 square meters, so melting your way forward would only get you 10 meters/hour.). Perhaps, rather than routing the antifreeze through pipes, it would make sense to have a few centrally mounted hose connections for spraying (very) warm sea water where you wanted ice melted.
Seals work harder in a cold environment, too.