I started learning Fortran in 1968, my first year at university studying electrical engineering. Walking around campus with stacks of cards was the top nerdy status symbol - other than drinking. A year later we headed to a lecture and found the TV set up in front showing the moon landing. No lecture that day as we watched the whole broadcast. And then we found out that the moon landing mission was written with Fortran. It put us all among the stars for that moment.
And you were a Super Nerd if you carried the long box of cards emblazoned with a Big Blue IBM logo. BTDT. 1969. But pity the poor schlub who tripped and spilled the box of cards which he had neglected to sequence.
Leant FORTRAN for my electrical/electronics engineering degree Down Under back in the 70’s. Used a stack of punch cards and handed them over to be executed. If one card was wrong, the execution was aborted and panic to fix the card, resubmit and hope that it would execute in term for handing in the assignment. Even then it was a cool language.
I thought it was coded with machine language program hardwired on the memory … I remember one guy told the story of debugging among the printed 1s and 0s
When I learned Fortan in the early '70s the university computer center was open 24/7. All the serious geek students would be there in the wee hours as early AM had the best turnaround time for card batches on the 360.
First programming language I learned many decades ago. Discovered I had a knack for it, diverted my studies from electronics to software. Was the beginning of a long and prosperous career. Very grateful for that course.
Took a much more circuitous route to software development, initially coding in Fortran for applications in architecture/urban planning, then computer mapping in urban/environmental planning eventually software development for all kinda clients.
I had 10 years of wonderful career as a SW engineer, till I moved to the management dark-side. (because there were no old software engineers in 1995 I assumed you had to move into management..... I didn't realise that it was just because the whole industry was only 20 years old). Management is not as much fun as being paid to write software.
my story almost exactly the same as well. really i learned basic first, pascal second, then had to take fortran as one of my first classes at college. at the same time i picked up hacking, learning C, and the rest was history!
This is the language that I got taught in my second semester of electrical engineering back in 2014, this is how I learned the fundamentals of programming and why it was so easy for me to grasp programming with newer languages now that I'm self learning to switch careers.
My dad was a convinced Fortran user for 30+ years. He did use it to perform FFTs on gigantic complex number matrices and solve huge complex differential equations for his job. They performed cutting-edge radar imagery with a language that was invented 50 years ago! At almost real time! Now he's happily retired and all i learned at uni is matlab and java :(
This is one of the key reasons Fortran is still around, I think. You could build your whole scientific career building on the programming you did at the start. You could keep adding to it, expanding the science and math and libraries from colleagues, add more modern features to the code, etc. You could add parallelism (with OpenMP and OpenACC and coarrays). You could just keep building and building and building applications to support the science. Your code ran fast, and as compilers and hardware improved, even your old code ran faster. There aren't a lot of programming environments where this could stay true for decades, and the careers of those that followed after you.
We just living in poisoned IT community, everyone tries to look smarter. I'm sick and tired of how is progressing IT in recent years. We hardly solve hard problems, but we talk about how we need clean code without comments inside, for stupid app of 10K lines of code, maybe less.
Punch cards had an 80 column limit, which is why many programmers still use the same limit in their text editors. The reason why we always use 'i' as the variable in a for loop also comes from Fortran. Because of the 80 character limit, code had to be as small as possible, and since 'i' was the first (implicit) integer available, that was used.
Statements were not limited to the length of a single line. FORTRAN had continuation capabilities (put any character other than blank or “0” in column 6) since the beginning.
I programmed in Fortran 77 back in the early 1980s. It was my favorite language until I got a job programming in C. I still have fond memories of my days with Fortran on a DEC VAX 11/780.
I dig out a few days ago from trash bin book called "Numerical Recipes Fortran" published by Cambridge Press from 1989 - it is based on Fortran 77. I'm reading it just 4fun and i'm quite shocked how clean and simple this language is.
Fortran was my first language. One correction, programmers wrote their code out on paper. Data entry operators then typed it onto punch cards. Loved this by-the-way, brought back so many memories.
My first code I wrote on paper (not coding sheets) then took cards and marked the numbers/columns to be punched out using a soft (b2) pencil. These cards were then passed through a mark sense punch.
My professor for the numerical methods from ChemE class also had a big fondness for fortran, however he would often say that “It would be against geneva conventions if I make you learn fortran instead of excel/vba/matlab these days”
@@stephenlee5929a lot of times, ESP on big decks of cards, we would mark the deck with a magic marker amd make a diagonal line on the decks. This way we could visually see if the deck was mixed up and could easily put it back together. It required no special equipment othe than your eyes
It is also a full OOP language. Classes, whole array operations and operator overloading are among the most favorite features of Fortran. [For negative responders: criticizing older versions such as FORTRAN 77, is the equivalent of criticizing pre-ANSI C, which is not quite normal. Do not criticize unless you know what you are talking about: just check the features of the latest version of the language: Fortran 2018. Computer scientists and electrical engineers were never taught (modern) Fortran; Fortran was used mainly by mechanical and aerospace engineers. That's the only reason that you do not know it. Fortran is best for a single thing: fast calculations, nothing more.]
Only for later versions of Fortran. Scientific computing still uses Fortran77 a lot. Edit in response to the edit of the original comment: This comment was not a criticism nor a negative response, and I do know about the decent features of Fortran 2003 and forth. I do love them, but in practice I don't get to use them because nobody in my field uses those. The sole reason I had to mention Fortran77 is that it is still being used very widely in some fields, and might give people the wrong impression (who might have to work on F77 someday) that Fortran of any version being used is OOP. Also, comparing Fortran77 (still used widely) to pre-ANSI C (rarely used unless you have ancient computer) is somewhat ridiculous, and your overall attitude in your edit is unnecessarily hostile and assumes a lot about the comments.
@@arduous222 wow, it wasn't quite that bad, but the chemical physics codebase I used to develop in was nearly all F90/F95 so no OOP to speak of. I'm so glad I got to help rewrite that package in C++ later on...
Fortran was invented at least 30-40 years before OOP was even on anyone's mind. It's complete bullcrap calling it a full OOP language. It's a later add-on and no one who actually use Fortran cares about it or OOP in general. It's like when an 80 year old grandpa tries to wear denims and leather jackets to look cool. It's just embarassing for everyone involved.
@@lightningblender C, despite its age, is still a very good language to learn, especially in university, because it forces you to get a better understanding of how things like memory management work at a lower level, whereas other languages like Java and Python abstract a lot of that away.
As someone who has actually had to use Fortran for physics research, I appreciate this greatly. It's old, weird, and creaky, but at least it has a relatively small keyword list and none of those obnoxious semicolons.
Wow, can I ask you a question? Do you use it in simulations? Why don't you use C or C++ , is the difference in performance and speed so huge to not use C/C ++.
Man, this brings back memories. I had an Apple II - after I got tired of my Radio Shack TRS-80. I just did BASIC on those, though, taking my high school’s very early computer science class. I didn’t learn FORTRAN until college. We spent a lot of hours in the engineering computer labs working on our programs. I’d bring my coffeemaker with me and we’d sit at those computers until the middle of the night. The world sure has changed in 40 years. Now, we carry our computers with us everywhere and use them to order coffee...
I am retired from an Aerospace company, and back in the early 80's I was as assigned to JPL (Jet Propulsion Lab) and the ground software was all written in VAX/VMS FORTRAN. I spent 14 years working there mostly in FORTRAN then in Ada (an ungodly language). Other programmers wanted to work in c and c++, but when layoffs hit, they kept us FORTRAN people because no one else wanted to do it.
I was brought up on 8 and 16 bit Assemblers, PASCAL, BASIC, FORTRAN and PLM (+ the crimes against humanity that are COBOL and LISP), consequently I despise c and c++ they have no practical advantages for competent engineers who know their job and want to write efficient code. Not that I am biased in any way OFC
I worked at GE Aerospace and programmed also in VAX/VMS FORTRAN. One unit I worked in that had more hardcore software programmers working on a project used Ada - but I never had the pleasure.
I took a FORTRAN class in college in the 90's. Even back then my professor asked "Why are you here?" He knew FORTRAN from when it was necessary, and he wanted us to use things that were more modern.
For whatever reason, the state unemployment system where I live still uses fortran. When the pandemic started this was a problem since it wasn't designed to handle the volume of applicants. What did they do? They begged for retired developers to come work FOR FREE and fix it. Insisting that modern developers would never be able to understand Fortran lmao. Based on this video, I'm pretty sure you could have a modern C programmer figure out fortran in a shortish amount of time. But they knew what they were doing, they got the free labor lol
Yes, more please. Modern languages owe a lot more to FORTRAN than it's given credit for. A fun one is in the development of those optimising compilers you mentioned, where trying to develop a good FORTRAN compiler led to all sorts of ways to design better languages.
I'm a Mechanical Engineering undergrad currently. I know my way around C, C++, VBA and Python to get some basic calculations. Recently I have joined my professor's research in finite element solid mechanics. He uses a program he and his students have written over the years, and it's written in Fortran for maximum performance. I'm going to have to learn Fortran to help him with the research. I'm very excited :D
I programmed Fortran on VAX/VMS many years ago and we did verify the assembly code generated (Aircraft Industry). Sometimes we coded directly in assembler. We did some tests and came to the conclusion that you only gained about 6% - 10% performance by coding assembly code directly vs in Fortran. It was so optimized.
Nevertheless, one of my work colleagues decided that the VMS Fortran compiler was not efficient enough, do he spent two years writing his own. Meanwhile, the rest of us had finished the project that he was supposed to be working with us on.😂
No, it's more the reverse. You could not do much more than in assembler. As less complexity you can handle, as less need or possibility is there to optimize anything. A foreach-loop you can optimize (to a for loop) , a for loop you cannot.
Many of python's most popular machine learning/artificial intelligence/scientfic computing libraries rely on Fortran code, Also the current standard is actually Fortran 2018, And there are two great compilers currently in the works, the official LLVM one named Flang, And another one named LFortran which aims to execute Fortran code interactively as well as being able to compile it.
@@monochr0m cause Fortran is fast for numerical operations. It used to be even faster on array operation than C before C added restrict keyword that disable aliasing. The reason why it's so fast is because when it was invented when many scientist believed that compilers produced slower code than manually written assembly code. So the compiler had to produce very optimized code in order to prove itself.
Wow, does this bring back memories. We had Fortran training in high school in the mid-70's, thanks to equipment donations and computer time donated by a major chemical manufacturer in our town. We had keypunch machines installed in the classroom, the card batches would be sent over to the manufacturer's computer center at night, and we would have the runs of our programs back in the morning.
The comments full of people learning fortran in the 60s and I just started getting a hold of it 2 years ago when I started my PhD in theoretical physics. :D it is still there and I also admire it.
This is a very good overview of Fortran. I was one of those average humans. I worked at AERE Harwell in the early 70's and saw the transition from punched cards, paper tape and teletypes to Visual Display Units (VDU). With punched cards the program turnaround time from punching the cards to getting your results returned was three days. So I was explaining to my son that you couldn't really build a spreadsheet app in the days of punched cards. Imagine - change the contents of cell C3 and wait for a few days to get the results :) On the other hand, calculating the Swarzchild radius of a black hole was a cinch.
I worked as a professional Fortran programmer from 2015 to early 2019 and I really loved the language. We used the Fortran 90/95 standard and the code was quite modularized and clear. We also used some 2003 features. The original code was from the mid 90's, but we were allowed to use modern features. The code was very easy to follow, not like people would think a Fortran program looks like. I've seen ancient F77 code that is a pain to read, but I've also seen C and C++ code that was way uglier than a well designed F90 program. I work as a strictly C++ developer now, and I've seen some ugly C++ code. I guess it's just a matter of who is the developer more than the language used. Fortran 2003 is a very nice language to use, but as its origin is so old and it's used for high speed computations so it's very different to modern languages. I really enjoyed working with Fortran, and besides that, it was the first programming language I learned at university.
@@wach9191 Atmospheric simulation models, computational fluid dynamics, mechanical stress finite difference package, aircraft performance models. Things that work, need to compute fast, and should not be messed with. If you do not know where it is used, that probably means that you are not among those who know how to use it.
@@wach9191 I've used it mostly for computational fluid dynamics, finite element method and weird math involving very large matrices but with simple computations.
Modern Fortran is by far the best choice for number crunching. We use it all the time because it is light weight, simple, clean, and sometimes even faster than C (especially if you know how to code efficiently, and how arrays are handled in Fortran). Not to mention that Coarray Fortran allows us to program to run scripts in parallel.
I was hoping someone would mention the parallelism in Fortran. It's a relatively recent addition, but one many other - even more "modern" - languages lack. And most languages that do have it make it awkward to use. (I always liked how easy and natural parallel processing is in bash.) The video didn't mention it, maybe because most existing Fortran codebases don't support it, but I think it should have been mentioned anyway.
I started engineering school in 1972. FORTRAN IV was my first exposure to high level programming. It ran on the university’s DEC PDP10. It’s still a pretty friendly language.
Architecture 1971, Fortran 4 too. Felt really proud/smart learning it as a non-CS student ‘til this video… ONLY 100s to cover all aspects of the language. 😀
Had to use it for a scientific computing module before. It may be old but it has a solid foundation, and has nice features for working with arrays, which is what makes it great for linear algebra. It's quite simple too with not a lot of keywords. Overall I liked it, but don't have much use for it outside of that niche.
@@Lucretia9000 it has whole array arithmetic, so if you wanted to multiply two 2D arrays element-wise, instead of having do i=1,n do j=1,n a(i, j) = b(i, j) * c(i, j) end do end do You can write a = b * c This means in a lot of cases, the code you write looks like the math you want to implement, hence the name formula translator.
@@fionnbracken IMHO, this is not a good reason to choose FORTRAN over c++, where you can do the exact same thing syntactically with operator overloading, and for which off the shelf libraries already exist that do this.
@@eventhisidistaken sure, but that's just adding complexity, with fortran it's built right into the language, no effort required. In general, c++ is a lot more complex, which means it can useful for more things. But for linear algebra, fortran's simplicity is a nice feature.
@@fionnbracken If you're multiplying matrices, you are probably also in need of a full up linear algebra package. At that point a library is a library whether in c or fortran. c++ is only more complex, if you're a fortran programmer who never learned it. FORTRAN was complex when you first learned it too.
If you wanted to obtain a result from a subroutine, you need to specify the "intent" of the variable you declare. So, for instance, if you wanted to pass two integers and return their sum, you could have something like, subroutine addition(sum, a, b) implicit none integer, intent(in) :: a, b integer, intent(out) :: sum sum = a + b end subroutine Then, if you can call that subroutine in your program as, program myMath implicit none integer :: sum call addition(sum,1,2) end program myMath and it will set the variable "sum" equal to 3.
Why do you need the word “call”? Why not just have that line as addition(sum, 1, 2) as in other languages? Because there are no reserved words in FORTRAN!
@@ruther4336 to add a bit more information, you don't need to add intent to your variables, but if you *do*, the compiler can perform a bit of checking to ensure that you're not using the variable in an unexpected way. It'll complain if you define a variable as intent(in) but modify it in the subroutine.
latt.qcd92 He said that the subroutine does not "return" a value (instead modifies the passed argument) which is correct. He's aware of the intent attribute as in his example the parameter had intent (inout) meaning it already has a value and can be modified. IMO the addition is a bad example for using subroutines as a pure function is much better suited for this purpose.
@@lawrencedoliveiro9104 Because using CALL is the mark of a subroutine, while not having CALL means this is a function, which returns on its own name, just like "COS(argument)". In Fortran, "addition(sum,1,2)" means that you are not doing anything with the value returned.
Good memories. I never used it in the real world but I took a couple of Fortran classes in college and really enjoyed them. The computer lab was open 24x7 and I usually went around midnight when it was mostly empty to do my programming. The good ol' days.
I learned more about FORTRAN in 100 seconds than I learned in a semester from an engineering professor. I subsequently learned C from a computer science class and programming made sense thereafter.
One card represents 1 line of code. WOW. Programmers back then must be so sharp in thinking and seeing. They cant afford mistakes after punching 100 cards.
I suppose you would first write out your entire program in a lab notebook that belonged to the company back in those days. Probably got a senior colleague to review it before punching the cards.
Great video! I’m working with a group of researchers modeling heat transfer and fluid flow. All of our codes are FORTRAN codes, so it was nice to see this one come up. It’s not the most modern or practical language by any means, but man is it computationally powerful.
@@abdjahdoiahdoai Plain "C" would be a smarter idea ;-) * Julia needs a VM - RAM and CPU cycles wasted on a weak hardware. * C++ has OOP - potential RAM and CPU cycles wasted on a weak hardware.
@@abdjahdoiahdoai two more reasons to use Fortran: it's *very* easy to work with multidimensional arrays, and if you're using Fortran you probably have a legacy application with 30, 40, or even 50 years of development behind it. Writing that from scratch in a more modern language is not feasible (and with recent Fortran versions, not really needed).
Python has the NumPy engine for operating efficiently on large multidimensional arrays, including sparse ones. With custom operator overloads, you can express complex manipulations in a single line of code.
@@JamesThunes basically this. This code has been developed over the last 30 years and has had extensive verification with experimental results from not only the literature, but also production manufacturing use. Since this is a coupled heat transfer and fluid flow code, multidimensional arrays are the norm, rather than the exception.
I learned Basic in 1970 and Fortran in 1971...formed the basis for a lifetime. I ended up a Finite Element Stress analysis using Nastran and Patran (Abacus etc) building models with Vax 8800 clusters and running programs on a Cray YMP-28 but never forgot those early years with paper tape and cards. Those were exciting times!
He is not joking when he says that FORTRAN fuels science. Most of our most important codes are writen in FORTRAN, with GOTO instead of DO loops and all that jazz. That is why we still teach that to new people in the field in 2022.
As a data science enthusiast that deals with R on a daily basis, we need a Fortran compiler installed on the environment to install some packages that are compiled from source, like randomForest.
0:03 Correction: Fortran is the first commercially-used high-level programming language, not the first ever high-level programming language to be designed for a digital computer. It was Plankalkül, developed by Konrad Zuse in 1942-1945. The world was fighting at that time, and the implementation of the programming language idea flopped, making it remain only on paper.
Brings back memories! Back in the 80s I got a Sharp MZ80k which had loadable operating systems on cassette tapes. I had tapes for BASIC, FORTH and FORTRAN. It was so cool to learn those different languages. And I became a developer after finishing high school.
Fortran was my second computer language. The first was Easycoder for the Honeywell H200 mainframe. I started working for Honeywell back in '65 as a field engineer. I taught myself Fortran out of curiousity. Wondered how a computer without floating point number capability could do floating point arithmetic. Wrote a mortgage amortization program to test out the idea. It worked and has served me well over the years.
Yeah, duplicated Weizenbaum's Eliza on several machines. That is why the whole ChatGPT banter (by casual users) brings a smile to my face about Weizenbaum's admonishment.
I started my career as a professional programmer with Fortran 77. At Uni I had done most of my programming in (Turbo)Pascal, switching to Fortran 77 was a big step backwards. I have never learned to love it.
Hello, in 1980 I worked in the Data Processing Center of a University that had a wonderful Digital Computer DEC 10, with roll tapes. I programmed in FORTRAN, the System was Administrative, of Academic Control, imagine. I already had a Teletype (TTY) keyboard that printed directly onto 132-column paper and a monochrome video monitor. I saw the girls typing some programs on punched cards, it was a huge noise. Greetings from that era. Health.
As I remember, in 1971 the PDP 10 had a paper tape reader that was mainly used to boot up the machine. It had those very quirky DEC-tapes that we used only for backup. We had "normal" 1600 bpi tapes for data. Our TTY also came with a paper tape punch/reader that we never used.
ahhh, a quick trip down memory lane! I'd forgotten about default integers i,- n. At least when I was learning F77 it had a passing similarity to the BASIC that we all learned at school.
I learnt Fortran 77 at uni a few years back. My dad, who studied comp sci in the 80s, also learned Fortran 77. When asked why we still use it, the lecturer said it compiles extremely efficiently compared to other languages. I actually rather liked it as a language, though I was unable to get a compiler working on my own machine once the course was over and have since not used it for some years. (though I do believe I still have the code I wrote)
I learned it from a book called “The Compleat Cybernaut”. The bio said the author was working in some city (might have been Liverpool) as a blacksmith. She must have led an interesting life ... I devoured that book over a weekend. But in those days, I had no access to an actual computer -- not for another three years.
Thx for this trip down memory lane…wrote my first program for IBM360@UCSC in ‘74. It was for hyperbolic functions describing Laminar Shear trajectories on a Lifting Body
My father said he was programming in Fortran for 15 years before he truly understood it, and for 25 before he truly saw the beauty of it. You can thank him for the fact that your electric clocks all run on time.
This video brings memories of sheer pain and joy at the same time. I started programming with Fortran95 in 2014, it was a necessary module for my Theoretical Physics degree. This was the hardest part of that whole degree, it almost made me cry on daily basis. Errors made very little sense, language was old, any material worth reading was pre-1990s, and asking for help online was almost pointless. It almost made me quit physics and programming. Almost 8 years later now, and I work as a software developer. Fortran 95 made me learn the fundamentals of programming in such a difficult way, that no coding related task has ever felt difficult since. I am almost grateful to this language.
Fortran is still extensively used in scientific computations. Many, if not most, high performance, massive scientific simulations are in Fortran to this day.
Ahhh! Such memories. My dad was the Head of the Computer Department of a major governmental body in the 1960's. He taught me binary numbers when I was 6 and how to program in Fortran when I was 10.
Love these short explainers. Not enough information to get good at the language, but enough to destigmatize people who are scared of "more difficult" development.
I had a high school friend who is an engineer now. He works for this company and I remember he told me that they started back on the 80s and the entire core of their system still runs or Fortran. It's like COBOL, old but still reliable.
Was waiting for this one, thanks!!! Out of curiosity, the latest Fortran standard is 2018, which introduced a lot of OOP related stuff, so grandpa can still pack a mighty punch! It's also pretty good at gpu computing, interfacing well with CUDA and openacc, so i recommend giving it a try if you're trying to code a fast numerical kernel :)
Ah yes! Probably a similar trajectory that I had: Basic -> Pascal -> COBOL -> IEF -> Visual Basic -> Delphi -> REXX -> C++ -> Python. So many similar structures. You might be interested in knowing that Delphi could have easily been named "Visual Pascal," because that was the language used in it!
Wow. I typed a few thousand lines of my own FORTRAN 77 and WATFIV code on IBM 029 keypunches (and, for a very short time, with a line editor from a terminal) starting in 1978. This video did a remarkable job of covering the language, including features that didn't exist in FORTRAN IV, FORTRAN 77, or WATFIV. And yes, my jobs were submitted to a mainframe that filled a raised-floor, Halon extinguisher protected, heavily cooled room and included two or three 60 MB hard disk drives each the size of a top-loading washing machine, as well as nine-track tape drives straight out of 1960s science fiction movies. Ironically, I could have watched this video on a belt-clip portable computing device with thousands of times the data storage and computing capability of that (even then) outmoded IBM 370 (though instead of my Pixel 7, I watched it on my home-built, Linux operated desktop computer). I think it got lost/tossed in my last move, but I used to have a pin-feed paper print of the FORTRAN source code for the original Colossal Cave Adventure game, the grandfather of Zork! and all those other text command adventures that were so big before computer graphics got good enough and fast enough to play in video.
Fortran was the "Spreadsheet" of the 60's, 70's and into the 80's. Lotus 123 wasn't out yet nor was Excel. In the beginning Fortran was limited to only 76 Characters (the last 4 positions on the Punch Card was for the sequence number, to sort the deck if you dropped it). Between Fortan, BAL and COBOL there was much that couldn't be done in Data Processing in the "Old Days". Fortan is how we got a man on the moon.
When I learned Fortran 66 in college in the 70s columns 1-5 were for line numbers (labels), column 6 if non-blank meant this card was a continuation of the last card, code was in columns 7 - 72, and columns 73 through 80 were an optional sequence counter for the card sorter. Also, a "C" in column 1 meant that the card was a comment card.
@@The_Oldguy Yep...... had a crack at PL1, ALGOL and even LISP at University. But somehow Fortran just seems cleaner. That might just be because I made a good living out of it for 12 years.
I learned Fortran, then Cobol, at uni back in the early 80's. I don't miss the noise those punched-card machines made! It was the "done thing" to shuffle your classmates program deck before it was compiled - just because we were like that ;-) Now my kids can't understand how we used to have to book "computer time" in advance to compile/run our programming assignments.
Loved this video. I started with fortran on an IBM1130 in 1969. Still do software for myself in 2024 but have moved from fortran. Considered doing it again a few years ago but never did. How things have changed! I am suspicious that the rate of change is even accelerating now. Strange that change is the only constant! Tony
I work a lot with a Fortran 77 code. It's absolutely a mess of a program, almost impossible to debug with GO TO statements all over the place. But I highly respect the people who made science work before out modern software tools were invented.
GOTO statements and 6 empty spaces (or line numbers) are painful, but Fortran 77 has some sort of beauty in it. Looking at a single .for file containing 10K lines to be compiled with a single fort77 command will convince you that they should be preserved as UNESCO Memory of the World.
@@arduous222 I often found fixed format fortran code to be incredibly convenient, especially if you are using vim. In other modern IDE's however, this is horrifying.
I have been using ForTran for software development for 50+ years. I worked for IBM for 20+ years and met John Backus at the IBM Almaden lab in California in the 80s. I was able to run M.S. ForTran 5.0 compiler on a personal IBM PC-Jr. in 1980s. I currently use the P.G. Fortran compiler on a Windows XP system compiling applications for both 32 and 64 bit systems.
Punched cards where 1960s, the 70s was the era of the VDU (Visual Display Unit) and the widespread adoptionof top loader hard disks and reel to reel tape. Fortran has some maths capabilities that makes it hard to beat and the compiled code is generally way more optimised and faster than C or Pascal.
teachers are paid even if you are watching them even if you are not watching them. UA-camrs and instructors of online platforms needs to make things interesting to make you watch the next video or course
That's what the very first models came with, but that was quickly changed to 16K. By the time of the FORTRAN compiler (which had the same requirements and ran under the UCSD Pascal system), you needed a "full" 64K to compile it.
Aprendí a usar Fortran 4 en 1973, y en realidad en México era muy difícil encontrar equipos que lo pudieran aplicar. Yo era estudiante de ingeniería civil. Fué en realidad uno de mis primeros encuentros con los programas de computación. Nada comparado con lo que ahora existe, pero así son los inicios. Me gustó encontrar esta información. Gracias.
My mom got her start in the computer industry in the 1970s as a keypunch operator punching in Fortran code. She learned enough from punching the cards in to actually write code herself and after a few years she learned COBOL and became even more valuable. I followed in her footsteps and worked as a programmer for well over 20 years.
How interesting, I have just recently taken an interest in Fortan and installed the compiler on my linux box and wrote my first hello world program. Would love to see a longer length tutorial video. Very cool. 👍🏼
Brings back memories for me. Learned Fortran 77 in college, but never used it for anything. Ended up becoming an advanced programmer in TurboPascal instead. Stopped programming just as C language came out.
I have the original Microsoft Fortran for CP/M on an 8" floppy disk. I wrote the world's first high-resolution mapping package running on a CP/M computer that utilized a pre-processed version of the CIA's World Data Base II containing outlines of the World's landforms, and political boundaries at about one point every 300 meters. I got this entire database to fit on my microcomputer and created high-resolution maps of marine mammal population densities around the world. The program was called AMP - A Mapping Package, and, originally I wrote it in Fortran and Cyber 750 assembler. It was a program in use at the University of Washington for about 7 years.
Yes, definitely my favourite programming language...... to foooken hate man! Was forced to learn this in my engineering days. Mostly I hate it as it was the 2nd language I learned coming from C and it made me feel dumb...
I programmed in Fortran 77 and 95 between 2003-06 as a graduate developing simulation software for a defence company. I was an Engineering graduate with no prior programming experience besides some Excel VBA and got right into it converting algorithms developed in MathCAD into functioning Fortran code - good times! I remember thinking even at the time that Fortran was dated, amazing people are still talking about it and using it a further 20 years later! It was the right language for the type of work we were doing.
I appreciate it. A lot of people seem to forget that fortran ist still actively used and developed. I was teached to program in Fortran just a few years ago since it's still the most efficient language for math heavy programs. Fortran is a bit clunky, but I appreciate the neat code.
In a "comparative Languages-CS310" back in 1980 fortran IV and fortran 77 were two of the languages we had to write the same program in. The fortran IV card deck was over a box (1000 cards) , but 77 had recursion, so it was under 100 cards.
The charm of those old mysterious expertise my generation can be proud of! Useless but gratifying. For example, I can: - code in Fortran (and Cobol, PL/1...) - navigate with a sextant - calculate with a slide rule - shift gears manually (car, bicycle, and motorcycle). Still do I! ...
I started learning Fortran in 1968, my first year at university studying electrical engineering. Walking around campus with stacks of cards was the top nerdy status symbol - other than drinking. A year later we headed to a lecture and found the TV set up in front showing the moon landing. No lecture that day as we watched the whole broadcast. And then we found out that the moon landing mission was written with Fortran. It put us all among the stars for that moment.
And you were a Super Nerd if you carried the long box of cards emblazoned with a Big Blue IBM logo. BTDT. 1969. But pity the poor schlub who tripped and spilled the box of cards which he had neglected to sequence.
I first started learning Fortran in 2011, my first year at university
Leant FORTRAN for my electrical/electronics engineering degree Down Under back in the 70’s. Used a stack of punch cards and handed them over to be executed. If one card was wrong, the execution was aborted and panic to fix the card, resubmit and hope that it would execute in term for handing in the assignment. Even then it was a cool language.
I thought it was coded with machine language program hardwired on the memory … I remember one guy told the story of debugging among the printed 1s and 0s
And a big stack of fan folded green bar.
I was not expecting the code to be so clean and simple.
Fortran 95 is highly different from older standards.
Hello fellow Brazilian.
It’s awesome
@@saulaxel Then again, Fortran77 isn't that awful to look at, except for that 72 character limits.
edit: 80->72, thanks to Vincent Goudreault
I wish RPG II and III look as good
When I learned Fortan in the early '70s the university computer center was open 24/7. All the serious geek students would be there in the wee hours as early AM had the best turnaround time for card batches on the 360.
I started a comp sci degree in 1980 and was taught Fortran, Cobol and Assembly Language. Later we turned to Pascal. Never learned C or C++.
First programming language I learned many decades ago. Discovered I had a knack for it, diverted my studies from electronics to software. Was the beginning of a long and prosperous career. Very grateful for that course.
Mostly the same here. After I took a Fortran 4 course I switched from math to computer science.
Took a much more circuitous route to software development, initially coding in Fortran for applications in architecture/urban planning, then computer mapping in urban/environmental planning eventually software development for all kinda clients.
The same thing happened for me, except I came from chemistry to computers.
I had 10 years of wonderful career as a SW engineer, till I moved to the management dark-side. (because there were no old software engineers in 1995 I assumed you had to move into management..... I didn't realise that it was just because the whole industry was only 20 years old). Management is not as much fun as being paid to write software.
my story almost exactly the same as well. really i learned basic first, pascal second, then had to take fortran as one of my first classes at college. at the same time i picked up hacking, learning C, and the rest was history!
This is the language that I got taught in my second semester of electrical engineering back in 2014, this is how I learned the fundamentals of programming and why it was so easy for me to grasp programming with newer languages now that I'm self learning to switch careers.
Same here but physics
Cool to see Fireship showcasing the hot new technologies. Surely this one will blow up soon
Sub to Ancrobot if u like fireship's edits
LOL
I have no doubt.
well in case of a nuclear winter we will go back to origins, so indeed it will be popular again
where the punch cards at
My dad was a convinced Fortran user for 30+ years. He did use it to perform FFTs on gigantic complex number matrices and solve huge complex differential equations for his job. They performed cutting-edge radar imagery with a language that was invented 50 years ago! At almost real time!
Now he's happily retired and all i learned at uni is matlab and java :(
This is one of the key reasons Fortran is still around, I think. You could build your whole scientific career building on the programming you did at the start. You could keep adding to it, expanding the science and math and libraries from colleagues, add more modern features to the code, etc. You could add parallelism (with OpenMP and OpenACC and coarrays). You could just keep building and building and building applications to support the science.
Your code ran fast, and as compilers and hardware improved, even your old code ran faster.
There aren't a lot of programming environments where this could stay true for decades, and the careers of those that followed after you.
That was my dad also, but with sonar.
That sounds like a use case that would be sped up a lot with gpu acceleration.
true, you can also use GPU acceleration with fortran. I did this in my thesis in mechanical engineering
We just living in poisoned IT community, everyone tries to look smarter. I'm sick and tired of how is progressing IT in recent years. We hardly solve hard problems, but we talk about how we need clean code without comments inside, for stupid app of 10K lines of code, maybe less.
Punch cards had an 80 column limit, which is why many programmers still use the same limit in their text editors.
The reason why we always use 'i' as the variable in a for loop also comes from Fortran. Because of the 80 character limit, code had to be as small as possible, and since 'i' was the first (implicit) integer available, that was used.
Interesting, I thought it was from summation notation in math
I didn't know that, thanks
Doesn’t the namesake of i variable come from “iterator” or “index”?
Statements were not limited to the length of a single line. FORTRAN had continuation capabilities (put any character other than blank or “0” in column 6) since the beginning.
@@apuji7555 that’s where the implicit int came from, probably.
I programmed in Fortran 77 back in the early 1980s. It was my favorite language until I got a job programming in C. I still have fond memories of my days with Fortran on a DEC VAX 11/780.
I dig out a few days ago from trash bin book called "Numerical Recipes Fortran" published by Cambridge Press from 1989 - it is based on Fortran 77. I'm reading it just 4fun and i'm quite shocked how clean and simple this language is.
Loved those keyboards. Fortan 77 = Newton Rapson ugg. So much torture in 1986. Not many fond memories. BSEE.
I had a course in Fortran 77 at college in the early 80s also, and we used the 11/780.
Fortran was my first language. One correction, programmers wrote their code out on paper. Data entry operators then typed it onto punch cards. Loved this by-the-way, brought back so many memories.
Well I guess I was both a programmer and a data entry operator. I wrote code on paper and then went down to the basement to type it onto cards.
My first code I wrote on paper (not coding sheets) then took cards and marked the numbers/columns to be punched out using a soft (b2) pencil.
These cards were then passed through a mark sense punch.
And we did desk checking
My professor for the numerical methods from ChemE class also had a big fondness for fortran, however he would often say that “It would be against geneva conventions if I make you learn fortran instead of excel/vba/matlab these days”
@@stephenlee5929a lot of times, ESP on big decks of cards, we would mark the deck with a magic marker amd make a diagonal line on the decks. This way we could visually see if the deck was mixed up and could easily put it back together. It required no special equipment othe than your eyes
It is also a full OOP language. Classes, whole array operations and operator overloading are among the most favorite features of Fortran. [For negative responders: criticizing older versions such as FORTRAN 77, is the equivalent of criticizing pre-ANSI C, which is not quite normal. Do not criticize unless you know what you are talking about: just check the features of the latest version of the language: Fortran 2018. Computer scientists and electrical engineers were never taught (modern) Fortran; Fortran was used mainly by mechanical and aerospace engineers. That's the only reason that you do not know it. Fortran is best for a single thing: fast calculations, nothing more.]
true, and in some aspects of its OOP it's actually more flexible than C++
Only for later versions of Fortran. Scientific computing still uses Fortran77 a lot.
Edit in response to the edit of the original comment: This comment was not a criticism nor a negative response, and I do know about the decent features of Fortran 2003 and forth. I do love them, but in practice I don't get to use them because nobody in my field uses those. The sole reason I had to mention Fortran77 is that it is still being used very widely in some fields, and might give people the wrong impression (who might have to work on F77 someday) that Fortran of any version being used is OOP. Also, comparing Fortran77 (still used widely) to pre-ANSI C (rarely used unless you have ancient computer) is somewhat ridiculous, and your overall attitude in your edit is unnecessarily hostile and assumes a lot about the comments.
@@arduous222 wow, it wasn't quite that bad, but the chemical physics codebase I used to develop in was nearly all F90/F95 so no OOP to speak of. I'm so glad I got to help rewrite that package in C++ later on...
@@failgun Maybe astrophysicists are a bit more conservative (or lazy).
Fortran was invented at least 30-40 years before OOP was even on anyone's mind. It's complete bullcrap calling it a full OOP language. It's a later add-on and no one who actually use Fortran cares about it or OOP in general. It's like when an 80 year old grandpa tries to wear denims and leather jackets to look cool. It's just embarassing for everyone involved.
Definitely did not expect this one. Gave me flashbacks to my first year scientific computing class, where I had to code everything in Fortran
oh wow which year was it? do they still use that??
I‘m from Germany btw and we were taught C in my 2nd year.
@Neo JF relatively not a backward country I guess but its great to learn this too!
@@lightningblender C, despite its age, is still a very good language to learn, especially in university, because it forces you to get a better understanding of how things like memory management work at a lower level, whereas other languages like Java and Python abstract a lot of that away.
I took a “computational physics” class where we used Fortran. In 2016.
As someone who has actually had to use Fortran for physics research, I appreciate this greatly. It's old, weird, and creaky, but at least it has a relatively small keyword list and none of those obnoxious semicolons.
Wow, can I ask you a question?
Do you use it in simulations? Why don't you use C or C++ , is the difference in performance and speed so huge to not use C/C ++.
@@mememyself4793 arrays are a bit more easy to work with in Fortran. And scientific computing is mostly array stuff
@@quettle huh that’s actually quite interesting
Have you tried Julia tho
@@quettle thank you for the reply.
So it's about easiness, arrays and the absence of semicolons. I got it now, thank you.
Man, this brings back memories. I had an Apple II - after I got tired of my Radio Shack TRS-80. I just did BASIC on those, though, taking my high school’s very early computer science class. I didn’t learn FORTRAN until college. We spent a lot of hours in the engineering computer labs working on our programs. I’d bring my coffeemaker with me and we’d sit at those computers until the middle of the night. The world sure has changed in 40 years. Now, we carry our computers with us everywhere and use them to order coffee...
I am retired from an Aerospace company, and back in the early 80's I was as assigned to JPL (Jet Propulsion Lab) and the ground software was all written in VAX/VMS FORTRAN. I spent 14 years working there mostly in FORTRAN then in Ada (an ungodly language). Other programmers wanted to work in c and c++, but when layoffs hit, they kept us FORTRAN people because no one else wanted to do it.
I was brought up on 8 and 16 bit Assemblers, PASCAL, BASIC, FORTRAN and PLM (+ the crimes against humanity that are COBOL and LISP), consequently I despise c and c++ they have no practical advantages for competent engineers who know their job and want to write efficient code. Not that I am biased in any way OFC
I worked at GE Aerospace and programmed also in VAX/VMS FORTRAN. One unit I worked in that had more hardcore software programmers working on a project used Ada - but I never had the pleasure.
ADA was sexy but my one true love was FORTRAN since I learned it on engineering course 1977ish,
NICE!!!
@@occamraiser hating on C because it's too newfangled and not close enough to the metal. You are truly the greybeard of greybeards and I salute you
I took a FORTRAN class in college in the 90's. Even back then my professor asked "Why are you here?" He knew FORTRAN from when it was necessary, and he wanted us to use things that were more modern.
Why are you here? Just to suffer?
@@josephcro2138 isn't that what we all signed up for on Earth?
@@petemoss3160 it's a meme reference
@@josephcro2138 I think he knows that
For whatever reason, the state unemployment system where I live still uses fortran. When the pandemic started this was a problem since it wasn't designed to handle the volume of applicants.
What did they do? They begged for retired developers to come work FOR FREE and fix it. Insisting that modern developers would never be able to understand Fortran lmao. Based on this video, I'm pretty sure you could have a modern C programmer figure out fortran in a shortish amount of time.
But they knew what they were doing, they got the free labor lol
I think this would be a great point to introduce OpenMP (and later on MPI). OpenMP works great with both C and FORTRAN
Great suggestion
Yes, more please. Modern languages owe a lot more to FORTRAN than it's given credit for. A fun one is in the development of those optimising compilers you mentioned, where trying to develop a good FORTRAN compiler led to all sorts of ways to design better languages.
I'm a Mechanical Engineering undergrad currently. I know my way around C, C++, VBA and Python to get some basic calculations. Recently I have joined my professor's research in finite element solid mechanics. He uses a program he and his students have written over the years, and it's written in Fortran for maximum performance. I'm going to have to learn Fortran to help him with the research. I'm very excited :D
I programmed Fortran on VAX/VMS many years ago and we did verify the assembly code generated (Aircraft Industry). Sometimes we coded directly in assembler. We did some tests and came to the conclusion that you only gained about 6% - 10% performance by coding assembly code directly vs in Fortran. It was so optimized.
Nevertheless, one of my work colleagues decided that the VMS Fortran compiler was not efficient enough, do he spent two years writing his own. Meanwhile, the rest of us had finished the project that he was supposed to be working with us on.😂
@@allenjenkins7947 Oh yeah, I also worked with those sort of guys.
No, it's more the reverse. You could not do much more than in assembler. As less complexity you can handle, as less need or possibility is there to optimize anything.
A foreach-loop you can optimize (to a for loop) , a for loop you cannot.
Many of python's most popular machine learning/artificial intelligence/scientfic computing libraries rely on Fortran code, Also the current standard is actually Fortran 2018, And there are two great compilers currently in the works, the official LLVM one named Flang, And another one named LFortran which aims to execute Fortran code interactively as well as being able to compile it.
Also gfortran
What scientific computing library relies on Fortran?
@@monochr0m Among others, "the time-critical loops [in SciPY] are usually implemented in C, C++, or Fortran"
@@monochr0m numpy used to contain fortran code.
@@monochr0m cause Fortran is fast for numerical operations. It used to be even faster on array operation than C before C added restrict keyword that disable aliasing.
The reason why it's so fast is because when it was invented when many scientist believed that compilers produced slower code than manually written assembly code. So the compiler had to produce very optimized code in order to prove itself.
Fireship in 100 seconds next please. (Also the real first)
Yes please
It’d be fun 🤩
Wow, does this bring back memories. We had Fortran training in high school in the mid-70's, thanks to equipment donations and computer time donated by a major chemical manufacturer in our town. We had keypunch machines installed in the classroom, the card batches would be sent over to the manufacturer's computer center at night, and we would have the runs of our programs back in the morning.
The comments full of people learning fortran in the 60s and I just started getting a hold of it 2 years ago when I started my PhD in theoretical physics. :D it is still there and I also admire it.
This is a very good overview of Fortran. I was one of those average humans. I worked at AERE Harwell in the early 70's and saw the transition from punched cards, paper tape and teletypes to Visual Display Units (VDU). With punched cards the program turnaround time from punching the cards to getting your results returned was three days. So I was explaining to my son that you couldn't really build a spreadsheet app in the days of punched cards. Imagine - change the contents of cell C3 and wait for a few days to get the results :) On the other hand, calculating the Swarzchild radius of a black hole was a cinch.
... and our team contributed sparse matrix routines to the Harwell library during that period.
I worked as a professional Fortran programmer from 2015 to early 2019 and I really loved the language. We used the Fortran 90/95 standard and the code was quite modularized and clear. We also used some 2003 features. The original code was from the mid 90's, but we were allowed to use modern features. The code was very easy to follow, not like people would think a Fortran program looks like.
I've seen ancient F77 code that is a pain to read, but I've also seen C and C++ code that was way uglier than a well designed F90 program. I work as a strictly C++ developer now, and I've seen some ugly C++ code. I guess it's just a matter of who is the developer more than the language used.
Fortran 2003 is a very nice language to use, but as its origin is so old and it's used for high speed computations so it's very different to modern languages.
I really enjoyed working with Fortran, and besides that, it was the first programming language I learned at university.
What exactly Fortran is used for in this age?
@@wach9191 Atmospheric simulation models, computational fluid dynamics, mechanical stress finite difference package, aircraft performance models. Things that work, need to compute fast, and should not be messed with. If you do not know where it is used, that probably means that you are not among those who know how to use it.
A lot of fortran code is ancient. And follows ancient rules / programming style / prejudice (like: subroutines are slow, goto is fast).
@@wach9191 I've used it mostly for computational fluid dynamics, finite element method and weird math involving very large matrices but with simple computations.
Grandma? My father still remembers using punchcards at University and transitioning to a PC later.
I would love not only to see a full tutorial, but some examples of modern use cases and projects would be nice as well.
Modern Fortran is by far the best choice for number crunching. We use it all the time because it is light weight, simple, clean, and sometimes even faster than C (especially if you know how to code efficiently, and how arrays are handled in Fortran). Not to mention that Coarray Fortran allows us to program to run scripts in parallel.
I was hoping someone would mention the parallelism in Fortran. It's a relatively recent addition, but one many other - even more "modern" - languages lack. And most languages that do have it make it awkward to use. (I always liked how easy and natural parallel processing is in bash.)
The video didn't mention it, maybe because most existing Fortran codebases don't support it, but I think it should have been mentioned anyway.
I would personally love to see more Fortran. Fortran was the second language I ever used after learning C.
I started engineering school in 1972. FORTRAN IV was my first exposure to high level programming. It ran on the university’s DEC PDP10. It’s still a pretty friendly language.
Architecture 1971, Fortran 4 too. Felt really proud/smart learning it as a non-CS student ‘til this video… ONLY 100s to cover all aspects of the language. 😀
Had to use it for a scientific computing module before. It may be old but it has a solid foundation, and has nice features for working with arrays, which is what makes it great for linear algebra. It's quite simple too with not a lot of keywords. Overall I liked it, but don't have much use for it outside of that niche.
As a non user, what are those array features?
@@Lucretia9000 it has whole array arithmetic, so if you wanted to multiply two 2D arrays element-wise, instead of having
do i=1,n
do j=1,n
a(i, j) = b(i, j) * c(i, j)
end do
end do
You can write
a = b * c
This means in a lot of cases, the code you write looks like the math you want to implement, hence the name formula translator.
@@fionnbracken IMHO, this is not a good reason to choose FORTRAN over c++, where you can do the exact same thing syntactically with operator overloading, and for which off the shelf libraries already exist that do this.
@@eventhisidistaken sure, but that's just adding complexity, with fortran it's built right into the language, no effort required. In general, c++ is a lot more complex, which means it can useful for more things. But for linear algebra, fortran's simplicity is a nice feature.
@@fionnbracken If you're multiplying matrices, you are probably also in need of a full up linear algebra package. At that point a library is a library whether in c or fortran. c++ is only more complex, if you're a fortran programmer who never learned it. FORTRAN was complex when you first learned it too.
If you wanted to obtain a result from a subroutine, you need to specify the "intent" of the variable you declare. So, for instance, if you wanted to pass two integers and return their sum, you could have something like,
subroutine addition(sum, a, b)
implicit none
integer, intent(in) :: a, b
integer, intent(out) :: sum
sum = a + b
end subroutine
Then, if you can call that subroutine in your program as,
program myMath
implicit none
integer :: sum
call addition(sum,1,2)
end program myMath
and it will set the variable "sum" equal to 3.
Why do you need the word “call”? Why not just have that line as
addition(sum, 1, 2)
as in other languages? Because there are no reserved words in FORTRAN!
You don't need to specify the intent of the variable, the variable will be modified anyways
@@ruther4336 to add a bit more information, you don't need to add intent to your variables, but if you *do*, the compiler can perform a bit of checking to ensure that you're not using the variable in an unexpected way. It'll complain if you define a variable as intent(in) but modify it in the subroutine.
latt.qcd92 He said that the subroutine does not "return" a value (instead modifies the passed argument) which is correct. He's aware of the intent attribute as in his example the parameter had intent (inout) meaning it already has a value and can be modified. IMO the addition is a bad example for using subroutines as a pure function is much better suited for this purpose.
@@lawrencedoliveiro9104 Because using CALL is the mark of a subroutine, while not having CALL means this is a function, which returns on its own name, just like "COS(argument)". In Fortran, "addition(sum,1,2)" means that you are not doing anything with the value returned.
Thanks man!
I'm currently learning Fortran and I appreciate all the help!!
i also want to learn Fortran whould you please tell me either it is easy to learn or not?
Good memories. I never used it in the real world but I took a couple of Fortran classes in college and really enjoyed them. The computer lab was open 24x7 and I usually went around midnight when it was mostly empty to do my programming. The good ol' days.
I learned more about FORTRAN in 100 seconds than I learned in a semester from an engineering professor. I subsequently learned C from a computer science class and programming made sense thereafter.
One card represents 1 line of code. WOW. Programmers back then must be so sharp in thinking and seeing. They cant afford mistakes after punching 100 cards.
Imagine reformatting the code from tabs to spaces
I suppose you would first write out your entire program in a lab notebook that belonged to the company back in those days. Probably got a senior colleague to review it before punching the cards.
I think Donald Knuth once said something about this
no need for gym memberships when you had punchcards
they made a tape to patch up the hole that they wrongly punch, hence the word "patch" to fix the software
Great video! I’m working with a group of researchers modeling heat transfer and fluid flow. All of our codes are FORTRAN codes, so it was nice to see this one come up. It’s not the most modern or practical language by any means, but man is it computationally powerful.
Is there any reasons other than legacy reason to use Fortran code? Why not like C++ or Julia
@@abdjahdoiahdoai Plain "C" would be a smarter idea ;-)
* Julia needs a VM - RAM and CPU cycles wasted on a weak hardware.
* C++ has OOP - potential RAM and CPU cycles wasted on a weak hardware.
@@abdjahdoiahdoai two more reasons to use Fortran: it's *very* easy to work with multidimensional arrays, and if you're using Fortran you probably have a legacy application with 30, 40, or even 50 years of development behind it. Writing that from scratch in a more modern language is not feasible (and with recent Fortran versions, not really needed).
Python has the NumPy engine for operating efficiently on large multidimensional arrays, including sparse ones. With custom operator overloads, you can express complex manipulations in a single line of code.
@@JamesThunes basically this. This code has been developed over the last 30 years and has had extensive verification with experimental results from not only the literature, but also production manufacturing use. Since this is a coupled heat transfer and fluid flow code, multidimensional arrays are the norm, rather than the exception.
I learned Basic in 1970 and Fortran in 1971...formed the basis for a lifetime. I ended up a Finite Element Stress analysis using Nastran and Patran (Abacus etc) building models with Vax 8800 clusters and running programs on a Cray YMP-28 but never forgot those early years with paper tape and cards. Those were exciting times!
He is not joking when he says that FORTRAN fuels science.
Most of our most important codes are writen in FORTRAN, with GOTO instead of DO loops and all that jazz. That is why we still teach that to new people in the field in 2022.
As a data science enthusiast that deals with R on a daily basis, we need a Fortran compiler installed on the environment to install some packages that are compiled from source, like randomForest.
You need the comparison to how not to do things, to understand why our current languages are better.
The loop gag is brilliant. Bravo. 👏
My first programming language. Interesting to see it being explained here after not seeing or using it in so long.
0:03 Correction: Fortran is the first commercially-used high-level programming language, not the first ever high-level programming language to be designed for a digital computer. It was Plankalkül, developed by Konrad Zuse in 1942-1945. The world was fighting at that time, and the implementation of the programming language idea flopped, making it remain only on paper.
Brings back memories! Back in the 80s I got a Sharp MZ80k which had loadable operating systems on cassette tapes. I had tapes for BASIC, FORTH and FORTRAN. It was so cool to learn those different languages. And I became a developer after finishing high school.
I literally searched this up back when I first found your channel and series; this is exactly what I was waiting for
Fortran was my second computer language. The first was Easycoder for the Honeywell H200 mainframe. I started working for Honeywell back in '65 as a field engineer. I taught myself Fortran out of curiousity. Wondered how a computer without floating point number capability could do floating point arithmetic. Wrote a mortgage amortization program to test out the idea. It worked and has served me well over the years.
Yeah, duplicated Weizenbaum's Eliza on several machines. That is why the whole ChatGPT banter (by casual users) brings a smile to my face about Weizenbaum's admonishment.
I started my career as a professional programmer with Fortran 77. At Uni I had done most of my programming in (Turbo)Pascal, switching to Fortran 77 was a big step backwards. I have never learned to love it.
YES please. A full tutorial would be awesome, especially for those of us in engineering
Hello, in 1980 I worked in the Data Processing Center of a University that had a wonderful Digital Computer DEC 10, with roll tapes. I programmed in FORTRAN, the System was Administrative, of Academic Control, imagine.
I already had a Teletype (TTY) keyboard that printed directly onto 132-column paper and a monochrome video monitor.
I saw the girls typing some programs on punched cards, it was a huge noise. Greetings from that era. Health.
As I remember, in 1971 the PDP 10 had a paper tape reader that was mainly used to boot up the machine. It had those very quirky DEC-tapes that we used only for backup. We had "normal" 1600 bpi tapes for data. Our TTY also came with a paper tape punch/reader that we never used.
ahhh, a quick trip down memory lane! I'd forgotten about default integers i,- n. At least when I was learning F77 it had a passing similarity to the BASIC that we all learned at school.
Learning Basic on a Commodore C64 was very useful for learning Fortran 77 for me. Wasn't Basic derived from Fortran as a simplyfied version ?
I definitely love to see a full Fortran tutorial, please make it happen Jeff 👐🏻
Please don't is dead
lmao same
@@mentasuavesuave01 Not in science, it isn't.
@@latt.qcd9221 Matlab or R.
@@mentasuavesuave01 Fortran is far from dead
I learnt Fortran 77 at uni a few years back. My dad, who studied comp sci in the 80s, also learned Fortran 77.
When asked why we still use it, the lecturer said it compiles extremely efficiently compared to other languages.
I actually rather liked it as a language, though I was unable to get a compiler working on my own machine once the course was over and have since not used it for some years. (though I do believe I still have the code I wrote)
I learned it from a book called “The Compleat Cybernaut”. The bio said the author was working in some city (might have been Liverpool) as a blacksmith. She must have led an interesting life ...
I devoured that book over a weekend. But in those days, I had no access to an actual computer -- not for another three years.
Get yourself GCC. The GFortran compiler is pretty good.
@@vincentgoudreault9662 I have actually gotten it installed since I made the original comment. Have yet to figure out exactly what to do with it yet
@@lewismassie Writing and compiling programs, perhaps?
Back in the dark ages, I learned Fortran before learning Pascal. I was a big-time geek, so I loved coding with both of them!
Thx for this trip down memory lane…wrote my first program for IBM360@UCSC in ‘74. It was for hyperbolic functions describing Laminar Shear trajectories on a Lifting Body
My father said he was programming in Fortran for 15 years before he truly understood it, and for 25 before he truly saw the beauty of it. You can thank him for the fact that your electric clocks all run on time.
so it's HIS fault !!!
@@baneblackguard584 Prolly 🤣
I would pay for a FORTRAN tutorial, and I'm pretty committed to learning as much as I can WITHOUT spending money. This is really interesting.
This video brings memories of sheer pain and joy at the same time.
I started programming with Fortran95 in 2014, it was a necessary module for my Theoretical Physics degree. This was the hardest part of that whole degree, it almost made me cry on daily basis. Errors made very little sense, language was old, any material worth reading was pre-1990s, and asking for help online was almost pointless. It almost made me quit physics and programming.
Almost 8 years later now, and I work as a software developer. Fortran 95 made me learn the fundamentals of programming in such a difficult way, that no coding related task has ever felt difficult since. I am almost grateful to this language.
This series is so great, please continue it. And maybe you want to create a video playlist "... in 100 seconds", cheers.
Fortran is still extensively used in scientific computations. Many, if not most, high performance, massive scientific simulations are in Fortran to this day.
Currently working with someone on a project that uses Fortran. Some really interesting functionality this thing has.
Ahhh! Such memories. My dad was the Head of the Computer Department of a major governmental body in the 1960's. He taught me binary numbers when I was 6 and how to program in Fortran when I was 10.
It was my first language. :)
@@MrWaalkman You must have talked funny.
@@soaringvulture Still do... :)
Yes, please! Full tutorial would be awesome! 😇
Wow they're really creating JS frameworks like crazy but this one seems promising! Full tutorial please
Love these short explainers. Not enough information to get good at the language, but enough to destigmatize people who are scared of "more difficult" development.
I had a high school friend who is an engineer now. He works for this company and I remember he told me that they started back on the 80s and the entire core of their system still runs or Fortran. It's like COBOL, old but still reliable.
Was waiting for this one, thanks!!! Out of curiosity, the latest Fortran standard is 2018, which introduced a lot of OOP related stuff, so grandpa can still pack a mighty punch! It's also pretty good at gpu computing, interfacing well with CUDA and openacc, so i recommend giving it a try if you're trying to code a fast numerical kernel :)
It can do loops, you just need to feed it with a punchcard over and over and over Dave.
My #2 after COBOL. I learned both on punch cards. Love this! Thanks for the memories!
Ah yes! Probably a similar trajectory that I had: Basic -> Pascal -> COBOL -> IEF -> Visual Basic -> Delphi -> REXX -> C++ -> Python. So many similar structures. You might be interested in knowing that Delphi could have easily been named "Visual Pascal," because that was the language used in it!
Wow. I typed a few thousand lines of my own FORTRAN 77 and WATFIV code on IBM 029 keypunches (and, for a very short time, with a line editor from a terminal) starting in 1978. This video did a remarkable job of covering the language, including features that didn't exist in FORTRAN IV, FORTRAN 77, or WATFIV. And yes, my jobs were submitted to a mainframe that filled a raised-floor, Halon extinguisher protected, heavily cooled room and included two or three 60 MB hard disk drives each the size of a top-loading washing machine, as well as nine-track tape drives straight out of 1960s science fiction movies.
Ironically, I could have watched this video on a belt-clip portable computing device with thousands of times the data storage and computing capability of that (even then) outmoded IBM 370 (though instead of my Pixel 7, I watched it on my home-built, Linux operated desktop computer).
I think it got lost/tossed in my last move, but I used to have a pin-feed paper print of the FORTRAN source code for the original Colossal Cave Adventure game, the grandfather of Zork! and all those other text command adventures that were so big before computer graphics got good enough and fast enough to play in video.
BLAS, LAPACK, FFTW3, MPI among others are the core of most computing libraries and are written in FORTRAN.
Fortran was the "Spreadsheet" of the 60's, 70's and into the 80's. Lotus 123 wasn't out yet nor was Excel. In the beginning Fortran was limited to only 76 Characters (the last 4 positions on the Punch Card was for the sequence number, to sort the deck if you dropped it). Between Fortan, BAL and COBOL there was much that couldn't be done in Data Processing in the "Old Days". Fortan is how we got a man on the moon.
Loved FORTRAN and loathed COBOL.
Me too! FORTRAN IV all the way!@@keithmclean4283
When I learned Fortran 66 in college in the 70s columns 1-5 were for line numbers (labels), column 6 if non-blank meant this card was a continuation of the last card, code was in columns 7 - 72, and columns 73 through 80 were an optional sequence counter for the card sorter.
Also, a "C" in column 1 meant that the card was a comment card.
Don't forget RPG, PLI, GCOS and also IBM JCL, Burroughs MCP, GE OCS control languages. 🤩
@@The_Oldguy Yep...... had a crack at PL1, ALGOL and even LISP at University. But somehow Fortran just seems cleaner. That might just be because I made a good living out of it for 12 years.
Also a full tutorial would be awesome!
wwwcdf.pd.infn.it/localdoc/f77_sun.pdf Sun Microsystem FORTRAN 77 Reference manual.
Ah Fortran, the only language that was ever capable of butting heads with C
half the time it's even faster than C!
@@mastershooter64 Indeed
I learned Fortran, then Cobol, at uni back in the early 80's. I don't miss the noise those punched-card machines made!
It was the "done thing" to shuffle your classmates program deck before it was compiled - just because we were like that ;-)
Now my kids can't understand how we used to have to book "computer time" in advance to compile/run our programming assignments.
Loved this video. I started with fortran on an IBM1130 in 1969. Still do software for myself in 2024 but have moved from fortran. Considered doing it again a few years ago but never did. How things have changed! I am suspicious that the rate of change is even accelerating now. Strange that change is the only constant! Tony
Believe it or not, I was programming in Fortran in 2014! By then, it was a decent object oriented language.
Great video! Could you do APL in 100 seconds, it's quite an overlooked programming language but very interesting
(he needs to buy the keyboard first)
@@not_herobrine3752 No need for a display since it's a write-only language
Dijkstra called APL “the language of tomorrow to solve the problems of yesterday”.
computer runes
Most algorithms implemented in APL could fit in a tweet
I work a lot with a Fortran 77 code. It's absolutely a mess of a program, almost impossible to debug with GO TO statements all over the place. But I highly respect the people who made science work before out modern software tools were invented.
GOTO statements and 6 empty spaces (or line numbers) are painful, but Fortran 77 has some sort of beauty in it. Looking at a single .for file containing 10K lines to be compiled with a single fort77 command will convince you that they should be preserved as UNESCO Memory of the World.
@@arduous222 I often found fixed format fortran code to be incredibly convenient, especially if you are using vim. In other modern IDE's however, this is horrifying.
I have been using ForTran for software development for 50+ years. I worked for IBM for 20+ years and
met John Backus at the IBM Almaden lab in California in the 80s. I was able to run M.S. ForTran 5.0 compiler on a
personal IBM PC-Jr. in 1980s. I currently use the P.G. Fortran compiler on a Windows XP system compiling applications for
both 32 and 64 bit systems.
Punched cards where 1960s, the 70s was the era of the VDU (Visual Display Unit) and the widespread adoptionof top loader hard disks and reel to reel tape.
Fortran has some maths capabilities that makes it hard to beat and the compiled code is generally way more optimised and faster than C or Pascal.
It's funny how Fireship just made Fortran interesting for me, while my university teacher litterally made me sleep and made it look too difficult.
A talented teacher vs "I will have my salary tomorrow..." one ;-)
Which university are you in?
teachers are paid even if you are watching them even if you are not watching them. UA-camrs and instructors of online platforms needs to make things interesting to make you watch the next video or course
@@science_trip True!
That's why I like UA-cam much more than just some offline courses ;-)
APPLE II 4 KB RAM History❤ WOW Thanks Jeff
That's what the very first models came with, but that was quickly changed to 16K. By the time of the FORTRAN compiler (which had the same requirements and ran under the UCSD Pascal system), you needed a "full" 64K to compile it.
Would love to see a full tutorial!
Yes! I would like to see a full tutorial, thank you for this! The best 100 seconds I've spent all year, perhaps!
Aprendí a usar Fortran 4 en 1973, y en realidad en México era muy difícil encontrar equipos que lo pudieran aplicar. Yo era estudiante de ingeniería civil.
Fué en realidad uno de mis primeros encuentros con los programas de computación. Nada comparado con lo que ahora existe, pero así son los inicios.
Me gustó encontrar esta información.
Gracias.
My mom got her start in the computer industry in the 1970s as a keypunch operator punching in Fortran code. She learned enough from punching the cards in to actually write code herself and after a few years she learned COBOL and became even more valuable. I followed in her footsteps and worked as a programmer for well over 20 years.
Fortran for the geeks, Cobol for the business departments.
How interesting, I have just recently taken an interest in Fortan and installed the compiler on my linux box and wrote my first hello world program. Would love to see a longer length tutorial video. Very cool. 👍🏼
Hi, nice to hear you want to try Fortran. If you require any further assistance, come over to our fortran-lang discourse group. :)
Finally, my first programming language
Brings back memories for me. Learned Fortran 77 in college, but never used it for anything. Ended up becoming an advanced programmer in TurboPascal instead. Stopped programming just as C language came out.
I have the original Microsoft Fortran for CP/M on an 8" floppy disk. I wrote the world's first high-resolution mapping package running on a CP/M computer that utilized a pre-processed version of the CIA's World Data Base II containing outlines of the World's landforms, and political boundaries at about one point every 300 meters. I got this entire database to fit on my microcomputer and created high-resolution maps of marine mammal population densities around the world.
The program was called AMP - A Mapping Package, and, originally I wrote it in Fortran and Cyber 750 assembler. It was a program in use at the University of Washington for about 7 years.
Oh hey, it's MATLAB's dad.
It is so nice finally the language I am using daily got covered! 😇 I always wonder if it has become a legacy...
ahhh, yes, my favourite programming language 😃
Yes, definitely my favourite programming language...... to foooken hate man! Was forced to learn this in my engineering days. Mostly I hate it as it was the 2nd language I learned coming from C and it made me feel dumb...
Definitely one of THE programming languages of all time
I programmed in Fortran 77 and 95 between 2003-06 as a graduate developing simulation software for a defence company. I was an Engineering graduate with no prior programming experience besides some Excel VBA and got right into it converting algorithms developed in MathCAD into functioning Fortran code - good times! I remember thinking even at the time that Fortran was dated, amazing people are still talking about it and using it a further 20 years later! It was the right language for the type of work we were doing.
I appreciate it. A lot of people seem to forget that fortran ist still actively used and developed.
I was teached to program in Fortran just a few years ago since it's still the most efficient language for math heavy programs. Fortran is a bit clunky, but I appreciate the neat code.
fortran77 my first language, i didnt have a computer then and i wrote programs on paper, it was 2001
Same here, but it was 1978 on a Philips mainframe with 64 kB of core memory and 2 MB spinning disks and none of this SSD rubbish!
Ugh, another assembly framework? Feels like there's a new one every week! 😉
In a "comparative Languages-CS310" back in 1980 fortran IV and fortran 77 were two of the languages we had to write the same program in. The fortran IV card deck was over a box (1000 cards) , but 77 had recursion, so it was under 100 cards.
I haven't done any Fortran Programming since the 1970s. This brings back fond memories.
The charm of those old mysterious expertise my generation can be proud of! Useless but gratifying.
For example, I can:
- code in Fortran (and Cobol, PL/1...)
- navigate with a sextant
- calculate with a slide rule
- shift gears manually (car, bicycle, and motorcycle). Still do I!
...