Scientific computing. Here are things I am working on now that I wish I had more power for:
Artificial vision - I wrote and use analysis software that tracks motion of magnetic poles on the Sun's surface. There are about 10,000 - 50,000 poles visible on the surface at any given time. It takes a full day for my dual Athlon to process a full day's worth of data. A 10x speedup would be great!
Space physics simulations - trying to describe the behavior of solar storms is very computationally intensive. It takes a minimum of ~1016 floating-point operations to simulate even a simple coronal mass ejection.
That's a CPU-year.
Sound reprocessing - as I digitize my LP collection, I depop and noise-gate every track. It takes 2-3x as much clock time to digitally process the music as it does to play the LP into my sound card to be digitized.
Compilation - enough said
Stupidity in scientific software. A lot of my scientific work involves one-off codes to perform a particular operation on my data. Robust, reliable, transparent algorithms are just as important as the final result (after all, how can you trust a result if you haven't spent the time to understand the algorithm and all its nuances)? The stupider the algorithm, the better. If I can save a day of analytical work with a CPU-hogging numerical solution that takes 10 minutes to code and an hour to run, I've saved most of a day -- unless I have to run that code more than ten times. But as my CPU gets better the tradeoff improves and I can get my work done faster. The savings here isn't in direct CPU time, it's in allowing me to use stoopider code more of the time.
I'd really like an AI to write/. replies for me so I can get more work done.
Yah, I was thinking of code prefilters in perl 5 -- but you're right, they're not as powerful as Lisp macros, since you don't get to work with the parse tree, only the source string.
I love a good rant as much as the next guy, but that one doesn't hold enough water. It's true that perl allows you to do really despicable things in the name of a dirty hack, and it's true that many programmers succumb to the temptation -- but all of the fundamental mechanisms in lisp are present in perl as a strict subset of the language.
The rant is about crappy perl programmers. The argument that it supports best is that many perl programmers are crappy, rather than that perl itself is crappy.
The problem, as I see it, is that perl makes quick-and-dirty hacking so quick and easy (for the experienced) that scalable solutions are put off until they're needed much more badly than in other, more restrictive, languages. That's OK. Here's why:
All engineering solutions -- in computer programming, engine design, city layout, or what-have-you -- have multiple tiers of solution for different sizes of problem. A solution that works well for small things (e.g. a simply carbureted air-cooled gasoline engine to drive a scooter) doesn't work well when scaled up to larger operations (like pushing a supertanker around). You have to use more sophisticated solutions that take time to design and implement, but that win in the larger case.
Applied to programming tasks, perl makes it easy enough to hack together sort-of-working solutions that you can really get a long way with quick and dirty stuff. (by analogy: the VW Beetle, the longest running car model in history [RIP] uses a simply carbureted air-cooled engine. It's not the most powerful car around, but more of them were bought new than any other model of car in history.)
Ease of hacking is not a problem, that's a solution. Sure, closed-loop, fuel-injected, water-cooled engines are more powerful and scalable -- but they solve a different class of problem.
A while ago I remember touring the U.S.S. Blowfin in Pearl Harbor -- it's a WW2 era submarine. One of the most interesting parts of the ship was the little machine shop -- rather than shipping spares of every little thing on-board, they carried loads of pipe and metal stock, and a compact milling-machine-and-lathe setup to make stuff. I remember thinking how similar that was to the Perl attitude of just leaving a big box of tools and parts around, to hook up whatever you need.
Like the little machine shop, perl offers you the ability to do a lot of crufty stuff. It's up to you to know when to be crufty and when to be more careful. The problem is that carefulness and insight are much more rare than hackability. You seem to be ranting about perl, but you're actually ranting about people with poor programming judgement. Those people would write crap in any language.
Why is "?:" spelled "??::" ?
Because "?:" is a logical (short-circuit; control flow) operator. The newer spelling makes it look more like "&&" and "||". Why is "&&" different from "and"? Ditto for "||" and "or", etc.
Precedence, my friend, precedence. That already exists in perl 5. The spelled-out operators have much lower precedence than && and friends -- so you can say
if( $a = shift and $a=~m/foo/ ) {... }
conveniently. ($a gets the shifted value, not the boolean AND of the shifted value and the match). "." is now "~"?
Well, three good ones out of four ain't bad... IMHO this is dumb. The reason is that "->" is now "." (saving some keystrokes, I suppose) -- but I'd rather leave both operators as-is. Charwise operators?
Yes, excellent stuff! I believe that this is actually driven by the PDL application -- there, you have large arrays (e.g. several million entries) and want to do vast vectorized operations on them. Currently PDL uses the perl 5 bitwise operators for vectorized ops -- but that's not a perfect fit, since sometimes you do actually want bitwise operations.
The Deltoid Pumpkin Seed is about lifting bodies, not airships. Lifting bodies are "flying wings" -- hence the name of the book. Otherwise it would be The Giant Flying Hotdog or something similar but more McPhee-esque.
No problemo. No, it takes rather strong fields to muck with magnetic media. Even the Earth's 0.5-gauss field is strong enough to (just barely) displace the image in most CRTs. That's why modern televisions all have a Degausser built in, and why NTSC has a TINT knob (when the standard was invented degaussers were considered too expensive to put into television sets -- so rotating the set would change the color balance, as the Earth's field steered the beams slightly differently).
Nuclear reactions generally have about 1,000,000 (a million) times as much energy as chemical reactions. That's because nuclei are held together by a much stronger force than the electromagnetic forces that hold electrons inside molecules and atoms.
Nuclear fission shows that difference very clearly.
A normal person could lift the amount of nuclear fuel that would power (say) Denver for a couple of weeks -- replacing many coal trains of material that are normally dumped into chemical reactors ('furnaces').
Hydrogen reactions are about 10x more energetic than heavy metal reactions, per nucleon (proton and/or neutron) involved. The curve of the binding energy shows how much energy you can get from elemental transmutation (nuclear reactions). When you change one element into another, you have to insert or extract energy equivalent to the difference in height of the curve. Uranium is way off on the heavy-metal side of the curve, where the slope isn't great (comparatively little energy required to transmute); but hydrogen is that spike on the lightweight side. Lots of energy available there.
I was a software wonk at D3D (General Atomic; D3D is a slightly earlier machine than JET) for a while. It was pretty cool to sit in the control room with about 500 monitors and watch when the big betatron magnetic field ramped up. The picture on every single screen would move simultaneously as the magnetic field from the machine (about 75 feet away) would steer all the electron beams at once.
No, schools are not there to make you feel good about yourself (that's obvious), they are there to make sure you know the minimum information to pass a class. That's a D.
Certainly schools aren't there to make students feel good about themselves -- they are there to help students learn. By motivating people who otherwise might not be interested (through fear of a bad grade or desire for a good one), grades help many students learn by providing a goal to focus on. This aspect of grading is particularly obvious in elementary schools: nobody really cares about your grades in primary school (up to 11 years of age) once you've graduated from high school; the grades provide a check to your parents (and, later, to you) on how you're doing. They also help you to learn something about cause (working in class, or goofing off) and effect (via grades). It's arguable that this use benefits from a "sliding scale" for grades, in which every student is graded according to some estimate of innate ability and students who have to work hard -- but nonetheless achieve real learning -- earn much better grades than smart loafers.
Grades also have a different use: indicating to the world your fitness for a particular task.
This use definitely does not benefit from a strongly "sliding scale", because that defeats the purpose of having a relatively objective measure of someone's ability. Nevertheless, grades that reflect diligence and commitment -- but only to the extent that they affect each person's ability to perform a task or understand a subject -- actually help this use of grades.
If grading is intended as a motivator to encourage each student to perform his/her best, then more effort should yield a higher grade. Likewise, if grading is intended to reflect the student's ability to perform in a real-world situation, effort should probably yield a higher grade: folks who work hard tend to do better than folks who are marginally smarter but don't work hard, in real-life situations. But if grading is intended to reflect only the quality of the work that was submitted, then sure -- effort shouldn't count at all.
This issue cuts deep into the heart of what grading is for -- it's possible for smart people to reasonably disagree, depending on what they think the intent of the grade is. Since grades are put to many uses, there are many answers to the question.
As a college instructor, I tend to use a strict grading protocol -- and then "bump up" a few of the students. If someone comes in to my office every week and really struggles to understand the concepts, but the computer tells me that they earned a "C+" -- they're likely to find a "B-" on their transcript. But if someone who's smart enough to get an "A" blows an exam from being hung over, that person gets little or no sympathy.
Re:Good point -- the very weak dollar doesn't help
on
Out of Gas
·
· Score: 1
Good point! I wish I could moderate as well as posting, because that's really insightful.
The weak dollar is definitely a factor in the rising price of oil, but the oil pricing could just be a necessary cost of the strategy you've outlined.
Good point -- the very weak dollar doesn't help.
on
Out of Gas
·
· Score: 1
The dollar is rather weak at something like 0.8 Euro. Other currencies, like the Yuan, appear OK but that's because they are actively pegged to the dollar; hard currencies like platinum show a clearer picture). The weak dollar doesn't help the price of gas, which is set by the international market.
The dollar is weak primarily because of our government's irresponsible fiscal policy and international poor perception of our activities in Iraq. The International Monetary Fund issued a special report to that effect last fall.
So, er, if you voted for Bush and support the war in Iraq, you're responsible for the high cost of filling up your SUV.
My Prius gets 41 MPG at 80MPH. It will also climb I-70 over the Rocky Mountains at the posted limit with no problem. It won't maintain 80 MPH all the way from Denver to the Eisenhower Tunnel (nearly a vertical mile), but it will maintain 70 MPH the whole way with no problem.
Incidentally, the point of a Prius is to give you the same mileage as a 1500 lb econobox, without the econobox's noise, flimsiness, or lack of features & comfort.
... for city driving. Your point is well taken for highway driving, but the fundamental idea of using the electric motor for load-leveling is a sound one. The way to tell is that most hybrids get better mileage in the city than on the highway.
If you think about it, city driving involves less aerodynamic drag, so it should require less energy to accomplish. Motorcycles (driven sanely) regularly do better in town than on the highway, largely because their aerodynamics are crap. Hybrids are typically designed with lots of efficient features (as you point out) and hence do OK on the highway -- but where they really shine is in city conditions, where they use less fuel per mile [and a regular car would use more fuel per mile].
Interestingly enough, the Metro got better mileage than most motorcycles -- at least on long hauls. For quick hops around town, mass dominates and the motorcycle wins. But for that 20 mile commute, wind resistance wins and the Metro was better streamlined than most motorcycles:-)
The Prius weighs nearly twice as much as the CRX, and is considerably quieter. It's essentially a compact luxury car -- Toyota optimized for better mileage in a full-featured car, rather than amazing mileage in a small, lightweight car (that would be the Honda Insight).
I don't understand why there is so much anti-hybrid stuff in the news lately. The Prius and Insight both have quite good safety records and really excellent mileage.
One nuance that the Wired article didn't cover is that mileage depends greatly on driving style. If I make short, aggressive hops across town my Prius' mileage drops to the mid 30s in summer or low 30s in winter. If I drive more sedately (at the speed limit, with gentle acceleration instead of punching the throttle at the lights) I get mileage in the mid to high 40s. Not bad for a comfortable four-door family car.
I can drive all day at 80 mph and get 41 MPG. I do it several times a year to visit family and/or just road-trip around the state.
The lesson to take is that good mileage requires both good tech and good habits.
I worked on the SOHO spacecraft project for four years. During one of those years we experienced an, er, ``loss of mission event'' when SOHO gyrated out of control and turned its solar panels sideways to the Sun. The story of the recovery is long and fascinating, but there was a
two week period when everyone thought it was completely gone.
When the news came down that SOHO was probably gone for good, otherwise very controlled, steady, Dave Bowman types were seen leaning against the wall weeping, or bawling in front of the console. It was as if we were all in mourning for a suddenly lost friend -- except that, another time, a member of the spacecraft team did pass away (for reasons of his own) and the collective gestalt emotion was not as strong about him as about the spacecraft itself. That's not a statement about the callousness of the individuals involved -- but rather about the strength of the emotional upset that came from the loss of the mission.
Perhaps that's because the mission becomes such a strong focus of the team's lives that it really does encroach on an emotional place normally reserved for our closest friends and family. We're conditioned, and society is structured, to deal with human tragedy; but losing our ``friend'' leaves us with an equally large void and no societal preparation for it.
The problem is that the insulation on pretty much all wires is good to 600V -- plenty high enough to hold the 380 or so from the battery. As you point out, if the wire shorts out to ground, it won't handle the power for more than a second or two. But if it shorts out through you, it doesn't need more than a second or two to cause a world of hurt.
I own a Prius and one of the first things I looked at is the Big Orange Cable location -- the maintenance book spends a lot of time reminding you to never cut into, touch, mangle, or otherwise molest the Big Orange Cables that carry the big wattage from the batteries (in the back) to the controller (in the front).
But after an accident, any part of the wiring harness could be energized relative to the frame -- you just don't know, for example, if the dome light circuit is going to happen to be connected to the same bank of circuits that were smushed into the Big Orange Cable in a front-quarter collision that also happened to damage the fail-safe circuit breakers.
It's a big deal -- I imagine your training is similar to what the rural fire volunteers are getting here in Colorado: if it's a Prius, don't touch it!
Reminds me of the college kids who like to play with radiation warning labels: ``heh-heh. My laptop has a radiation sticker on it! Cool! heh-heh.'' The problem is that if you get in (for example) a car accident and one of those labels is visible anywhere around the car, there is no first aid for you until the radiologic response unit arrives from across town.
Dave needs to get himself a fresh install of FireFox.
Yah, I was thinking of code prefilters in perl 5 -- but you're right, they're not as powerful as Lisp macros, since you don't get to work with the parse tree, only the source string.
The rant is about crappy perl programmers. The argument that it supports best is that many perl programmers are crappy, rather than that perl itself is crappy.
The problem, as I see it, is that perl makes quick-and-dirty hacking so quick and easy (for the experienced) that scalable solutions are put off until they're needed much more badly than in other, more restrictive, languages. That's OK. Here's why:
All engineering solutions -- in computer programming, engine design, city layout, or what-have-you -- have multiple tiers of solution for different sizes of problem. A solution that works well for small things (e.g. a simply carbureted air-cooled gasoline engine to drive a scooter) doesn't work well when scaled up to larger operations (like pushing a supertanker around). You have to use more sophisticated solutions that take time to design and implement, but that win in the larger case.
Applied to programming tasks, perl makes it easy enough to hack together sort-of-working solutions that you can really get a long way with quick and dirty stuff. (by analogy: the VW Beetle, the longest running car model in history [RIP] uses a simply carbureted air-cooled engine. It's not the most powerful car around, but more of them were bought new than any other model of car in history.)
Ease of hacking is not a problem, that's a solution. Sure, closed-loop, fuel-injected, water-cooled engines are more powerful and scalable -- but they solve a different class of problem.
A while ago I remember touring the U.S.S. Blowfin in Pearl Harbor -- it's a WW2 era submarine. One of the most interesting parts of the ship was the little machine shop -- rather than shipping spares of every little thing on-board, they carried loads of pipe and metal stock, and a compact milling-machine-and-lathe setup to make stuff. I remember thinking how similar that was to the Perl attitude of just leaving a big box of tools and parts around, to hook up whatever you need.
Like the little machine shop, perl offers you the ability to do a lot of crufty stuff. It's up to you to know when to be crufty and when to be more careful. The problem is that carefulness and insight are much more rare than hackability. You seem to be ranting about perl, but you're actually ranting about people with poor programming judgement. Those people would write crap in any language.
It sure is, since it means you'll be able to import bits of perl code to do the stuff that's awkward in Python.
Why is "?:" spelled "??::" ? ... }
Because "?:" is a logical (short-circuit; control flow) operator. The newer spelling makes it look more like "&&" and "||".
Why is "&&" different from "and"? Ditto for "||" and "or", etc.
Precedence, my friend, precedence. That already exists in perl 5. The spelled-out operators have much lower precedence than && and friends -- so you can say
if( $a = shift and $a=~m/foo/ ) {
conveniently. ($a gets the shifted value, not the boolean AND of the shifted value and the match).
"." is now "~"?
Well, three good ones out of four ain't bad... IMHO this is dumb. The reason is that "->" is now "." (saving some keystrokes, I suppose) -- but I'd rather leave both operators as-is.
Charwise operators?
Yes, excellent stuff! I believe that this is actually driven by the PDL application -- there, you have large arrays (e.g. several million entries) and want to do vast vectorized operations on them. Currently PDL uses the perl 5 bitwise operators for vectorized ops -- but that's not a perfect fit, since sometimes you do actually want bitwise operations.
The Deltoid Pumpkin Seed is about lifting bodies, not airships. Lifting bodies are "flying wings" -- hence the name of the book. Otherwise it would be The Giant Flying Hotdog or something similar but more McPhee-esque.
No problemo. No, it takes rather strong fields to muck with magnetic media. Even the Earth's 0.5-gauss field is strong enough to (just barely) displace the image in most CRTs. That's why modern televisions all have a Degausser built in, and why NTSC has a TINT knob (when the standard was invented degaussers were considered too expensive to put into television sets -- so rotating the set would change the color balance, as the Earth's field steered the beams slightly differently).
Nuclear fission shows that difference very clearly. A normal person could lift the amount of nuclear fuel that would power (say) Denver for a couple of weeks -- replacing many coal trains of material that are normally dumped into chemical reactors ('furnaces').
Hydrogen reactions are about 10x more energetic than heavy metal reactions, per nucleon (proton and/or neutron) involved. The curve of the binding energy shows how much energy you can get from elemental transmutation (nuclear reactions). When you change one element into another, you have to insert or extract energy equivalent to the difference in height of the curve. Uranium is way off on the heavy-metal side of the curve, where the slope isn't great (comparatively little energy required to transmute); but hydrogen is that spike on the lightweight side. Lots of energy available there.
I was a software wonk at D3D (General Atomic; D3D is a slightly earlier machine than JET) for a while. It was pretty cool to sit in the control room with about 500 monitors and watch when the big betatron magnetic field ramped up. The picture on every single screen would move simultaneously as the magnetic field from the machine (about 75 feet away) would steer all the electron beams at once.
Certainly schools aren't there to make students feel good about themselves -- they are there to help students learn. By motivating people who otherwise might not be interested (through fear of a bad grade or desire for a good one), grades help many students learn by providing a goal to focus on. This aspect of grading is particularly obvious in elementary schools: nobody really cares about your grades in primary school (up to 11 years of age) once you've graduated from high school; the grades provide a check to your parents (and, later, to you) on how you're doing. They also help you to learn something about cause (working in class, or goofing off) and effect (via grades). It's arguable that this use benefits from a "sliding scale" for grades, in which every student is graded according to some estimate of innate ability and students who have to work hard -- but nonetheless achieve real learning -- earn much better grades than smart loafers.
Grades also have a different use: indicating to the world your fitness for a particular task. This use definitely does not benefit from a strongly "sliding scale", because that defeats the purpose of having a relatively objective measure of someone's ability. Nevertheless, grades that reflect diligence and commitment -- but only to the extent that they affect each person's ability to perform a task or understand a subject -- actually help this use of grades.
This issue cuts deep into the heart of what grading is for -- it's possible for smart people to reasonably disagree, depending on what they think the intent of the grade is. Since grades are put to many uses, there are many answers to the question.
As a college instructor, I tend to use a strict grading protocol -- and then "bump up" a few of the students. If someone comes in to my office every week and really struggles to understand the concepts, but the computer tells me that they earned a "C+" -- they're likely to find a "B-" on their transcript. But if someone who's smart enough to get an "A" blows an exam from being hung over, that person gets little or no sympathy.
The rest of us would like to know.
The weak dollar is definitely a factor in the rising price of oil, but the oil pricing could just be a necessary cost of the strategy you've outlined.
rather weak at something like 0.8 Euro. Other currencies, like the Yuan, appear OK but that's because they are actively pegged
to the dollar; hard currencies like platinum
show a clearer picture). The weak dollar doesn't help the price of gas, which is set by the international market.
The dollar is weak primarily because of our government's irresponsible fiscal policy and international poor perception of our activities in Iraq. The International Monetary Fund issued a special report to that effect last fall.
So, er, if you voted for Bush and support the war in Iraq, you're responsible for the high cost of filling up your SUV.
Incidentally, the point of a Prius is to give you the same mileage as a 1500 lb econobox, without the econobox's noise, flimsiness, or lack of features & comfort.
I find that rollerblading to work gives me a better workout -- and that's what I do most mornings. But the main discussion was about, er, cars.
If you think about it, city driving involves less aerodynamic drag, so it should require less energy to accomplish. Motorcycles (driven sanely) regularly do better in town than on the highway, largely because their aerodynamics are crap. Hybrids are typically designed with lots of efficient features (as you point out) and hence do OK on the highway -- but where they really shine is in city conditions, where they use less fuel per mile [and a regular car would use more fuel per mile].
Interestingly enough, the Metro got better mileage than most motorcycles -- at least on long hauls. For quick hops around town, mass dominates and the motorcycle wins. But for that 20 mile commute, wind resistance wins and the Metro was better streamlined than most motorcycles :-)
The Prius weighs nearly twice as much as the CRX, and is considerably quieter. It's essentially a compact luxury car -- Toyota optimized for better mileage in a full-featured car, rather than amazing mileage in a small, lightweight car (that would be the Honda Insight).
One nuance that the Wired article didn't cover is that mileage depends greatly on driving style. If I make short, aggressive hops across town my Prius' mileage drops to the mid 30s in summer or low 30s in winter. If I drive more sedately (at the speed limit, with gentle acceleration instead of punching the throttle at the lights) I get mileage in the mid to high 40s. Not bad for a comfortable four-door family car.
I can drive all day at 80 mph and get 41 MPG. I do it several times a year to visit family and/or just road-trip around the state.
The lesson to take is that good mileage requires both good tech and good habits.
When the news came down that SOHO was probably gone for good, otherwise very controlled, steady, Dave Bowman types were seen leaning against the wall weeping, or bawling in front of the console. It was as if we were all in mourning for a suddenly lost friend -- except that, another time, a member of the spacecraft team did pass away (for reasons of his own) and the collective gestalt emotion was not as strong about him as about the spacecraft itself. That's not a statement about the callousness of the individuals involved -- but rather about the strength of the emotional upset that came from the loss of the mission.
Perhaps that's because the mission becomes such a strong focus of the team's lives that it really does encroach on an emotional place normally reserved for our closest friends and family. We're conditioned, and society is structured, to deal with human tragedy; but losing our ``friend'' leaves us with an equally large void and no societal preparation for it.
The problem is that the insulation on pretty much all wires is good to 600V -- plenty high enough to hold the 380 or so from the battery. As you point out, if the wire shorts out to ground, it won't handle the power for more than a second or two. But if it shorts out through you, it doesn't need more than a second or two to cause a world of hurt.
Because you never know which ``12V'' circuits are going to get shorted to the battery cable when the car gets pretzeled.
But after an accident, any part of the wiring harness could be energized relative to the frame -- you just don't know, for example, if the dome light circuit is going to happen to be connected to the same bank of circuits that were smushed into the Big Orange Cable in a front-quarter collision that also happened to damage the fail-safe circuit breakers.
It's a big deal -- I imagine your training is similar to what the rural fire volunteers are getting here in Colorado: if it's a Prius, don't touch it!
Reminds me of the college kids who like to play with radiation warning labels: ``heh-heh. My laptop has a radiation sticker on it! Cool! heh-heh.'' The problem is that if you get in (for example) a car accident and one of those labels is visible anywhere around the car, there is no first aid for you until the radiologic response unit arrives from across town.