astGrad
Squants
astGrad | Squants | |
---|---|---|
1 | 8 | |
15 | 910 | |
- | -0.1% | |
10.0 | 2.9 | |
over 1 year ago | 9 days ago | |
Nim | Scala | |
- | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
astGrad
-
Show HN: Numbat – A programming language with physical dimensions as types
I mean that article of yours highlights the difficulties one encounters fairly well, I would say. I don't disagree that this is (generally) a tricky problem!
Nim allows you to do a lot, e.g. derivatives of a unitful expression with measurement errors [0]. But other aspects run into the reality of dealing with a static type system. For example in Measuremancer [1], the library handling measurements with uncertainties, each `Measurement` is a single generic `Measurement[T]`. Each measurement stores the derivatives for error propagation. Obviously the derivatives have different units. Now, we could make `Measurement` a two-fold generic, `Measurement[T, U]`, but that just makes things more unwieldy in practice, for not much gain.
Without rewriting a majority of existing code you will always run into trouble where your perfect unit type system will either break or you'll need to work around it anyway (e.g. calling into some C library for part of the code).
[0]: https://github.com/SciNim/astGrad#extra-fun
[1]: https://github.com/SciNim/Measuremancer/
Squants
-
Improving our safety with a physical quantities and units library
Scala's squants library is a nice implementation of units-of-measure/dimensional-analysis http://www.squants.com
In particular it uses types for dimensions; whilst units are just constructors. Hence `Meters(2)` and `Microns(7)` have the same type (`Length`).
- Show HN: Numbat – A programming language with physical dimensions as types
- The type system is a programmer's best friend
-
Is Scala a good choice for a data intensive web backend?
squants for the “Market” package to use in financial calculations.
-
Please put units in names
take a peek at https://www.squants.com looks like not in your language, but maybe you can apply some same concepts
-
Atlas, a (hopefully) better engineering IDE
You might find the Squants library for Scala interesting; it even seems like an apt usage of some oft-questioned language features.
https://github.com/typelevel/squants
- Ratio Templates?
What are some alternatives?
insect - High precision scientific calculator with support for physical units
Breeze - Breeze is a numerical processing library for Scala.
numbat - A statically typed programming language for scientific computations with first class support for physical dimensions and units
Axle - Axle Domain Specific Language for Scientific Cloud Computing and Visualization
Measuremancer - A library to handle measurement uncertainties & error propagation
PredictionIO - PredictionIO, a machine learning server for developers and ML engineers.
Spire - Powerful new number types and numeric abstractions for Scala.
rscala - The Scala interpreter is embedded in R and callbacks to R from the embedded interpreter are supported. Conversely, the R interpreter is embedded in Scala.
Compute.scala - Scientific computing with N-dimensional arrays
FACTORIE - FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.
Smile - Statistical Machine Intelligence & Learning Engine
Rings - Rings: efficient JVM library for polynomial rings