Hacker Newsnew | past | comments | ask | show | jobs | submit | CyLith's commentslogin

I'm a computational physicist. Why can't we let this poor old language rest in peace already?

Fortran isn't some extinct language that hasn't changed. The latest standard is only three years old.

We're not talking a language trapped on obsolete hardware. We're talking something that is still in regular use for any numeric tower, because that is what it is good at.

If you touch floating point, ever, there is a good chance the library used for processing it is a maintained, probably fairly modern, Fortran codebase.


The oil and gas industry still runs on Fortran code written many decades ago. The mathematicians and physicists got things right way back then in Fortran, no need to rewrite it.

Every time I've heard about a present-day Fortran code base it's because 1) Fortran is really good at those sorts of problems, and 2) lock-in because it's too hard to rewrite to another language, with little career benefit when you could be adding new features.

It applies to all programming languages.

The whole "I rewrote X in Y" is mostly about career building, gathering Y portfolio, to jump ecosystems.

Now it doesn't matter any longer, it is one natural language paragraph away, what the output language should be.


My experience is that usually it's only 2), for example in large code bases written in MUMPS.

With Fortran it's 1) and 2).

As I understand it, Fortran outperforms other languages for problems like matrix math, especially if you care about issues like portability and memory use.

Not only is Fortran designed for those problems, but the there's been a lot of thought, time, effort, and money used to make the generated code go fast.


Yes, in a language like C++, which has been frequently used to substitute Fortran, the native support for arrays is very bad.

You can eventually obtain the same performance in C++ like in Fortran, by defining your custom array types, with a complete set of operators and functions for them, possibly using inline assembly or SIMD intrinsics for implementing trickier operations. The same may be true for other programming languages that are extensible enough.

But just replacing Fortran with another currently popular programming language is not sufficient, without some extensive support libraries.


I’m a computational Physicist. Sometimes, it’s the right tool for the job.

I feel this, my field (orbital dynamics) has a lot of heritage fortran that at this point I think will never go away. Much of it has a proven history, but there are large swaths of it that the original authors have long since died and no one knows the innards anymore.

I know, if it aint broke... but it feels like something has been lost if we are using code that no one alive knows what it is doing. I suppose that is the AI future.


Because modern Fortran has all the goodies as other languages, first class support for CUDA, and a performance Python will never achieve, all coupled with 70 years of production code.

Also lets not forget that the beloved C is only about 10 years younger.


C is actually 20 years younger.

The preliminary Fortran specification was written in 1954, while the first version of C is from 1974.

The first Fortran implementation is from 1956, but that was not yet a complete high-level programming language, because any complicated functions and subroutines had to be written in assembly language.

In 1958, "Fortran II" added the features required to write any functions and subroutines also in Fortran, so that can be considered the first complete implementation.

Even when considering the first complete implementation, not the first written specification, C would be 16 years younger.

Even if modern Fortran compilers can still compile old Fortran programs, when writing a new Fortran program that would resemble very little with the original Fortran.


> The preliminary Fortran specification was written in 1954, while the first version of C is from 1974.

Early history:

    1951 – Regional Assembly Language
    1952 – Autocode
    1954 – IPL (forerunner to LISP)
    1955 – FLOW-MATIC (led to COBOL)
    1957 – FORTRAN (first compiler)
    1957 – COMTRAN (precursor to COBOL)
    1958 – LISP
    1958 – ALGOL 58
    1959 – FACT (forerunner to COBOL)
    1959 – RPG
    1960 – COBOL
    […]
* https://en.wikipedia.org/wiki/History_of_programming_languag...

FORTRAN, LISP, and COBOL are probably the big three 'legacy' languages still being used. BASIC was in 1964.


Just like C23 has very little resemblance to K&R C.

In fact, it is so far back, that the standard dropped support for the syntax, and changed semantics of the empty parameter list.

After 49 years, to keep your 1974 date, not the youngest reaching half century of age.

Also I mentioned about, not exact time period.


And now proper debugger support it would seem...

That has been available for decades as well, this is only about lldb.

GDB and Visual Studio debugger were supported.

gdb works with fortran, no?

None of the programming languages that are popular today is a good replacement for Fortran, because by default they have very poor support for arrays and for many features of the floating-point computations.

The languages that are extensible, like C++, allow the definition of custom data types and of operators for them, with which the defects from the language specification can be compensated.

But that means that it is not enough to choose a programming language to replace Fortran, but also a set of libraries that would provide facilities at least as good as those provided by default in Fortran.

Such libraries introduce additional dependencies, so the choice is not simple.

Julia is one of the very few programming languages that has been intended for the same domain of applications as Fortran, but Julia has made some controversial design choices and it is doubtful that there are many cases where substituting Fortran with Julia would be a definite improvement in comparison with using the latest Fortran standard.


intels fortran compiler can often beat c. there is also absolutely nothing wrong w modern fortran

had to maintain simulations which hot loop was written in fortran. i learned the hard way why they are in fortran..


Fortran is a beautiful language for scientific computation. The only problem is a) dogshit older code and b) the lack of ergonomic high level abstractions. The first is excusable since Fortran predates logical IF statements, and the latter is trivial with python, FFI and an LLM.

Typed Unions and Visitors give you sum types and the like.

What kind of high level abstraction do you feel is too unergonomic to use?


One thing that could be nice is having an ergonomic language that transpiles to Fortran.

B has been solved for a while, we are on Fortran 2023 nowadays.

You get as much ergonomics as a language like Zig, that gets praises all over the place.


I don't know, I feel like I have more job security now (as far as performance related aspects go; faith in my employer, not so much) than ever before. My job is to encode into software simulation techniques from several disciplines, and whereas previously, if I was not already an expert in one area, I simply couldn't fulfill the ask. Now, I can, since I know the "shape" of what I expect the solution to look like (to borrow Claude's terminology), I can actually complete all the projects asked of me.

Then I guess you figured out the units pretty easily.

Look, I use Claude every day. It's great for my work, and it genuinely makes me more productive, and I like it.

That said, I live out in the boonies (as far east from the SF bay area as you can go before there is just nothing but the forests of the Sierras). They are talking about building a data center in Ione, a small town out here in the middle of nowhere (not quite as remote as where I am). Now, I cannot fathom why that would be a good place. There's no water, there's no infrastructure, we're not near any internet backbone. Perhaps land is cheap out here, but electricity is served by PG&E, so I don't imagine it's particularly cheap. I, and everyone I know living out here, are vehemently against building data centers out here. It just makes no sense to put them out here, especially with the wildfire risks. There's really no propaganda needed to make people hate them.


I see this take frequently; that coding does not require general intelligence. Perhaps I am in the minority, but rarely do I find myself in coding situations that are completely divorced from other subject areas. The code is modeling or interacting with the world, either through business processes, or (in my case) simulating the physical world, and I need the agent to have some working knowledge of not just the code, but also physics, materials, or social conventions. Are you all really able to just "write code" without dealing with all the externalities?


The externalities have to be dealt with using human judgment. Ai can help organize data to make better judgements but that use case is taken by chat based AI.

By the time, we want to code, the scope has been limited pretty greatly to the point that my rule to the Ai is “don’t make any decisions outside of the plan, if something in the plan turns out to be untrue or cannot be implemented after 2 differing attempts stop and ask for clarification”.

Sub frontier level Ai can circle endlessly thanks to a bad assumption, but a human can cut through that by coming at the problem sideways.


Its a good point that there is benefit to using general intelligence models to figure out what code to write and to write specs. Implementation plans as well as long as the general intelligence is also great at coding. But you would actually prefer here the model that performs best in your business domain rather than best at general intelligence.

The Opus frontier model will spin up a cheaper Sonnet subagent to explore the code base. Similarly we can have a Pareto optimal subagent write most code and verify it.


How often you needed the coding AI know all the trivia about some metal band? Like who are the members, songs , years etc. You can't even be sure if the facts are correct . This are good for a generalist model where you say remember some scene from music video and the AI will find the video for you.

Sure some world knowledge like things are affected by gravity, how people function, how a society function I think is needed for a coding AI but not trivia.


Are you approaching it like programming? I first design the program I want it to write, and then let the LLM implement it. All the important decisions it has to make are contained in the design. The LLM only has to know programming and a little bit of algorithms to implement it.


How often do the cousins of Louis the 5th of France impact on coding decisions? I can't see the argument for a completely generalist model being best for _coding_ in all situations.


They probably don't. But some words acquire their full sense meaning from historical and-non-programming context.

Words that are or were fairly common in tech circles — "bailiwick", "gatekeeper", "daemon", "boundary", "infer", "method".

It's true to say that most of these words have some specific meanings in tech, but you don't necessarily want the LLM to have only those narrow meanings when you are talking to it. A broader grasp of the word means the LLM won't go down a specific pathway before understanding you by analogy. That broader grasp comes from non-programming understanding.


That too is a solvable problem if you have the sensors for it. You can critically damp or choose a motion profile to have essentially no swing.


I love OpenSCAD and code-based CAD, but even I must admit it's really only good for simple things and is more of a toy than a tool to solve real world problems. The main issue is fundamental, which is that CSG operations change topology in unpredictable ways, and there is no reliable way to refer to the components of the result. This is already bad for a few operations, but becomes exponentially problematic for more complicated models. Even in 2D, suppose I want to make a C-shaped thing out of a box and subtracting a different box out of it. You don't know how many edges the result will have, or even how many connected components the result will have, so how do you go on to perform the next step "on that one part that I want" if it even exists? Of course for a single concrete instantiation this is not really a problem, but the whole point is to have the shape tunable based on parameters, and once you allow that all hell breaks loose.


The great thing about OpenSCAD is that it makes it easy to model objects which may be represented by positioning/stretching/adding/subtracting cubes, spheres, cylinders, and cones using mathematics.

The awful thing about OpenSCAD is what one can model in it is directly limited to ones fluency and facility with using math to position, stretch, add, and subtract cubes, spheres, cylineders, and cones.

There is an entire book series on using it didactically:

- Geometry: https://www.goodreads.com/book/show/58059196-make

- Trigonometry: https://www.goodreads.com/book/show/123127774-make

- Calculus: https://www.goodreads.com/book/show/61739368-make

and there is a new book on Physics: https://www.makershed.com/products/make-physics


Yeah, I oscillate a ton between code-based CAD (OpenSCAD, Build123d) and Fusion 360 and they require very different ways of thinking about things, with different things being easier/harder with each approach.

I hesitate a bit to call code-based CAD "a toy", but there are a lot of times where what I think I actually want is some kind of, sorry for the phrasing here, fusion of Fusion 360 and OpenSCAD. The Fusion timeline is pretty phenomenal and having the ability to do something like code steps and manual "click on all of the edges you want to put a fillet on" steps interwoven seems like it has a lot of potential for my "ultimate CAD workflow". The timeline part is kind of the magic that unlocks the whole thing:

- update a parameter or a piece of code, triggering a recompute - see that the fillet operation is now missing an edge - rewind the timeline, tweak the fillet edge set - fast-forward the timeline to let the rest of the code blocks re-execute

Things like MakerWorld let you upload parametric OpenSCAD files and that's cool and all, but for my own uses I don't care if I need to use the "insert a manual step in the timeline" feature occasionally. OpenSCAD on its own doesn't have that and the idea of trying to do "operations as code" in Fusion (there is a scripting interface) is not super appealing as-is.

Being able to use hand-created objects as function inputs seems pretty powerful too. As an example, instead of needing to manually specify all of the points to make a polygon that I'm going to do a bunch of OpenSCAD extrudes with, just referencing a sketch earlier in the timeline. My current OpenSCAD "hack" for that is to draw those in FreeCAD as DXFs and then import them, but it's not a smooth workflow at all.


I could have written this same comment! For the most part I stick with Fusion, although my experience with build123d has also been great.

At the risk of spamming this thread, check out FluidCad. It has excellent GUI based cad tools, and those same tools generate the equivalent 'code cad' for each operation. Of course you can also use 'code first' instead.

I think it's really exciting, and while it's early in development it is already very usable.


One can argue that living apart from society is aiming to fulfill the same goals as those trying to colonize Mars; it is an effort to shore up human resiliency in the face of an uncertain and possibly less hospitable future of the planet. The skills required to bootstrap civilization and the technological stack need to be practiced and exercised so they do not die out, and this kind of off-grid living is very much keeping those threads alive.


Well, if you really believe that, then we truly are screwed. Trusting humans to not mis-use something is wishful thinking.


I see all these comments here dunking on the article, but I have to say, I basically completely agree with all the points the author is making. I think there are different kinds of software engineers, and the author's point of view resonates with those of us that are mostly concerned with building tools, rather than products. At the end of the day, I need the tool to work so that it can be used to build other things. In that sense, coding is dead for me. Anything more than trivial few dozen line changes to the codebase is going to be done by claude. It will figure out the hidden dependencies and gotchas more carefully than I will on a given time budget. And for me, unit tests have always been an afterthought, so the fact that the agent will also add unit tests for its modifications means it's strictly more disciplined than I ever was. I've been at this for 25+ years, and had the fortune to be able to largely be a "cowboy coder" but those days are long gone.

I still love writing code myself, but as I use LLMs more, I'm realizing it's not really the coding I actually loved, it was the software architecture and up front design work. Once the structure and plans are laid out, writing the code is just mechanical, and I'm going to reach for an agent if I can. Of course, these days, I find myself asking claude for advice on architecture as well, but that is much less a deferral of responsibilities than asking for an audit or survey.


Thanks. You get me. I like the architecture/design too, but coding itself was actually enjoyable for me. That's what I'll miss.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: