I used to maintain a large FORTRAN codebase - it seemed like every time new grad students showed up, everyone got a wise idea to re-build everything in a modern language.
This question is revisited a lot, but the general consensus has been that FORTRAN is fast, simple, easy to understand and code, and the compilers used are super optimized (Intel's FORTRAN compiler was really a gem - it managed to do a ton of automatic parallelization on modern hardware)
I'll see if I can find it, but I remember attending a conference talk at AGU in ~'08-10 called "Do-over or make-do" [1] that analyzed how many people-hours it would take to update all the climate modeling software (earth and space sciences are really huge on legacy FORTRAN code), and the conclusion of that talk was: use modern code/tools for glue, keep your climate models in FORTRAN.
There's a ton relating to precision - we had a huge ordeal converting our 32-bit space weather model to 64-bit because the change in precision changed our results, so we couldn't publish (in good conscious) without making sure the results weren't within a good margin of error. Anyhow.
This is always a fun thing to revisit now that I'm really far away from having to maintain any FORTRAN code any more :)
Julia is taking some inroads in climate modelling: "when the coder-climatologists of the Climate Modeling Alliance (CliMA) — a coalition of US-based scientists, engineers and mathematicians — set out to build a model from the ground up, they opted for a language that could handle their needs. They opted for Julia."
It probably helps that Julia and Fortran are both column major.
When interfacing with C languages, that can be a big penalty (depending on the complexity of the algorithm).
It will probably take two generations of developers to make this happen, but well worth it. When I was studying atmospheric science I tried to understand OpenWRF (weather research forecasting) and the barrier was too high... And I had programming experience, imagine those with none!
An open source project is only as useful as it is accessible to it's average developer base.
That's awesome, and not at all a surprise! It makes a lot of sense when building from the ground up to choose a great tool, and Julia has had some serious adoption in academia.
I think long term it has enormous potential to take over as _the_ language for modelling.
The reason is that for every hyper optimized climate model there are a thousand small or medium models. For these Julia offers sufficient performance and excellent developer experience.
Although Fortran compilers may produce fast code (they have to - there's no chance to play with SIMD intrinsics or templates unless you want to use C++), I don't find them very good. I've personally hit several bugs in gfortran. The code I maintain now has some extremely ugly hacks to work around unfixed compiler bugs. I recently tried compiling it with Intel Fortran and got a compiler crash on one input file. Maybe they work well with Fortran 77 level code, but the Fortran 2003 level support seemed rather buggy. I suppose this is the problem with a minority language.
I won't recommend Fortran unless the code has to be written by scientists who know nothing else. It has horrible string support, no data structure or algorithm library (like STL), no templates, few non-numeric libraries (e.g. http, json...) and (as above) buggy compilers. Furthermore, C++ gives you much more control over numerical speed when you need it.
We could never use gfortran, and other open source compilers were not really great for us either. We used Intel's fortran compiler, and it stood out as a pure gem. At the time it was free for educational/research purposes, which is why we used it, but if we had to pay (I think the license was like $1k/yr) we would have done it in a heartbeat.
Our code was entirely FORTRAN 66 and 77, so that may explain why it worked so well for us.
Ditto this, I've run into some strange compiler bugs I've had to work around. Intel Fortran 2019 actually fails to compile a code at work that's worked for ~40 years, Intel Fortran 2018 compiles it but produces numerical errors when the code runs. Intel Fortran 2016 actually works perfectly, as do several earlier versions.
With gfortran I run into issues primarily when using the "newer" features of Fortran 2003/2018.
I wonder if when global warming starts eating coastal cities will the government have to seek out centenarian fortran programmers to analyze the climate models?
(like the new jersey unemployment system in cobol)
What? Where is this good string support in Fortran 2003, 2008 and 2018? I must have missed it in the manual. Now you can allocate a string of a non fixed size - simply amazing technology! Actually, one of my compiler crashes was trying to use this revolutionary feature.
Many languages forbid mutable strings. They aren't really a very good idea, imo. Even less of a good idea are extensible strings. More complex data structures are required for efficient extensible strings, and this complexity shouldn't be hidden in a simple interface. Better to have a Buffer type or something that is distinct from the String type so programmers are made aware of the performance/allocation characteristics.
Though, this is kind of ridiculous to even talk about, since the CPU and compiler itself are responsible for the greatest sins of hiding something unimaginably complex behind a simple interface.
Delphi had mutable xor aliased strings. That is really great. Each function can change the string as fast as a mutable string, but once it shared with other functions, they can be certain that it will not be changed randomly
> we had a huge ordeal converting our 32-bit space weather model to 64-bit because the change in precision changed our results, so we couldn't publish (in good conscious) without making sure the results weren't within a good margin of error
This is a really interesting dimension to the transition that I've never considered before. An actual change in correctness, not just compatibility. I would have thought for floats it would just add more decimal points
One of our numerical analysis(NA) professors had worked at NASA, at IBM and had enormous real-world experience in NA. Several weeks into the class he challenged us to write a correct square root routine in FORTRAN. Over the next two weeks submissions were presented in class, where our professsor showed how each had multiple critically fatal errors. He let it stew awhile: two weeks before semester's end he presented and explicated to us a correct implementation of the square root, which turned out to be far more lengthy and involved than we had imagined. He said there was always the possibility of more bugs being present. That was really an eye-opening class.
I saw that done years ago in assembler for UNIVAC mainframes. Tear apart the exponent and mantissa. Shift mantissa if exponent is odd. Shift exponent right one bit to get square root of exponent. Look up starting guess from table using a few high bits of mantissa. Run two iterations of Newton's method. Reassemble mantissa and exponent. Normalize. Done.
musl sqrt is here, about hundred lines of code with nice explanation on top. Considering that it has 1993 copyright stamp, I'd imagine it is fairly canonical implementation
FWIW, I didn't bother getting too deep into an analysis (I was an undergrad and not really savvy enough to deep dive, but maybe I could now if I went back :) )
Our model was a space weather model of the solar wind speed and density - it was very iterative, and I think that iterative nature is what contributed to quirks in the transition - think of the issues when summing say, 0.1 ten times in Python (or other languages) - ultimately, we didn't need to do any real work to show that our converged model was within a margin of error and still presented the same results in terms of predicting solar flares - but it was still a lingering curiosity that the numbers weren't exactly the same (as you say!) - most of the work was done in finding the right compiler parameters to not break existing code, while taking advantage of the larger memory space.
I came here to ask whether your typical Fortran program would carry the coding security risks that Rust is designed to mitigate; I couldn't think of any. Your comment seems to confirm my doubts.
It probably wouldn't have affected my work at all. We were running our code as a monolith - it was the only thing that ran on any given machine, and its output was stored on a large filesystem on NFS.
That's not to say there isn't someone out there with this concern :)
More seriously, I could imagine a security flaw in numpy wreaking all sorts of havok. But it's also somewhat difficult for me to imagine that there are any security vulnerabilities left in BLAS. But then I remember Heartbleed.
I think „coding security risks“ referred to language properties that increase the likelihood of introducing bugs in a general sense, not in terms of cyber security/hacking.
> we had a huge ordeal converting our 32-bit space weather model to 64-bit because the change in precision changed our results, so we couldn't publish (in good conscious) without making sure the results weren't within a good margin of error.
Had you done some kind of external validation of the original results? If not, surely the new results are just as valid to publish as the original ones - any bugs are as much or more likely to be in the 32-bit than the 64-bit version.
Yep. Our model was run by other organizations and incorporated into amalgamated models that had further downstream error bars that they needed.
Not that our model contributed much but we were one tiny part of the early warning system for solar flares for satellites and astronauts.
We admittedly weren’t super formal about the transition but wanted to make sure the differences wouldn’t be meaningful or propagate into other models we contributed to.
Also fwiw, we had no control or say over how others ran our model so they could have easily done their own 64 bit build of our code but I think it’s unlikely.
> There's a ton relating to precision - we had a huge ordeal converting our 32-bit space weather model to 64-bit because the change in precision changed our results, so we couldn't publish (in good conscious) without making sure the results weren't within a good margin of error.
That sounds like a question of numerical stability of the algorithm, rather than anything to do with the programming language, no?
Yep. Fair point. The folks I worked with were very pragmatic so didn’t get into the internals and just treated the code as the instructions. Many of them came from an earlier era where the code was a lot more specific and the concept of an R8 is not quite as specific on x86_84 as it was on a VAX because the modern CPU does a lot of tricks under your nose.
It's nice to have a setup that lets you get stuff done with a remote machine without needing a lot of parts strung together - I had this at a previous role. I've also had roles with very little support, and being able to spin up all the utilities I needed on a work computer was helpful.
The phishing link they have set up to get your friends IP is pretty shady, obviously this stuff is easy to do, but pretty weak to make it easier for folks. https://iknowwhatyoudownload.com/en/link/
There are people with abusive and stupid partners who wouldn't be able to get this information without doing more work or paying money.
Yep - I don't mean to admonish the creator of this - it's great to surface this information so people are more informed of how they are monitored online. We all make mistakes, and the world has a lot of good people in it as well as bad ones :)
I also think that without actual regulation/oversight, sometimes the best way to deal with it is absurd overreach, it sometimes is the only thing that wakes people up.
Agree, I like this article because it makes an interesting study of how our work shapes our culture, and if we're looking for parallels to tech, this sounds a bit like Conway's law: https://en.wikipedia.org/wiki/Conway%27s_law
The way you grow crops helps determine the social structure of the society that grows the crops, and vice versa to an extent.
Actually this is just Marxist history (which isn't the same thing as political Marxism btw, it just means a history that looks at how material conditions create reality).
I didn't read the article, I am not going to but the abstract suggests it is a pretty severe interpretation (talking about relationships is risky ground imo)...you have to be careful because material conditions tend to be correlated to other stuff but it is a well-developed branch of history (particularly, economic history).
Honestly that's the most convincing thing about Marxism - economics drives everything else, because if you ain't got the money you can't do anything else in the game.
That’s a puzzling assertion - Marxism is one of few isms that reject the fundamental principle of voluntary exchange which says in order to get what you want you need to provide the other party with something of equal or better value (in other party’s opinion) in return.
In Marxism everyone should get what they “need”. Which means no one does which eventually results in shortages and corruption.
> because if you ain't got the money you can't do anything else in the game.
And how does one “get money”? By looting? What would Marx do?
This isn't Economics...I tried to explain this in my first post. Marxist history != Marxism. They overlap significantly but most economic history until the 1990s was Marxist because it emphasised economic determinism (and, in fact, a lot of economics these days is Marxist in this sense too). The implications of economic determinism are slightly more complex (even Lenin did not completely buy it) but it is different from the layman's understanding of Marxism.
To give you an example, Adam Tooze (who has written a ton of very good books on economic history) is a Marxist historian.
Deaths may look stable/going down, but that's potentially difficult to understand given regional reporting. I think deaths are naturally down as the "first wave" hit many long term care facilities with a much higher death rate than the rest of the population.
Check out the SF data: comparing "All California" to Bay Area shows that we're rising in cases and deaths in california as a whole, but flat/declining in northern california.
This phenomenon, I believe, is happening all over the place.
My tinfoil hat theory (that others may have had, or it may be something I read somewhere...) is that the XMPP protocol was part of what made PRISM successful, and the timing of these orgs adding XMPP is kind of aligned with when they were “online” for PRISM.
I’m pretty sure the larger orgs that were targeted could tell that the only way this information leaked easily, or was justified, was because of XMPP metadata, or some other large scale flaw.
A lot of these bugs are used to test for fake user agents. Even sophisticated bots may not know that their fake user agent’s V8 version had a jit or rounding bug. If you watch change logs you can spot this stuff. Most of these are obvious and sophisticated fraudsters are well beyond that.
I could say it’s defensible but a big reason bots are a problem is the way the entire online ad system is still the Wild West. There is no regulation so I wouldn’t be surprised if a majority of the bots were just competitors. It has to be tempting to use that black hat fraud defense knowledge against your competitors, especially if there is so little regulation or transparency.
This isn't true for all registrars. My domain expired and it was re-sold via auction within seconds of its expiration. Network Solutions used to have a retention policy, they don't follow it if your domain has been bid on. I lost a domain I had owned since about 1997 this way :/
Folks here probably already know, but any time I see functional and python in the same sentence, I like to remind folks about Hy: https://github.com/hylang/hy
I think it operates on the AST in python, which is also nifty.
Not exactly, and nothing that I can think of that would really fit in this circumstance.
Had TikTok originated in the US and been bought by a foreign company, The Committee on Foreign Investment in the United States could have ordered the foreign company to divest itself of that asset. An example was Grindr being purchased by Kunlun Tech, and CFIUS deciding that this wasn't allowable. --The idea being that the type of data Grindr has could pose national security issues (due to government employees or elected officials being blackmailed, not that Grindr has ever been known for any form of security).
With TikTok, however, it seems to be more about posturing. I'm not sure what legal mechanism they could really use to force the app to be blocked.
Sort of. There are a lot of international regulations that prevent things like SaaS companies from servicing Iran and Korea - so they could just introduce some “justifiable” legislation and then ask Apple to enforce it which they probably would.
Informally, the US government pressured payment processors to cut off WikiLeaks. All the major players complied. I'm not a lawyer, but that certainly feels like a violation of the 1st Amendment to me.
> I don't think someone in China seeing my TikTok videos
Leaving aside mechanisms and policies, this is not about seeing videos, this is about the invasive amount of information TikTok collects from devices it runs on.
But it isn't about you. We already know that social media can be, and is, used to track details by nation states on all sorts of things, from the movement of individuals of interest, as well as things such as estimating the population of military bases, discovering military operations, etc.
A foreign government having access to all of that data for a huge portion of the population is 100% a national security risk.
Then ban military people from using it, problem solved.
This level of paranoia looks more like the Soviet Union[1] than it does like a free country.
[1] Where you couldn't even buy a map, because heaven forbid, foreign spies might use them to compromise... National security. They might learn the distances between the army base, and the hospital, and then who knows what diabolical plot they may hatch?
It could be for example if your neighbor works for CIA or at some secret research laboratory. They can learn a lot about them by watching your funny cat videos.
A) Your neighbor's laptop is partially compromised, and part of what is obtained is a list of APs with which it has been associated.
B) Your phone has TikTok installed, and part of what is obtained is your location and the available APs (while you're using the app, only).
C) You use your phone to view TikTok videos in the middle of the night, at home.
Because of B+C, the foreign actor now knows where you live (via location services) and the wireless APs nearby. Because of A, they know where your neighbor's laptop has associated. Taken together, they now have a reasonable level of confidence where your neighbor lives even though they have never installed TikTok.
If your neighour's machine is pwned, they could just look at the addresses on the bills he receives in his e-mail.
And if they want to know where my neighbour lives, they could just consult a... Land deed registry. Or their resume.
Or... Run a credit check on them. That last one will also give personal information at a level of fidelity right down to the number of nose hairs that they plucked this morning.
But let's cycle back to that. How does knowing my neighbour's address compromise national security? Am I compromising national security by telling you that John Leslie lives in Apt 341 on my floor? Even if he works for the Air Force?
Keep in mind - the man has to live somewhere. What relevance of note does where he lives in particular have to a nation state?
For example match car plate numbers with locations and timestamps. By analyzing millions of videos they can build a driving pattern for a particular vehicle.
Given that ~99.999% of the time, the average cellphone user is not recording a video, and ~99.9% of the time, license plates are not visible in videos, and ~99.9% of license plates are utterly uninteresting, this is an absolutely horrible example of a non-threat.
If this is the best argument that can be made, then national security is safe as houses.
they can't ask ISPs to block connections for particular servers? no need national firewall for that it's not like you have that many ISP options and people will switch ISP to have access to bunch of Chinese spyware
Apple regularly punishes privacy-invasive apps, and also apps that they and other tech giants deem misinformation (all apps are banned from presenting COVID-19 data, Infowars was deplatformed, etc). While they do stand up to OS-level encryption-breaking requests, they don't necessarily have a problem with banning apps.
What makes you say Apple is well-known for refusing invasive government requests? They’ve gladly been handling over all iCloud data for Chinese users to the CCP (meaning many of its users were unknowingly sharing all their sensitive videos/pictures/text with the authoritarian government). They’ve also been banning foreign apps from the Chinese App Store, and have similarly banned foreign apps in other countries, such as India.
In the US, they've repeatedly refused the FBI's demands to help unlock people's phones. They seem to view censorship as the price of doing business in other countries; I'm not exactly happy about that, but as far as I can tell it doesn't transfer over to their attitude stateside.
Which law are you referring to? To my knowledge there isn't a "Just do what I tell you to" law on the books. Apple and Google could decide willingly to ban the apps from their app stores but outside of that I'm curious what law could be brought to bear that would force them.
I'm not sure that a foreign company has any rights under the constitution to begin with. It's contentious whether or not it grants rights to a foreign citizen while they are outside of the US's borders, so claiming that ByteDance would have their constitutional rights violated by such a ban would be even more so.
However, if this were to happen, it would almost certainly be under national security law, which has pretty far reaching powers for this sort of thing. Knowing how much the app spies on you, and knowing that they are ultimately under control by the Chinese government, there's a very strong case to be made.
(Yes, I know this is a company owned by the Beijing based ByteDance but that’s not immediately disqualifying of this US corporation run under US law being able to defend itself in a US court system as any other US company would.)
It's not immediately disqualifying, no, but it would almost certainly be squashed quite quickly by the US's NSL. (Funny how the NSL in HK and the US are both so pertinent in China related discussions these past few days!)
Having set up a corporation on US soil does not grant free pass to a foreign government to spy on US citizens.
I would think it's actually Google and Apple's constitutional rights that would be at issue, since they're the ones hypothetically being restrained from publishing certain apps.
This question is revisited a lot, but the general consensus has been that FORTRAN is fast, simple, easy to understand and code, and the compilers used are super optimized (Intel's FORTRAN compiler was really a gem - it managed to do a ton of automatic parallelization on modern hardware)
I'll see if I can find it, but I remember attending a conference talk at AGU in ~'08-10 called "Do-over or make-do" [1] that analyzed how many people-hours it would take to update all the climate modeling software (earth and space sciences are really huge on legacy FORTRAN code), and the conclusion of that talk was: use modern code/tools for glue, keep your climate models in FORTRAN.
There's a ton relating to precision - we had a huge ordeal converting our 32-bit space weather model to 64-bit because the change in precision changed our results, so we couldn't publish (in good conscious) without making sure the results weren't within a good margin of error. Anyhow.
This is always a fun thing to revisit now that I'm really far away from having to maintain any FORTRAN code any more :)
edit found it! [1]: https://www.easterbrook.ca/steve/2010/12/agu-session-on-soft... [2]: slides http://www.cs.toronto.edu/~sme/presentations/Easterbrook-AGU... Also randomly found this: http://www.moreisdifferent.com/2015/07/16/why-physicsts-stil...