Forgot your password?
typodupeerror

Comment: Re:backup for 911 (Score 1) 115

by geantvert (#48203965) Attached to: Software Glitch Caused 911 Outage For 11 Million People

This is a recording of Archangel calling 911:

Operator: What can I do for you?
Archangel: My friend ... he ... he has a cardiac arrest. I think he is dead.
Operator: Calm down! Go back to your friend and check that he is dead.
Archangel: Ok ... ... ... PAN ... ...
Archangel: I confirm! He is dead now.

Comment: Re:In time (Score 1) 164

by geantvert (#48194359) Attached to: Doctor Who To Teach Kids To Code

But seriously: Friends do not let friends write fortran.

I do not really agree with that. Fortran 90 and above is a nice language. The problem is people still using old and obsolete F77 features.

Of course, I would not recommand using Fortran 90 for anything else than numerical codes. If you have to manipulate multi-dimensionnal arrays, Fortran is the right language. This is where C/C++ clearly sucks.

Comment: Re:Start rant here (Score 3, Informative) 156

by geantvert (#48193453) Attached to: GNU Emacs 24.4 Released Today

Anarcobra description of what is happening is probably quite accurate (at least for some styles) but the problem is that he tries to give a complex interpretation to a simple behavior: What is actually happening in emacs is that everything is indented using spaces (of various numbers depending of the choosen style and context) and every sequence of 8 spaces (as controled by tab-width) is replaced by a TAB (unless indent-tabs-mode is nil).

If you wrongly believe that the indentation algorithm has rules to select spaces and tabs according to the current context then the behavior is likely to appear very strange. Most of the other editor I know also work using a similar approach except that their default tab width is smaller and their default indentation levels are choosen to match the tab width which gives the impression that everything is indented using TABs. Simply speaking, Emacs with a tab width of 2 or 4 will do exactly the same.

   

Comment: Re:Start rant here (Score 1) 156

by geantvert (#48193167) Attached to: GNU Emacs 24.4 Released Today

Emacs also allows you to add local configuration variable inside each file to customize its behavior.So if you do not want to change tab-width globally, just add the following to each C/C++ file indented using a tab-width of 4:

/* Local Variables: */ /* tab-width: 4 */ /* End: */

This works for almost all major modes using their respective comments

PS: Slashdot insists for removing newline from the code above. More exemples are in https://www.gnu.org/software/e...

Comment: Re:Start rant here (Score 1) 156

by geantvert (#48193125) Attached to: GNU Emacs 24.4 Released Today

It seems to me that using TAB to indent is always a bad idea except in language where they are strictly needed.

There are actually 2 ways to indent using TAB:
    (1) by giving each TAB a fixed width
    (2) by jumping to the next alignment column (as in libreoffice, word)

The second method makes sense for regular text using proportionnal fonts but not for code.

The first method is the most common and the reason why codes idented that way often look bad in emacs is because it interprets TAB as 8 spaces instead of 4 or 6. This can easily be fixed by setting the variable tab-width to the proper value

Unless you really care saving a few bytes per line of codes, I recommend disabling TAB globally in emacs with
(setq-default indent-tabs-mode nil)

Comment: Re:example from TFA. try it (Score 2) 239

by geantvert (#48118571) Attached to: Where Intel Processors Fail At Math (Again)

1.5707963267948966193 is rounded as 0x1.921FB54442D18p+0
Look what would happens with different roundings:

tan(0x1.921FB54442D17p+0) = + 0x1.9153D9443ED0Bp+51
tan(0x1.921FB54442D18p+0) = + 0x1.D02967C31CDB5p+53
tan(0x1.921FB54442D19p+0) = - 0x1.617A15494767Ap+52

Simply speaking, computing the TAN of 1.5707963267948966193 in double precision does not make sense.
That's a typical floating point precision.

Now, if you really want to discuss the precision of TAN, you should use 0x1.921FB54442D18p+0 or any other value with an exact double precision representation.
But even then, it does not really make sense to discuss the precision near special values such as PI/2 because the precision of your input data will be unrealiable around that number.

Comment: Re:Only CGI scripts affected? (Score 2) 399

by geantvert (#47987335) Attached to: Remote Exploit Vulnerability Found In Bash

Any setuid program that would call a bash script directly or indirectly could also be vulnerable.

I predict that in the following days hackers will find several ways to cause local privileges escalations by executing system bash scripts with customized environment variables. That could be as simple as configuring a hidden WiFi network with a customized ESSID.

 

Comment: Re:+-2000 deaths? (Score 2) 119

by geantvert (#47900933) Attached to: US Scientists Predict Long Battle Against Ebola

There is no such thing as nuclear cauterization except in movies and video games.
A nuclear attack in a densely populated area would just destroy the medical infrastruture and would create thousands or millions of survivors most of them affected by radiations and so with a weakened immune system. The pandemic would spread very fast.

Pause for storage relocation.

Working...