Everything Functional
Everything Functional
  • 17
  • 30 713
Using GitHub Actions for Modern Fortran Projects
In this video I demonstrate an example modern Fortran project and how you can utilise GitHub Actions to automate testing, and documentation generation and publication.
You can find the example repository at: github.com/everythingfunctional/ci_example
Documentation for used tools:
Fortran Package Manager (fpm): fpm.fortran-lang.org/en/index.html
Ford: forddocs.readthedocs.io/en/latest/
GitHub Actions: docs.github.com/en/actions
Переглядів: 555

Відео

Vector Subscripts For Fortran Array Access
Переглядів 5312 роки тому
In this video I discuss a rare feature in program languages; the ability to access multiple, arbitrary elements of an array with a concise syntax. We'll also discuss how it can aid in implementing a sorting algorithm, and what performance implications there might be from implementing the algorithm using this feature.
Fortran Bug Repellent: Arrays
Переглядів 6172 роки тому
Some best practices and techniques for avoiding bugs in Fortran when working with arrays.
Recursive Data Structures in Fortran
Переглядів 8503 роки тому
Learn about recursive data structures and how to use them in Fortran using a simple example to calculate Fibonacci numbers. Code can be found at: gitlab.com/everythingfunctional/recursive_data_structure_example
Fortran Package Manager (fpm) for Visual Studio
Переглядів 2,5 тис.3 роки тому
In this video I demonstrate a brand new plugin for Visual Studio that lets you use the Fortran Package Manager (fpm) to build, test and run your Fortran projects from within Visual Studio. Again, a big thanks to the Nuclear Regulatory Commission for funding the initial effort. Links: * fpm-for-VS repository: github.com/everythingfunctional/fpm-for-VS * fpm-for-VS on Visual Studio Marketplace: m...
Setting Up Windows For Fortran Development
Переглядів 2,8 тис.3 роки тому
I walk through how I set up my environment on Windows for doing Fortran development. For links and an outline of the steps checkout this blog post: everythingfunctional.wordpress.com/2021/05/26/setting-up-windows-fortran-development/
Anatomy of an fpm Project
Переглядів 6183 роки тому
A guided tour of the typical structure of a Fortran project that uses the Fortran Package Manager (fpm). Links: fpm main site: github.com/fortran-lang/fpm fpm manifest reference: github.com/fortran-lang/fpm/blob/master/manifest-reference.md fpm packaging guide: github.com/fortran-lang/fpm/blob/master/PACKAGING.md iso_varying_string: gitlab.com/everythingfunctional/iso_varying_string jsonff: git...
Just Talk to Each Other: Getting Fortran and C to Work Together
Переглядів 1,1 тис.3 роки тому
See how you can get the Fortran and C programming languages to talk to each other. Source code for the demo can be found on GitLab at: gitlab.com/everythingfunctional/c_interop_demo
Why Fortran?
Переглядів 17 тис.3 роки тому
Contact me here: www.everythingfunctional.com/contact.html Link to Damian's Book: www.amazon.com/Scientific-Software-Design-Object-Oriented-Way/dp/0521888131/ref=sr_1_1?crid=2HOI7EQY43CSJ&dchild=1&keywords=scientific software design the object-oriented way&qid=1603138304&sprefix=scientific software,aps,954&sr=8-1 Additional Resources en.wikipedia.org/wiki/Fortran fortran-lang.org/ www.udemy.com...
Fortran Abstract Derived Types
Переглядів 1,2 тис.3 роки тому
In this video I describe the basic principles of abstract derived types, how to use them, and some examples in real code that where I've used them. The referenced video: ua-cam.com/video/wzaD66RjQPo/v-deo.html And a link to the fpm repository: github.com/fortran-lang/fpm
Fortran Pointer Vs Allocatable With Arjen Markus
Переглядів 1 тис.3 роки тому
In this video I got a chance to talk with Arjen Markus, the author of "Modern Fortran in Practice" about the semantics of Fortran pointers and allocatable variables, and situations in which you might use one or the other. www.amazon.com/Modern-Fortran-Practice-Arjen-Markus/dp/1107603471
Fortran Scope Explained
Переглядів 1 тис.3 роки тому
In this video I go through an exercise to explain how the scope of variables works in Fortran.
OOP TDD Exercise
Переглядів 4114 роки тому
A test-driven development (TDD) exercise solution using object-oriented programming (OOP). The initial code can be found [here](gitlab.com/everythingfunctional/tdd-oop-exercise), and the completed solutions [here](gitlab.com/everythingfunctional/tdd-oop-exercise/-/tree/completed_solutions).
Test Your Optimizations
Переглядів 1334 роки тому
I was trying to optimize a couple functions and had a clear example of why it's important to always measure your optimizations.
Debugging A Parser
Переглядів 1284 роки тому
See how I was able to debug a new tool I was writing by using the underlying library's error reporting mechanism.
Applying the Open-Closed Principle
Переглядів 2094 роки тому
Applying the Open-Closed Principle
Vegetables Walkthrough
Переглядів 1594 роки тому
Vegetables Walkthrough

КОМЕНТАРІ

  • @evilroyslade2491
    @evilroyslade2491 3 дні тому

    The business world needs Cobol, Fortran, RPG, and C+ languages. Each language has benefits the other does not. Artificial Intelligence designer solutions will incorporate each language where needed. All programming languages go through a compiler to generate computer machine code for the hardware platform it will run on. How good are today's compilers?

  • @Jordan4Ibanez
    @Jordan4Ibanez 25 днів тому

    A very quick answer is: modern fortran is awesome

  • @Seedwreck
    @Seedwreck 28 днів тому

    Epic!

  • @Andrew-pr4ud
    @Andrew-pr4ud 6 місяців тому

    As a further note: vector subscripts with many-one sections **should not** appear on the left-hand-side of assignment statements: i.e. **my_numbers(my_order) = primes** where my_order repeats the 1 index. This compiles using intel and gcc but is not standard conforming -- even if you did assign to each element in my_numbers.

  • @CM_Burns
    @CM_Burns 6 місяців тому

    Why couldn't the GitHub instructions for installing FPM be this clear.

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

    Hey, I have a Meerkat and a Darter pro The Darter runs PopOs !

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

    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.

  • @ElementResources-rp8ox
    @ElementResources-rp8ox Рік тому

    Excellent Video!!! Very clear and helpful. Please continue to make such Fortran related videos as you can. I also watched your Fortran <--> C interoperability video and that was remarkably good. Cheers!

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

    Great video. Thank you for sharing.

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

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

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

    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.

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

    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.

  • @b.c.34
    @b.c.34 Рік тому

    Nice...

  • @b.c.34
    @b.c.34 Рік тому

    I would like you to cover "command line control " using Fortran... I also have a quick question : I seem not to understand thw relevance of abstract derived type,..because to me I would just create all the derived types and place the respective method as a type-bound procedure...

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

      Without the abstract derived type you can't have multiple different types in that variable at run time *and* be able to call the type-bound procedures. The abstract derived type gives you a place to say "all these types will have this type-bound procedure". This is a foundational OOP thing, and if you want to learn more about it generally, most other languages use the terms "virtual method" or "virtual function" to describe "deferred type-bound procedures". Thanks for the suggestion for a future video.

    • @b.c.34
      @b.c.34 Рік тому

      @@everythingfunctional thanks, I would like to clarify something does it mean during inheritance, the base class should be made an abstract type, and hence procedure to be shared by the Children are placed type-bound procedure in base class ? (since you used the select-type construct ) I am quite new to programming...

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

      @@b.c.34 Sort of. The most common pattern is that the abstract type (base class) defines the interfaces for the type-bound procedures that the child classes must implement. The child types then implement those procedures.

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

    Is that your evil twin that is teaching the Fortran course on Udemy that I am taking?

  • @b.c.34
    @b.c.34 Рік тому

    Like the video it is good. One other thing I would like to bring to your notice is that I bought your FORTRAN course, and based on my knowledge from other languages I was a bit dissatisfied in the courses; your course content was sparse...

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

    By the time I first watched this video, I think I didn't fully understand and/or appreciate the value of vector subscripts. Now I think I better understand what's going on behind the scene. At 15:47, what do you mean by large complex objects? By a large complex object did you mean derived types with many components? If that's the case, I expect the application of vector subscripts to arrays of derived types would behave similarly, i.e. no copying at all or minimizing the cost of copying the components of derived types. Please correct me if I'm wrong. So if I do the following assignment Brr = Arr(indices_I_want_Arr_to_be_ordered_with), copies would not occur while the array Arr is sorted according to the integer subscripts I provide. Copies would only occur when Brr is created from the already sorted array Arr. (Here, `Brr' and 'Arr' are allocatable arrays of the same derived type and `indices_I_want_Arr_to_be_ordered_with' is an array of integers.)

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

      Yes, by large, complex objects I mean derived types with many components where potentially those components are derived types with many components, etc. So yes, the use of a vector subscript in-and-of-itself does not necessitate making copies of any of the elements, only the assignment in your example would require that. A subtle note about your example and explanation, Arr is not necessarily sorted, but Brr will be assuming indices_I_want_Arr_to_be_ordered_with is the sorted order.

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

    Really like your videos. If time permits, would be great if you could create a series on Fotran programming in general, tips, and any other topics you think would be beneficial for new anyone learning or trying to improve their Fortran skills. One other request: please enlarge your screen and/or fonts so that your terminals and code you type are easier to read for the viewer. Thanks!

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

      Glad you like it. I do have some courses available (www.everythingfunctional.com/online-courses.html), and I intend to keep making more of these. If you have specific questions/ideas I'd love to hear them.

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

    Thank you very much.

  • @user-od8ed2ts8d
    @user-od8ed2ts8d Рік тому

    Thank you for the useful video. I am trying to deploy documents created by FORD to GitHub-pages. This video is quite timely and instructive.

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

    Excelente transmision

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

    What an awesome feature!

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

    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.

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

    Fantastic example. Please put out more videos. I hope you will address allocatable derived types array and let us know the best practices of appending (deleting) an item to (from) such an array!!

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

    Like first watch later..

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

    When does your new video come out? I have been looking for it. Please address the best practices for all sorts of allocatable arrays including derived type!!!!!!!!!!!!!!!!!!!!.

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

      Sorry. Life has been busy lately. I'm about to have some time available again, and I'll start putting some more videos out. This is near the top of my list. Thanks for your patience.

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

    One question! Is there any compiler other than Intel's that can compile Coarray Fortran code on Windows? Im having a lot of issues with OpenCoarrays so I was wondering if you ever tried to compile CAF using some open source compiler on Windows. Thank you!

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

      A couple of my colleagues recently got OpenCoarrays to work on Windows. Check out the repository at github.com/sourceryinstitute/opencoarrays

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

    i don't get what is the use of the huge area in the right which remains blank while writing the programs

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

      The lines of code just aren't that long. You can split that pane and have multiple files open if you want.

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

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

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

    Thank you for sharing this video. I enjoyed a lot. I noticed that you did not use the intrinsic function ALLOCATE() for variables of allocatable attribute. I was aware that we don't always need that intrinsic function but still do not really know when exactly it is not necessary. In the next time, can you explain/teach when we need ALLOCATE() function and when we need not? Thank you very much.

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

      Glad you liked it. The short answer is, you don't *need* `allocate` any more. That said, there are some cases that it *can* make the code a bit clearer. Thanks for the idea. I'll see what I can come up with.

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

    Who is using fortran these days?

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

      Mainly the computational science community

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

      TLDR: Check out my "Why Fortran" Video: ua-cam.com/video/5xVT7oJn4WE/v-deo.html. The big one that I always point to is weather. All (as far as I still know) the mainstream climate models are written in Fortran. So if you checked the weather today, you used Fortran. But lots of other science and engineering disciplines still use Fortran too. Nuclear and mechanical engineers still use a lot of Fortran. Computational chemistry still uses a lot of Fortran. The big super-computing centers spend upwards of 50% of their time running Fortran code. Even a lot of newer languages have libraries that are secretly using Fortran behind the scenes. Numpy is a good example of that. Fortran's still more pervasive than you might think.

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

      @@everythingfunctional You might consider putting links like the one above in the video description section, aids in findability.

  • @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.

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

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

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

    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!

  • @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.

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

    There is no extension shown as fpm when searched in VS2022 extension manager.

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

      Interesting. I'll look into it. I haven't done anything with the extension in some time.

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

      The same happened to me. Then I tried to download the fpm to VS with the link. However when I try to install it, it says that it cannot be installed in any installed product.

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

    Never seen a person who knows fortran and is unsuccessful.

  • @asarisa-rakuwauavibaya7254
    @asarisa-rakuwauavibaya7254 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 роки тому

      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.

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

    Nice! Will this work for FORTRAN77 aswell? I'm somewhat new to programming and can't seem to figure out how to get a compiler for it

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

      Hi Bryce, Glad you liked it. Yes, any modern Fortran compiler will also compile FORTRAN 77 code. If you're writing new code though, I'd highly recommend learning and using the newer features available in the language.

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

    Great summary! I'm all setup. Atom editor is really amazing.

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

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

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

    Did a lot of quantum simulation in Fortran

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

    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 роки тому

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

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

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

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

    Sir, it would be of a great beneficial extent if you were to create a Fortran tutorial, step-by-step-like, short and direct, lots of real-life examples.

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

      Ask and ye shall receive. I've got a couple of online courses available: www.everythingfunctional.com/online-courses.html

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

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

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

    Great content. Gonna to learn Fortran for fun ;)

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

    thank you very much for your good explanation. it is working on my computer

  • @jean-marclugrin1902
    @jean-marclugrin1902 2 роки тому

    Thank you, this is a much needed presentation, I wish that it is referred to in the main fpm page. After using fpm for some simple projects, I wanted to use it for a (simple) project using ffpw3. I struggled so much to reference the required 'include' files and -lfftw3 that I gave up and went back to make. After fighting make for a while, I decided to explore more fpm. I finally realized that the examples were the essential part of the documentation. So I created a library module for fftw3, so only that module needed the command line argument to include the FFTW include file, and I created an alias to fpm build to add the proper library flags (the development version of fpm allow specification by environment variables). After that trick, I was able to get rid of the make files and have a much simple configuration. It was also not obvious to me that I should explore all 'fpm help build', 'fpm help run', ... to find out the parameters to the commands. And with you video, I finally understand that the'build¨' sections and others are not event needed, and proper use of other sections (I had the feeling that [library] could be used to indicate some options for the required libraries. Anyhow it is much clearer now, I started with wrong assumptions and maybe other people could benefit from your introduction too.

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

      Glad you found it useful. I'll see if I can't get a link to this video added to the fpm README

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

    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]

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

    Thanks for the effort!