Why Fortran?

Поділитися
Вставка
  • Опубліковано 21 лип 2024
  • Contact me here: www.everythingfunctional.com/...
    Link to Damian's Book: www.amazon.com/Scientific-Sof...
    Additional Resources
    en.wikipedia.org/wiki/Fortran
    fortran-lang.org/
    www.udemy.com/course/fortran-...

КОМЕНТАРІ • 52

  • @royschering1140
    @royschering1140 2 роки тому +38

    I've been using Fortran since 1968 for all the reasons stated in the video. I have been developing radar data processing, data reduction, and simulation routines throughout the 53 years. I have written code in many other languages, but always return to Fortran because it is most like the equations in mathematics/engineering texts, is the easiest to code, and is by far the easiest to debug. It is not a perfect language, but long ago I learned how to minimize problems with the language. For example, I never write a routine without an "IMPLICIT NONE" statement so spelling errors don't define new variables. Fortran is the best language for handling multi-dimensional arrays since it is inherently a reference addressing language and all proper Fortran compilers know how to efficiently use the CPUs machine language indexing instructions without resorting to multiplies to obtain an indexed location and this helps make it fast. Over the years, entirely new languages have been developed supposedly to "correct" deficiencies in Fortran. In each case, Fortran was updated to incorporate equivalent constructs. For example, structures were added in F77. Later, matrix operations and parallel processing were added. Yet with all the improvements, code I wrote originally in Fortran 4 in 1968 still compiles, links, and runs correctly.

    • @ZeranZeran
      @ZeranZeran 2 роки тому +6

      You sound very smart. Any advice for a guy who is very excited about legacy computing, code, and learning more about Fortran, its uses, Radar and how older programming languages are still in use today?
      Thanks for leaving this comment Roy, you inspired this stranger. I hope I can do work like you one day.

    • @paulklasmann1218
      @paulklasmann1218 Рік тому +1

      I am learning Fortran and use gfortran, but I'm also interested in older systems and I was disappointed to see that Microsoft Fortran for CP/M does not include the "complex" data type. Is there a way to add this complex data type? Thank you.
      Im translating a number of programs from historical publications for antenna simulations.

    • @royschering1140
      @royschering1140 Рік тому +2

      @@paulklasmann1218 Intel Fortran runs under Microsoft's Visual Studio on a PC and supports complex numbers very well.

  • @snarbywrx
    @snarbywrx 3 роки тому +22

    Thank you for this. I program in Fortran as a hobby. If I run a tight loop in some code at my engineering job, I code the kernel of the loop in Fortran and then call it from Pyrhon. People ask me the same questions when I mention Fortran. They just want to show that the know so much, when actually knowing very little. I have compiled my Fortran code down to assembly and machine code just for curiosity sake and it is extremely optimized and compact.

  • @arneysrackangast7140
    @arneysrackangast7140 3 роки тому +29

    Been using Fortran for nearly 40 years, with this knowledge gained from running, editing, and developing air dispersion models. The biggest improvements came with Fortran 77, and Fortran 90 standards, which facilitated free-form code and data, which greatly loosened the archaic rigid syntax that was married to the old punch card system. I think another inherent advantage is that it is less cryptic than C or python. I think a layperson has a better chance of understanding a fortran algorithm than most other programming languages. I do feel there's considerable pressure to get rid of Fortran. I've never really understood why.

    • @threemr01
      @threemr01 2 роки тому +2

      “Less cryptic than Python”… seriously? I’m not even a hardcore fan of Python, and that claim is baseless. The one thing Python has going for it, besides great available libraries, is the clarity of its code (and yeah, I do hate PEP formatting and often ignore it for personal projects, but still). As for C, it is beautiful how much you can do with 32 reserved keywords or so. Of course, some algorithms will be cryptic, but that would happen with their implementation in any language. The thing is, there are many programmers who are irrationally afraid of messing up with all the power C gives you, and choose to stray away from it. C was the last programming language you could really dominate entirely, leaving you plenty of time to learn and deal with algorithms, libraries and hardware optimizations.

    • @arneysrackangast7140
      @arneysrackangast7140 2 роки тому +3

      @@threemr01 It's not baseless. My comments stem from dealings with the scientific community and lay-person programmers, not computer programmers. Yes, Python has overwhelmingly become more popular. But, you ask a person who doesn't know python to interpret what a simple algorithm is doing, they will be lost. There is considerable jargon in python and "C", which may be highly efficient, but cant be followed or understood. Fortran, which stands for Formula translation, was good at being less cryptic and thus, more understandable. At tleast that's my personal take, as a 58-yr old boomer.

    • @geobeta1351
      @geobeta1351 2 роки тому +1

      Good morning Arney, could you please suggest me a path to learn, or know its basics of, Fortran? could you suggest me any material or website? really appreciate it

    • @sutriadikurniawan4097
      @sutriadikurniawan4097 2 роки тому +1

      @@arneysrackangast7140 could you please suggest me a path to learn, or know its basics of, Fortran? could you suggest me any material or website? really appreciate it

    • @somethingsfishy8477
      @somethingsfishy8477 2 роки тому

      Gonna wait here

  • @dougberrett8094
    @dougberrett8094 Рік тому +2

    Late to the party, but one very good reason was omitted, or at least I missed it if it was. This reason is that once a FORTRAN code has been compiled into an executable, said executable can be called from any language that can call executables. One can even name an executable and park it on the windows desk top or task bar.
    Keep in mind that one should only rarely compile a FORTRAN program. Rather one should learn to write subroutines, and get good at passing variables. Develop and document a subroutine for various and sundry things like finding the roots of polynomials and perhaps the area under a curve, or whatever floats your boat. When the bugs are worked out stash the executables for these routines and then call them as necessary for more complex tasks.

  • @KevinBalch-dt8ot
    @KevinBalch-dt8ot 3 роки тому +2

    I used FORTRAN in real-time simulation of nuclear power plants for operator training. I also used it to write a code that would take reactor instrumentation signals to calculate the power distribution and a code that would simulate nuclear fuel pin expansion when there is insufficient heat removal. I wouldn’t use it for developing user interfaces.

  • @ZeranZeran
    @ZeranZeran 2 роки тому +1

    This is one of the most interesting languages I've ever heard of, and really cool that it still necessary to this day. I've probably seen it in action on the weather channel many times, or flight radar, etc.
    Computer science amazes me and just gets bigger the more I learn about it. Thanks for making this video!

  • @abhabh6896
    @abhabh6896 Рік тому +1

    It just works. As simple as Python, as fast as C. That has been my humble experience as a physics guy who needed things done.

  • @agp9844
    @agp9844 3 роки тому +7

    This was what I was taught as well as discreet mathematics from my early years in school starting in 3-4 grade. I found it a natural way of doing everything since then even my Artificial Intelligence research and now some newer research I can not discuss

  • @sailor12006
    @sailor12006 8 місяців тому

    An undergrad chemical enginering student in the late 1960s, I learned to the program in Fortran IV using punch cards as input to an IBM 1620. What did it teach me? Logic. For my MBA thesis, I wrote a Monte Carlo simulation in Fortran IV. Some 50 plus years later, I remember those years fondly.

  • @code12c77
    @code12c77 3 роки тому +6

    Actually because I am mathematician and when I took look at fortran it was awesome I can represent about any function I want very easy.

    • @pv2b
      @pv2b 2 роки тому +1

      Represent a function, you mean like TRANslate a FORmula?

  • @kartikmadan8080
    @kartikmadan8080 2 роки тому +3

    I have just started using FORTRAN today for simulation in physics. I hope a great journey ahead with FORTRAN....🤩🤩🤩🤩

    • @ZeranZeran
      @ZeranZeran 2 роки тому

      How did you begin to learn about FOTRAN and using it, if you don't mind me asking? This is really inspiring. Good job stranger.

    • @user-no3ur1ws8i
      @user-no3ur1ws8i 2 роки тому +1

      @@ZeranZeran i recommend a book “Modern Fortran” by Milan Curcic

    • @ZeranZeran
      @ZeranZeran 2 роки тому

      @@user-no3ur1ws8i I appreciate it very much, thank you!

  • @romanbouchouiev
    @romanbouchouiev Рік тому +1

    Great video. Thank you for sharing.

  • @radarmusen
    @radarmusen 2 роки тому +2

    It still been used in flight simulators. I think it is a nice language to read, a little like pascal.

  • @asarisa-rakuwauavibaya7254
    @asarisa-rakuwauavibaya7254 2 роки тому +2

    As a 28 y/o I am beyond shocked to find a video about Fortan recorded in 2021...My dad talks about learning Fortran and Cobol in college and makes it sound ancient....so this is interesting.

    • @everythingfunctional
      @everythingfunctional  2 роки тому +3

      Did your dad continue programming? I'm always interested to hear stories from people who wrote code "back in the day". There's a growing movement to "rejuvenate" the Fortran ecosystem, and promote the use of newer "versions" (standard releases) of the language.

  • @callmethreeone
    @callmethreeone Рік тому

    We like Fortran at OakRidge. This showed up in my autoplay, great video.

  • @xormul
    @xormul 2 роки тому

    Using java on daily basis but have some plans regarding fortran as part of self development.

  • @mayclarque4123
    @mayclarque4123 2 роки тому

    I was talking to the power grid specialist professor at my university, and he said all of those things are still based on FORTRAN. It’s just baked into society at this point.

  • @user-BN1000
    @user-BN1000 2 роки тому

    It is in My Syllabus for B.Sc in Chemistry.

  • @drury2d8
    @drury2d8 2 роки тому +3

    Never seen a person who knows fortran and is unsuccessful.

  • @johnmiller5678
    @johnmiller5678 3 роки тому

    Awesome...I would love to learn Fortran

    • @everythingfunctional
      @everythingfunctional  3 роки тому

      I've got two courses available on Udemy. They're a great place to get started.
      www.udemy.com/course/fortran-for-beginners/?referralCode=08A8CE5FDD5790C165EA
      and www.udemy.com/course/intermediate-fortran/?referralCode=E3173F90A172DFB89417

  • @user-cq7db9ij1o
    @user-cq7db9ij1o 3 роки тому +3

    When you write Fortran for production systems, do you write it like Java, means using big frameworks and libraries or write your own code more and libraries as supplement? In Java, for example, vast majority of time is spent on learning frameworks and then you become framework expert.

    • @everythingfunctional
      @everythingfunctional  3 роки тому

      Most projects I've seen don't use many libraries at all, mostly because they have historically been very difficult to integrate into a build system without losing the ability to easily upgrade them. That's changing with fpm though, so you may see projects using more and more libraries very soon. In fact two of my clients have just switched to fpm and started using it to pull in libraries. I don't know that it will ever get to be as library and framework-centric as Java though.

    • @user-cq7db9ij1o
      @user-cq7db9ij1o 3 роки тому

      @@everythingfunctional
      Ok. Thank you. I know it gets heavily in scientific computing. Do you forsee Fortran getting used in Machine learning/data science in future?

    • @everythingfunctional
      @everythingfunctional  3 роки тому +1

      @@user-cq7db9ij1o Yes. AFAIK most ML and AI are based on linear algebra solvers, which Fortran is really good (and fast) for. In fact, my understanding is that many popular ML and AI libraries are using Fortran under the hood already.

    • @user-cq7db9ij1o
      @user-cq7db9ij1o 3 роки тому

      @@everythingfunctional
      thanks for the information.

  • @pv2b
    @pv2b 2 роки тому

    Okay, but is there any good reason to use Fortran if you're not doing specifically numerical computation on CPU?

    • @everythingfunctional
      @everythingfunctional  2 роки тому

      If you like it ;P. There are some objective and subjective aspects that people like. The static type system is a benefit for many people. There being a standard and a large number of different compilers is seen as a benefit by many as well. Some people really like the syntax, and some people like how explicit a lot of things are. There are certain kinds of projects I wouldn't necessarily recommend it for, like there are better ecosystems in other languages for writing web apps for example. I'd just say try it out a bit and see how you like it.

  • @adamthethird4753
    @adamthethird4753 3 роки тому +1

    Why not?

  • @rickhackro
    @rickhackro 2 роки тому

    Did a lot of quantum simulation in Fortran

  • @shivakumarnatrajan
    @shivakumarnatrajan 2 роки тому

    Ha ha... Libraries running Fortran under... That's happy to hear....

  • @visionpeer
    @visionpeer Рік тому

    I'll tell you why, because the shitty Computer Engineering curriculum has it. And despite having no application whatsoever, it is worth 10 points out of 80 on finals.

  • @INT41O
    @INT41O 2 роки тому

    Vast majority of bugs in compilers have been fixed? Please don't make me laugh, have you actually tried using associate together with block and openmp with ifort?. It is a broken piece of crap unless you only use the old shit and none of the "new" features. The ONLY thing decent about fortran is the built-in array support, at least for rectangular arrays. Try jagged arrays and it is shitty again. I will never understand, why no language (that I know of) has fully functional multidimensional array support with custom bounds, strides etc. Something like: int a[3,4][2][-10:10,20:2:30]