out of curiosity, why fortran? no disrespect. I wrote a lot of scientific software in the earlier days of my career and I learned fortran to update ocean modeling software.
> why fortran? why not? the language is straightforward and loops are fast. It is portable and your code will work unchanged for the next 50 years. It may be a bit verbose, but that's not a big deal with today's tooling.
Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
81–90 of 91 posts
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#82Earlier quoted context omitted.
Modern versions of Fortran are reasonably pretty. It’s a fairly nice language. You can probably get better performance out of C/C++ with unlimited effort. But, it is really nice for allowing computational scientists to get, like, 95% of the way there. I think it actually suffers from the reputation as this ancient/super hardcore performance language. The name comes from “Formula Translating System,” which implies… it…
ive maintained a simulation software where the core is written in fortran. its using some intel math library that is expensive that i cannot recall, does immense calculations and makes faster binaries than c on every compiler we tried
In Fortran, arrays are not allowed to overlap which allows some optimisations. c has rules in the spec about how memory accesses must occur, and overlapping arrays being possible prevents some compiler optimisations. The restrict keyword is you promising that the memory at some pointer won't be accessed through another pointer.
You can compare two implementations in Fortran/c using godbolt to see how each of them compile.
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#83Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#84I'm curious if you used AI during development and how it handled Fortran
This was quite straightforward to code ’manually’, but we got stuck for some hours when trying to send the first message. CPU topped, fans spinning, no message through. Analyzed, and after a while when we got same block the nth time, someone proposed Claude.
So Claude got the repo, prompted Claude:
”You got one job, why isn’t message through and why CPU usage high?”
He didn’t solve it. Probably could have if we kept Clauding.
But we found the problem. The issue was that the code was hitting the terminal 300 times trying to send the message :)
For clarity reasons Claude got the job to write the README, personally I don’t like that approach, but we got many other projects so time management basically.
We are building Cobolsky too.
Right now we are building the part to get images through using Apples old algo. Will be 576x720 using the Föoyd-Steinberg dither, 1984 Apple algorithm :)
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#85Earlier quoted context omitted.
ive maintained a simulation software where the core is written in fortran. its using some intel math library that is expensive that i cannot recall, does immense calculations and makes faster binaries than c on every compiler we tried
Have you tried using the restrict keyword everywhere you can in c? In Fortran, arrays are not allowed to overlap which allows some optimisations. c has rules in the spec about how memory accesses must occur, and overlapping arrays being possible prevents some compiler optimisations. The restrict keyword is you promising that the memory at some pointer won't be accessed through another pointer. You can compare two imp…
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#86Earlier quoted context omitted.
> why fortran? why not? the language is straightforward and loops are fast. It is portable and your code will work unchanged for the next 50 years. It may be a bit verbose, but that's not a big deal with today's tooling.
Yea na, Fortran is pretty compiler dependent and there are a lot of compilers. Already old Fortran code used all sorts of now-dead proprietary compilers and can take a huge effort to get it to compile on modern compilers or even modern computers. Modern code might use Gfortran which sometimes makes breaking changes so that's not an option. Perhaps if everyone uses the latest shiny new Flang or whatever, then it'll fi…
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#87Earlier quoted context omitted.
I came here to suggest COBOL as a better fit, then saw your comment a few levels up in this thread. Out of curiosity, does your implementation use CODASYL? (For people that don't pay much attention to historical software systems, most CODASYL implementations were similar to JSON document databases, so going that way isn't as crazy as it sounds.)
Great comment! Thanks! No CODASYL, the JSON parser is hand-rolled Fortran with a depth-tracking key scanner CODASYL not a crazy direction for the feed composer Got more depth to explore here, still early :)
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#88out of curiosity, why fortran? no disrespect. I wrote a lot of scientific software in the earlier days of my career and I learned fortran to update ocean modeling software.
You are not the first one to ask :) We built Cobolsky. Will go public soon. Parallelly too curious on Fortran. The world is better with a Fortran-based social network client in it :) When we are building the feed composer, in next version, Fortran will be great for the algorithm etc. Keeping the ancient languages alive. I built some Cobol stuff many years ago. Back at it again. Rusty. Both Cobolsky and Fortransky loo…
Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#89Re: Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran
#90Earlier quoted context omitted.
Your code will work unchanged until you try to change compilers or your compiler adopts a J3 breaking change to the language.
> your compiler adopts a J3 breaking change to the language Like all the 3 of them they added in the last 30 years, and that compiler vendors are not enforcing anyway because they don’t want to annoy their users? Windows’ backward compatibility is a joke compared to Fortran.