Code.nasa.gov
code.nasa.gov
code.nasa.gov
>>libSPRITE defines engineering units as types (i.e., Meters or Radians instead of double or int).
I guess experience is a harsh teacher.[1]
[1]http://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_f...
I was just thinking I've seen that at my job, but then I noticed [1] is my employer, heh.
I had no idea. That is crazy cool. Do you have any recommended resources for learning how this works behind the scenes?
(I tried implementing something similar in Swift, without knowledge of prior examples, so probably ended up doing it in a really dumb way. I tried using structs ('Quantities') containing the underlying value and also dimensional information, and then enabling mathematical operations using operator overloading and generics. I'd love to know of a better/"proper" way of implementing it though. The big unknown for me was the best underlying type/data structure to use to represent SI dimensions, including fractional dimensions, and that would allow them to be combined algebraically. Might just have to have another go this weekend following F#'s example!)
Edit: found this paper if anyone's interested http://research.microsoft.com/en-us/um/people/akenn/units/CE...
http://fsharpforfunandprofit.com/posts/units-of-measure/
The units are lost at runtime and are used for static type checking only. So if you were to consume an F# lib from C# (for example) then you wouldn't have a such strong system. Hopefully one day they'll end up as part of the CLR so it can be enforced at runtime too.
I used his library for my internship. Cool stuff. And he was a great teacher.
It looks like the fork linked to on code.nasa.gov is a few years behind.
OSI says it's an open source license, but FSF says no. In your case, I'd say you're in the clear, since you're clearly making an “original creation” in NASA terms.
Does anyone know why NASA's open source code isn't in the public domain like it's supposed to be [0]?
[0] https://en.wikipedia.org/wiki/Copyright_status_of_work_by_th...
That only applies to works done by federal employees. Most of the coding is probably done by contractors, who are not required to release their work under public domain. However, it seems NASA might have made it a part of the contract to release the code under an open source license.