July 26, 2013
On 7/26/13 2:43 PM, Walter Bright wrote:
> On 7/26/2013 2:42 PM, Walter Bright wrote:
>> On 7/26/2013 2:18 PM, Brad Roberts wrote:
>>> On 7/26/13 12:50 PM, Walter Bright wrote:
>>>> On 7/26/2013 5:28 AM, bearophile wrote:
>>>>
>>>>> In some situations stack overflows are a security problem. Several persons have
>>>>> written programs to analyse the stack usage of Ada-SPARK programs. Ignoring the
>>>>> safety hazards caused by stack overflows, and ignoring the tools to avoid them
>>>>> in critical-purpose routines, is very bad engineering.
>>>>
>>>> You can't have an undetected stack overflow if you use guard pages.
>>>
>>> If you use guard pages AND guarantee that no object exceeds the size of the
>>> guard page.  Without the latter, you can only catch a subset (though a large
>>> subset).
>>>
>>
>> True. I've often thought it would be reasonable to restrict object sizes on the
>> stack.
>
> No, I was wrong. False. Stack frames larger than 4K are sequentially "probed" so they'll fault on
> overflow.

Are or could be?
July 26, 2013
On 7/26/2013 2:15 PM, H. S. Teoh wrote:
> I think most automatics lock the steering wheel upon power off (probably
> as some kind of safety guard, maybe against inadvertent damage by some
> parts that expect power to be running when the wheel is turned?).

It's an anti-theft feature.


> I also use manual downshifting on my car (auto transmission) to force it
> to slow down -- e.g., down a hill, when the automatic transmission will
> often blindly shift to a high gear and you'll find yourself having to
> burn up much of your brakes to keep the speed under control. My car has
> a button that locks the maximum gear to 3rd, which is useful for keeping
> within city street limits when going downhill. It also has gear
> positions to force a switch to 2nd or 1st gear, though I rarely use
> those since at lower speeds there's generally no need to bother with
> them. In an emergency situation, forcing it to 1st gear would help
> reduce the speed. (But it does take a few seconds before the auto
> transmission kicks in to effect the switch -- and a few extra seconds at
> high speed can be too long in an emergency situation.)

Although commonplace, it is poor practice to use the engine to slow the car down (unless you're dealing with brake fade from overheating).

1. Brake pads are cheap compared with engine rebuilds.

2. Using the engine as a brake can cause unburned gas to wash the oil off of the cylinder walls, resulting in excessive wear.

3. The engine is not designed to be a brake. Use the brakes. Brake pads are not precious :-)


> I think the one time when forcing 1st gear proved useful was when I had
> to drive downhill after a heavy snowstorm -- you do *not* want to go any
> higher in that situation otherwise you could easily lose friction and
> slide down to a nasty crunch at the bottom. (Well, the general advice
> is, don't drive in such conditions in the first place -- but then guys
> like me are often rather foolhardy. :-P)

I prefer a manual trans in slippery conditions - more control.

July 26, 2013
On 7/26/13 3:52 PM, Walter Bright wrote:
> Although commonplace, it is poor practice to use the engine to slow the
> car down (unless you're dealing with brake fade from overheating).

I know next to nothing about cars so take this destruction with a grain of salt.

> 1. Brake pads are cheap compared with engine rebuilds.

My understanding is that engine brake does not destroy the engine. It does not involve friction. Indeed Wikipedia agrees: http://en.wikipedia.org/wiki/Engine_braking and even mentions "Engine braking is a generally accepted practice and can help save wear on friction brakes".

> 2. Using the engine as a brake can cause unburned gas to wash the oil
> off of the cylinder walls, resulting in excessive wear.

[citation needed]

> 3. The engine is not designed to be a brake. Use the brakes. Brake pads
> are not precious :-)

Engine brake is a natural artifact of its design. I don't think you can build an argument around "wasn't design to do that, so don't". Engine braking is a widespread and common technique.

I use engine braking most of the time (I always drive manual so that's easy). Saves gas and I've never had a mechanic tell me "you better go easy with that engine brake, look at them cylinder walls!" My brake pads reach a state of immortality.


Andrei
July 26, 2013
On 7/26/2013 4:07 PM, Andrei Alexandrescu wrote:
> On 7/26/13 3:52 PM, Walter Bright wrote:
>> Although commonplace, it is poor practice to use the engine to slow the
>> car down (unless you're dealing with brake fade from overheating).
>
> I know next to nothing about cars so take this destruction with a grain of salt.
>
>> 1. Brake pads are cheap compared with engine rebuilds.
>
> My understanding is that engine brake does not destroy the engine. It does not
> involve friction.

It's news to me that engines are frictionless! (The braking effect is only partially due to engine friction - the pumping of the air is most of it. But the engine WEAR is due to friction.)

> Indeed Wikipedia agrees:
> http://en.wikipedia.org/wiki/Engine_braking and even mentions "Engine braking is
> a generally accepted practice and can help save wear on friction brakes".

Of course it saves wear on the brakes. The issue is do you prefer wear on your engine?


>> 2. Using the engine as a brake can cause unburned gas to wash the oil
>> off of the cylinder walls, resulting in excessive wear.
>
> [citation needed]

Mechanics at the dealer told me this. They had no reason to lie to me.


>> 3. The engine is not designed to be a brake. Use the brakes. Brake pads
>> are not precious :-)
>
> Engine brake is a natural artifact of its design. I don't think you can build an
> argument around "wasn't design to do that, so don't". Engine braking is a
> widespread and common technique.

I agree it is widespread and commonplace. That's why the mechanics felt it necessary to tell me not to do it. I was also told not to do it when I took two different courses in track driving - the Bob Bondurant and Skip Barber ones.


> I use engine braking most of the time (I always drive manual so that's easy).
> Saves gas and I've never had a mechanic tell me "you better go easy with that
> engine brake, look at them cylinder walls!" My brake pads reach a state of
> immortality.

The object isn't to save brake pads, it's to reduce the wear and tear on your engine.

July 26, 2013
On 7/26/2013 3:03 PM, Joseph Rushton Wakeling wrote:
> I hope I'm not being unfair, but my impression was that the very impressive
> modern safety record of air travel is at least partly down to lessons learned
> from some major historical catastrophes.

Designers make mistakes even in redundant systems - sometimes they turn out to be coupled so a failure in one causes a failure in the backup. Sometimes certain failure modes are not anticipated.

But one thing they do NOT do is assume that component X cannot fail.


> The one that always springs to mind is
> the De Havilland jets breaking apart mid-flight due to metal fatigue.

Boeing's fix for that not only involved fixing the particular fatigue problem, but designing the structure so WHEN IT DOES CRACK the crack will not bring the airplane down.

This design has been proven through a handful of incidents where an airliner has lost whole panels due to cracking and yet the structure remained sound.


> The number of flights and resulting near misses surely helps to battle test
> safely procedures and designs. That volume of learning opportunities can't
> readily be matched in many other industries.

The most important lesson learned from aviation accidents is that all components can and will fail, so you need layers of redundancy. The airplane is far too complicated to rely on crash investigations to identify problems.

I watched a show on the Concorde the other day, and was shocked to learn that there'd been an earlier incident where a tire burst on takeoff, the tire parts had penetrated the wing fuel tank, and the fuel drained away. The industry decided to ignore fixing it - and a few years later, it happened again, but this time the leak caught fire and killed everybody.

July 26, 2013
On 7/26/13 4:25 PM, Walter Bright wrote:
> On 7/26/2013 4:07 PM, Andrei Alexandrescu wrote:
>> On 7/26/13 3:52 PM, Walter Bright wrote:
>>> Although commonplace, it is poor practice to use the engine to slow the
>>> car down (unless you're dealing with brake fade from overheating).
>>
>> I know next to nothing about cars so take this destruction with a
>> grain of salt.
>>
>>> 1. Brake pads are cheap compared with engine rebuilds.
>>
>> My understanding is that engine brake does not destroy the engine. It
>> does not
>> involve friction.
>
> It's news to me that engines are frictionless! (The braking effect is
> only partially due to engine friction - the pumping of the air is most
> of it. But the engine WEAR is due to friction.)
>
>> Indeed Wikipedia agrees:
>> http://en.wikipedia.org/wiki/Engine_braking and even mentions "Engine
>> braking is
>> a generally accepted practice and can help save wear on friction brakes".
>
> Of course it saves wear on the brakes. The issue is do you prefer wear
> on your engine?
>
>
>>> 2. Using the engine as a brake can cause unburned gas to wash the oil
>>> off of the cylinder walls, resulting in excessive wear.
>>
>> [citation needed]
>
> Mechanics at the dealer told me this. They had no reason to lie to me.
>
>
>>> 3. The engine is not designed to be a brake. Use the brakes. Brake pads
>>> are not precious :-)
>>
>> Engine brake is a natural artifact of its design. I don't think you
>> can build an
>> argument around "wasn't design to do that, so don't". Engine braking is a
>> widespread and common technique.
>
> I agree it is widespread and commonplace. That's why the mechanics felt
> it necessary to tell me not to do it. I was also told not to do it when
> I took two different courses in track driving - the Bob Bondurant and
> Skip Barber ones.
>
>
>> I use engine braking most of the time (I always drive manual so that's
>> easy).
>> Saves gas and I've never had a mechanic tell me "you better go easy
>> with that
>> engine brake, look at them cylinder walls!" My brake pads reach a
>> state of
>> immortality.
>
> The object isn't to save brake pads, it's to reduce the wear and tear on
> your engine.

I stand by my opinion and practice, and I consider yours completely unsubstantiated, to the extent it doesn't need further rebuttal. FWIW I've heard stuff from mechanics (about e.g. how ABS works) that would make a physicist blush.

Andrei
July 27, 2013
On 7/26/2013 4:45 PM, Andrei Alexandrescu wrote:
> I stand by my opinion and practice, and I consider yours completely
> unsubstantiated, to the extent it doesn't need further rebuttal.

It's your car!

> FWIW I've heard
> stuff from mechanics (about e.g. how ABS works) that would make a physicist blush.

I've heard **** from mechanics, too.

July 27, 2013
On 7/26/2013 3:32 PM, Brad Roberts wrote:
>> No, I was wrong. False. Stack frames larger than 4K are sequentially "probed"
>> so they'll fault on overflow.
>
> Are or could be?

Yes and yes.

https://github.com/D-Programming-Language/dmd/blob/master/src/backend/cod3.c#L3050
July 27, 2013
On 7/26/13 5:38 PM, Walter Bright wrote:
> On 7/26/2013 3:32 PM, Brad Roberts wrote:
>>> No, I was wrong. False. Stack frames larger than 4K are sequentially "probed"
>>> so they'll fault on overflow.
>>
>> Are or could be?
>
> Yes and yes.
>
> https://github.com/D-Programming-Language/dmd/blob/master/src/backend/cod3.c#L3050

Um.. unless I'm reading that maze of #if's and conditionals wrong.. that's only being done in a few cases, specifically never on linux.  And either way, are you asserting that all compilers do that?


July 27, 2013
On 27/07/13 01:25, Walter Bright wrote:
> On 7/26/2013 4:07 PM, Andrei Alexandrescu wrote:
>> On 7/26/13 3:52 PM, Walter Bright wrote:
>>> Although commonplace, it is poor practice to use the engine to slow the car down (unless you're dealing with brake fade from overheating).
>>
>> I know next to nothing about cars so take this destruction with a grain of salt.
>>
>>> 1. Brake pads are cheap compared with engine rebuilds.
>>
>> My understanding is that engine brake does not destroy the engine. It does not involve friction.
> 
> It's news to me that engines are frictionless! (The braking effect is only partially due to engine friction - the pumping of the air is most of it. But the engine WEAR is due to friction.)
> 
>> Indeed Wikipedia agrees:
>> http://en.wikipedia.org/wiki/Engine_braking and even mentions "Engine braking is
>> a generally accepted practice and can help save wear on friction brakes".
> 
> Of course it saves wear on the brakes. The issue is do you prefer wear on your engine?
> 
> 
>>> 2. Using the engine as a brake can cause unburned gas to wash the oil off of the cylinder walls, resulting in excessive wear.
>>
>> [citation needed]
> 
> Mechanics at the dealer told me this. They had no reason to lie to me.

This absolutely true. About twenty years ago my friend's car broke down in a remote location. To bring the car to the nearest mechanic (2 or 3 kilometers), tied it to another car with a rope and used engine braking without ignition (engine was damaged) to prevent the spring effect. Result, pistons melted by excessive friction. This was due to the effect that Walter's mechanics clearly explained.

> 
> 
>>> 3. The engine is not designed to be a brake. Use the brakes. Brake pads are not precious :-)
>>
>> Engine brake is a natural artifact of its design. I don't think you can build an argument around "wasn't design to do that, so don't". Engine braking is a widespread and common technique.
> 
> I agree it is widespread and commonplace. That's why the mechanics felt it necessary to tell me not to do it. I was also told not to do it when I took two different courses in track driving - the Bob Bondurant and Skip Barber ones.
> 
> 
>> I use engine braking most of the time (I always drive manual so that's easy). Saves gas and I've never had a mechanic tell me "you better go easy with that engine brake, look at them cylinder walls!" My brake pads reach a state of immortality.
> 
> The object isn't to save brake pads, it's to reduce the wear and tear on your engine.
> 
> 

-- 
Jordi Sayol