Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
6174
Dec 4, 2004

rotor posted:

hey whoa when did we get a 'fixed' tag? :krad:

http://forums.somethingawful.com/showthread.php?threadid=2809983

Adbot
ADBOT LOVES YOU

6174
Dec 4, 2004

tef posted:

It turns out I'm talking poo poo!

http://www.links.org/?p=327


So they fixed the code that added unitialised memory, by removing all calls that added things to the entropy pool.

What I find interesting from that links.org post is a lot of people are railing on Debian for not contributing the patch upstream, or at least asking upstream if it was an issue. Yet in the comments there is a link to a openssl-dev thread (http://marc.info/?t=114651088900003&r=1&w=2) where they did precisely that and no one mentioned it was a bad idea, and one of the responders, Ulf Möller (listed as a dev team member on http://openssl.org/about/) said he was in favor of removing the calls. Seems to me that at least some of the blame for this should be on OpenSSL.

6174
Dec 4, 2004

TSDK posted:

If you ask me, then the original OpenSSL devs are just as much to blame for that clusterfuck as the guy who put in an incorrect 'fix' for the problem.

It seems that in the comments to that links.org post that the OpenSSL devs are trying to cast all the blame on the Debian guy. Comments are things like "Oh he shouldn't have contacted openssl-dev (like most open source projects and the OpenSSL support page/README with the source says to), he should have contacted this obscure nowhere published address". And "The Debian guy's proposed patch was presented without context so that is why we said it was ok, but patches like this are so common that we have an FAQ (which may or may not have existed 2 years ago) to explicitly say patches of this kind are a bad idea, so it is really the Debian guy's fault for not scouring the mailing list archive looking for similar patches".

The more I read coming from the OpenSSL team the more blame I think they have. It's too bad all the coverage I've seen of this (/. etc) don't mention OpenSSL's culpability at all.

6174
Dec 4, 2004
Speaking of gotos, I ran across this today when diagnosing a crash.

code:
for i=0, nlay-1 do begin  
;  print,i
  j=-1  
  next1:  
;  print, i,j
  j=j+1  
  if(z(j) gt laybnd(0,i))then goto,next1  
  indbnd(0,i)=j  
  next2:  
  j=j+1  
  if(j eq nlev-1)then goto, bottom  
;  print, i,j,z(j),laybnd(1,i)
  if(z(j) gt laybnd(1,i))then goto,next2  
  indbnd(1,i)=j-1 
  goto,loop 
  bottom:  
  indbnd(1,i)=j 
  loop: 
endfor  
That is in IDL (a bastardized version of Fortran that kept all the bad parts and tacked on graphics), and yes IDL has the standard if/else conditionals and all the types of loops you could want.

6174
Dec 4, 2004

chips posted:

To contribute something other than my lovely code - the Fortran code I'm seeing as a vacation student in a physics department makes me cringe. Maybe I'm just too dumb to understand what the indecipherable variable names are for (given that all the code is in a single function anyway, all 12 pages or so), or understand the flow given the complete lack of comments.

Nope, that is how physicists program in Fortran. Most of the ones I've known see programing as that unfortunate necessity of doing research and therefore learn just enough to hack together spaghetti code and leave it at that.

One of my friends who is a physics grad student was handed a program by a professor written by the professor and told to set it up on a small cluster the university just bought. He was instructed that he was not allowed to make any changes, despite the fact that the program doesn't compile on the cluster due to different compilers. Yet he is still somehow supposed to make this work.

6174
Dec 4, 2004

tripwire posted:

God I hate hungarian notation. How in the hell did anyone ever think it was a smart idea :psyduck:

Maybe this is my own crackpot theory, but I blame Fortran.

First a brief history lesson. The oldest versions of the language didn't have a way to declare variables. In Fortran I (mid to late 1950s), you had 26 variables corresponding to the 26 letters of the alphabet. The type of the variable was determined based on the letter used. I, J, K, L, M, and N were integers, with all others floating point. In Fortran IV (early 1960s, standardized as Fortran 66), support was added for explicit type declaration. However it still supported implicit typing. If at the beginning of a subroutine you had "IMPLICIT INTEGER (I-N)", then you were saying that any variable starting with letters I-N was an integer. This led to conventions, particularly prevalent in Fortran IV and 77 code, that integers would be started with the letters I-N whether they were explicitly declared or not. My suspicion is that the older programmers, used to the old way of things, continued to prefix their variables, and they were likely also the ones to write documentation, and of course then newer programmers mimicked their style, keeping the tradition going. While I haven't seen it, based on my experience with old Fortran code and some documentation, I wouldn't be surprised to see a few paragraphs in old books recommending the practice of adding a letter to the variable name to make the code clearer.

Now we are too my crackpot theory. I believe that Charles Simonyi originally learned to program in Fortran and would have known all of the above, or at least enough of it to follow the practice of adding a prefix to a variable. This is reasonable because he worked at Xerox PARC from 1972-1981, according to Wikipedia. Fortran was one of the main languages of that era. I also believe that Simonyi carried this convention with him to Microsoft and the Excel team. Most likely after another programmer on one of the teams at Microsoft questioned Simonyi on his naming conventions, he became defensive (as programmers tend to be), and rationalized the whole system as a means to making code easier to read and using the convenient first name/last name switch of his native Hungary as the last piece in the puzzle.

6174
Dec 4, 2004

Plorkyeran posted:

That has no relation to reality at all.


Charles Simonyi's original paper proposed what is now know as "Apps Hungarian", which adds semantic information about how the variable is used. Even if you dislike the idea of this, it should be pretty obvious why someone would consider it a good idea. However, he unfortunately used the word "type" for this, which resulted in people misinterpreting what he meant, resulting in the awful "Systems Hungarian" used for all of the Win32 stuff.

Whether Simonyi's original paper proposed Apps Hungarian or Systems Hungarian neither proves nor refutes my potential theory (which I freely admit could be wrong). However, if you actually read what MSDN claims is a reprint of the paper, you'll see that in Table 4, is a listing of "common primitive types" which would now be known as Systems Hungarian. In fact the section of the Wikipedia article you blithely copied gives an example of a Systems Hungarian prefix as sz and states it is from the original paper (it is in Table 4). This suggests that the lack of clarity in his paper comes from more than just the usage of the word "type".

6174
Dec 4, 2004

zergstain posted:

Edit: Oh wait, a referrer check could stop that saving it to disk and editing it method. Probably wouldn't do anything for the use a Firefox extension and edit it in RAM method though.

Referrer checking in general belongs in this thread. It is easy to modify, Firefox extension or not, and many ad-blocking/virus scanning type programs strip the referrer. Putting any trust into it at all is a bad idea.

6174
Dec 4, 2004

royallthefourth posted:

Practical extrapolation and report language.

Unfortunately, that explanation was created long after Larry had been using the language.

If you're going to go for the false etymology, you might as well go for Pathologically Eclectic Rubbish Lister.

6174
Dec 4, 2004

RussianManiac posted:

apparently it is considered ok as you don't have to use goto and can use break in do and it only executes once.

You have no idea what a break really is, do you?

6174
Dec 4, 2004

king_kilr posted:

And you apparently don't understand the purpose of a syntax more expressive than asm.

In the context of a do {} while (false); a break is being used as a goto, and in reality is an unconditional jump (goto). Using syntax that disguises what you are doing is not more expressive.

Adbot
ADBOT LOVES YOU

6174
Dec 4, 2004

The Gripper posted:

I quite like that there's a discussion about something RMS said without assuming outright that he's a crazyman.

Speaking of crazy poo poo RMS says. He recently did an interview with the Linux Action Show podcast. In it he told one of the interviewers that it was ethically imperative for them to quit their job making non-Free software and go work in factory than it was to continue to provide for his family. Also Americans shouldn't have children because they will be wasteful. Blog post about it from said interviewer here.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply