[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Explain Fortran to me. All I know is: - it's old - people

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 2

File: fortran.png (263KB, 617x340px) Image search: [Google]
fortran.png
263KB, 617x340px
Explain Fortran to me.

All I know is:

- it's old
- people hate it
- my laptop now has a Fortran compiler because of some random dependency.
>>
>>60289248
>it's good for numerics
>it's good with shit involving ton of loops
>people hate a lot
>even people
>>
>>60289248
oh and same could be said for perl and ruby

i mean cmon.

unless you are on a windows machine, having a fortran compiler is no bigy, besides whats one more package among 100000 ricer packages
>>
>>60289248
https://en.wikipedia.org/wiki/Fortran
>>
>>60289248
Used almost exclusively for numeric simulations involving loops and matrix algebra. Updates mean it's not that horrible any more (even got OOP kek). Its still the only choice when it comes to solving things like physical simulation problems. You would then use something more friendly to do post-processing (shit ton of python libs etc)
t. Fluids researcher
>>
>>60289248
FORTRAN was written for engineers.
It works the way engineers think.
There are literally limitless known-good working subroutines for FORTRAN.
You can do almost anything in FORTRAN. If you can't do it in FORTRAN, do it in Assembler.
If you can't do it in Assembler, why bother?
>>
>>60289248
FORTRAN is considered harmful
>>
It's very close to c with some weirdness.
>1 indexed arrays
>Always pass by reference
>Output is misery until you get used to it, and then it's merely unreadable.
>Row major 2d arrays.
>comparing is weird ( .gt. )
That being said it's s popular language to test super computers and there's a lot of old code written by genius (non computer) engineers that's in FORTRANso you may come across it some day
>>
>>60290925
Why FORTRAN though, why not C or any other language? Is it a library issue? You could use literally any other language that is newer and more though out than FORTRAN with shit hacked on.
>>
I once went to the Bureau of Labor Statistics for an informational interview and one of the economists there showed me around. He introduced me to a computational economist and that guy was so smart.

>hey Anon, how are you?
>fine, I hear you do some cool stuff doctor
>yeah we do
>not too many people here
>yeah we have a few spots open, you can have a job if you want
>do you know fortran?

I did not so I could not take that job in good faith. :(
>>
>>60289248
I don't event think about it because its name is very similar to another word and I REALLY don't want to use that word in any context in public
>>
>>60292634
just werks
>>
>>60289248
Has cool syntax for arrays. The rest is pain. Procedures and functions are different things and are called differently. Recursion should be explicitly stated in function's definition. Outputting something is pure insanity. Made a typo when using a variable? Have a new variable, with type that depends on the variable's name's first letter(!!!) - look up "in FORTRAN God is real." Passing a dynamically allocated array into a function needs special snowflake syntax as well. And other legacy stuff.
>>
>>60292779
Fagtron?
>>
>>60293011
>Recursion should be explicitly stated in function's definition
are you literally retarded
>>
its a language FOR TRANsexuals
>>
>>60292458
>1 indexed arrays
This is the biggest thing holding me off from Julia.
>>
Jesus rollerblading Christ

It's Fortran, not FORTRAN. I bet you fucks think it still uses punchcards, don't you?

And for the record, you wouldn't have to ask such basic fucking questions if you ever actually programmed anything of worth.
>>
File: fortran_printout.jpg (66KB, 900x479px) Image search: [Google]
fortran_printout.jpg
66KB, 900x479px
>>60289248
Nobler weapons for nobler times.
>>
I dabbled with it like ten years ago, I should spend a couple of weeks with it again so at least I can put it on my CV. Maybe I'll get lucky and someone will let me maintain age-old Fortran garbage for a handsome salary. A man can dream.
>>
>>60293154
If you simply call function inside of itself you get compilation error. You have to define the function as recursive to do that.
>>
>>60293202
In FORTRAN you can actually define how an array is indexed. Arrays are one of the few of its redeeming features.
>>
>>60293685
What if you have a pair of mutually recursive functions?
>>
>>60294114
Define both recursive.
>>
>>60294158
Yes, but I meant how would the compiler react to such a pair of functions if they weren't declared such? Would it be able to detect the error, or would it cause something akin to C's undefined behavior at runtime?
Thread posts: 25
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.