Live data from Hacker News

Translating a Fortran F-16 Simulator to Unity3D

vazgriz.com

71–80 of 129 posts

Re: Translating a Fortran F-16 Simulator to Unity3D

#71
post #35

I just learned about the slug and I‘m absolutely flabbergasted that this exists.

The confusion between force and mass tends not to get appreciated by many folks outside of engineering. Particularly in aerospace when you slip the surly bonds of earth and your mass stops being so bound to the force your feet impart on the floor.

Re: Translating a Fortran F-16 Simulator to Unity3D

#72

My Mom was a FORTRAN programmer for a defense contractor from the late 50s to the mid 90s. She spent her career doing things like that F16 simulator. The last thing I remember her talking about was one of the B1 or B2 bombers. When I was elementary school age in the late 70s, I'd go into her office with her sometimes on school holidays that were not work holidays. She'd let me play Colossal Cave Adventure on a termin…

FWIW she probably wasn’t breaking any security protocols - basically as long as the kids can’t read well they are fine to be escorted without the red light. I used to take my daughter into the SCIF when she was about 2 when needed, and there was a week where I was took my son into work at the Pentagon. I working for Snake Clark at the time and people kept bringing him candies and treats. I think he was watching carto…

I do a double-take if I see a dog! I've seen babies, but I'm pretty sure anyone that can walk or talk would be a no-go. My assumption is OP wasn't in a facility like that.

Re: Translating a Fortran F-16 Simulator to Unity3D

#73

In keeping with the discussion here a few days ago, this article demonstrates exactly my point about developer types not being the target for computational codes. Their interpolation routine looks extremely verbose already, I cannot imagine them attempting to solve or compute any other more complex formula like that beyond a mere 2d interpolator writing so verbosely like that. The result would be unreadable, to my ey…

Math or engineering people do not have problems with short symbol names, that's it. Also our formulas are complex. If you wrote out many of our formulas with long descriptive variable names the structure and relation between the variables would no longer be readable, there would be many more mistakes. We were educated doing these things on paper with pages and pages of math with these symbols. 20 years later I can st…

Sometimes I dream about a language with a “blessed” editor that just had a rich 2D formula and matrix notation editor. Having context in the form of a formula is sometimes helpful in remembering what a pesky one-off variable name might mean…

Re: Translating a Fortran F-16 Simulator to Unity3D

#74
post #18

Earlier quoted context omitted.

I'd agree with 1-based indexing problems, but not 0-based, which seems very natural. And if you have -2-based, I'd argue that perhaps you don't want an array.

I think it's down to personal preferences/how you think. I haven't actually used any languages that didn't have 0 based indexing, but I remember it being very painful and super unintuitive to learn, it just didn't make sense at all (still doesn't, but it's not a problem for me anymore). I always thought 1 based would make a lot more sense and be way easier to learn.

0 based is much simpler for any mathematical calculation done with the indexes. only reasons I can think where you need to handle it is when getting the last index from the length of the array or when interacting with the user. With 1-based you'll need to subtract or add 1 all over the place when doing almost anything

Re: Translating a Fortran F-16 Simulator to Unity3D

#75
post #35

I just learned about the slug and I‘m absolutely flabbergasted that this exists.

Other "interesting" units include: shakes, barns and bans

https://en.wikipedia.org/wiki/Shake_(unit)

https://en.wikipedia.org/wiki/Barn_(unit)

https://en.wikipedia.org/wiki/Hartley_(unit)

Re: Translating a Fortran F-16 Simulator to Unity3D

#76
post #68

When I was growing up computers were getting faster by leaps and bounds, and I remember a video game that was so 'sophisticated' that it needed a math (FP) co-processor (80387) to play some parts of it: > The program requires a minimum of a 12MHz 80286, 1MB RAM, DOS 5.0 or DR DOS, one 1.2MB 5 1⁄4" or 1.44MB 3 1⁄2" disk drive, hard drive with 11MB of free disk space, and VGA graphics. In addition, Falcon3.O supports a…

Falcon 4.0 source code leak led to Falcon BMS, still actively developed today.

Falcon 4.0 was one of the worst bugfests I ever encountered, practically unplayable; the modding community did a tremendous job to fix and improve that mess. At the time of its release it was even worse than Privateer 2: The Darkening, a title whose structural imperfections were only matched by its utterly bizarre Britkraft sci-fi setting.

Re: Translating a Fortran F-16 Simulator to Unity3D

#77
post #62

Earlier quoted context omitted.

Lua actually has arbitrary indexing, it's just that some iterator functions in the standard library assume arrays begin at 1.

It does and doesn't. You can have any arbitrary index, but that changes the table from being an array to being both an array and a dictionary, some real weird Frankenstein stuff

> but that changes the table from being an array to being both an array and a dictionary

You're confusing the definition of the language with the implementation. In implementation you're right, most runtimes will treat arrays starting at 1 as a special case and optimize that access. The language itself doesn't make that distinction though. Here an array is simply any table indexed by integers. The documentation states it's thusly:

    You can start an array at index 0, 1, or any other value

Re: Translating a Fortran F-16 Simulator to Unity3D

#78

My Mom was a FORTRAN programmer for a defense contractor from the late 50s to the mid 90s. She spent her career doing things like that F16 simulator. The last thing I remember her talking about was one of the B1 or B2 bombers. When I was elementary school age in the late 70s, I'd go into her office with her sometimes on school holidays that were not work holidays. She'd let me play Colossal Cave Adventure on a termin…

Great story, thank you for sharing!

Your mom was awesome :)

Re: Translating a Fortran F-16 Simulator to Unity3D

#79
post #54

Earlier quoted context omitted.

I would say it is sensible. Given that an array index is an unsigned integer, what are you going to do with an index of zero? Perhaps I've been influenced by writing a lot of code in assembler, way back when, but zero-based has always seemed completely natural to me, to the extent that I find it very hard to understand algorithms expressed in non-zero based code.

An array index can be signed with no problem. If you're worried about the address calculations, well, the address of an array doesn't have to be the address to its initial element, does it? It can be the address of the element with index 0 (even if an array does not have such an index at all): arr: array[-2..10] of integer; pointer(@arr) == pointer(@arr[0]) Or you can use descriptors (dope vectors), but that involves…

Yes, I'm familiar with Pascal indexes, but I don't find them very natural for the kind of programs I write. I want functions/classes to do any sort of translation.

> The books on compilers from the 70s (e.g. Gries's "Compiler construction for digital computers")

Yellow cover, I think? My then GF bought it for Xmas at about 1984 or so. Not the best book on the topic, IMHO.

Post reply on HN