5 ms·
Frink is a programming language designed to make physical calculations simple
- xeonmc 3y ago> "I predict that within 100 years, computers will be twice as powerful, ten thousand times larger, and so expensive that only the five richest kings of Europe will own them." Not wrong with how the AI arms race is looking.
- wantoncl 3y agohttps://youtu.be/8QWne13R_j0 https://youtu.be/8QWne13R_j0 There's an additional prediction in there that's eerily accurate/Simpsons did it.
- makeworld 3y agoHow does this compare to GNU units?
- eggy 3y agoMuch better and and easier to juggle units. I program in Frink, use the one-liner as a desktop calculator, and along with SMath Studio, Excel and I have no need for much else to do my technical manual calculations for engineering. Of course this aside from heavy hitting multiphysics programming and FEAs. Alan has helped me a few times. I've donated given how long and how helpful Frink has been to me on a daily basis.
- juunpp 3y agoIt's fun, I'm a sucker for programming language posts. Also, why are functions labelled 'class'? https://frinklang.org/fsp/colorize.fsp?f=ConvexHull.frink https://frinklang.org/fsp/colorize.fsp?f=ConvexHull.frink
- meepmorp 3y agoThe interpreter seems to be written in Java, maybe that's just some abstractions leaking out.
- nielsbot 3y agoA reverse JavaScript-ism? You see, because in JS classes are… never mind
- schiffern 3y ago> why are functions labelled 'class'? In Frink it defines a static method. https://futureboy.us/fsp/colorize.fsp?f=classtest.frink https://futureboy.us/fsp/colorize.fsp?f=classtest.frink
- dang 3y agoRelated: Frink - https://news.ycombinator.com/item?id=26645172 https://news.ycombinator.com/item?id=26645172 - March 2021 (7 comments) The Frink Is Good, the Unit Is Evil - https://news.ycombinator.com/item?id=23799831 https://news.ycombinator.com/item?id=23799831 - July 2020 (41 comments) Frink Programming Language - https://news.ycombinator.com/item?id=22523362 https://news.ycombinator.com/item?id=22523362 - March 2020 (7 comments) Frink - https://news.ycombinator.com/item?id=21669195 https://news.ycombinator.com/item?id=21669195 - Nov 2019 (16 comments) Frink data file for non-changing units (2016) - https://news.ycombinator.com/item?id=20322262 https://news.ycombinator.com/item?id=20322262 - July 2019 (2 comments) Frink - https://news.ycombinator.com/item?id=17745726 https://news.ycombinator.com/item?id=17745726 - Aug 2018 (62 comments) Frink – A practical calculating tool and programming language - https://news.ycombinator.com/item?id=12825366 https://news.ycombinator.com/item?id=12825366 - Oct 2016 (24 comments) The Frink programming language - https://news.ycombinator.com/item?id=8893319 https://news.ycombinator.com/item?id=8893319 - Jan 2015 (11 comments) Fart joke myth busted using Frink - https://news.ycombinator.com/item?id=1543428 https://news.ycombinator.com/item?id=1543428 - July 2010 (22 comments) The Frink programming language - https://news.ycombinator.com/item?id=1541452 https://news.ycombinator.com/item?id=1541452 - July 2010 (10 comments) Frink: a JVM language for doing unusual but precise conversions - https://news.ycombinator.com/item?id=292985 https://news.ycombinator.com/item?id=292985 - Sept 2008 (1 comment)
- chc4 3y agoThere is also https://rinkcalc.app/ https://rinkcalc.app/ https://github.com/tiffany352/rink-rs/ https://github.com/tiffany352/rink-rs/ which is an alternative to Frink written in Rust
- deleted 3y ago[deleted]
- pavon 3y agoDoes anyone know of a calculator/language that supports units like this but uses prefix (RPN) syntax?
- abecedarius 3y agoGNU Calc, for Emacs, has both RPN and infix modes, iirc. (I need to go actually try it.) https://www.gnu.org/software/emacs/manual/html_node/calc/Units.html https://www.gnu.org/software/emacs/manual/html_node/calc/Uni...
- fsh 3y agoQalculate! has an RPN mode. As a research scientist, this is my default calculator (not in RPN mode though).
- leni536 3y agoorpie
- mordechai9000 3y agoI found this one, but I haven't tested it: https://github.com/eternal-flame-AD/unitdc-rs https://github.com/eternal-flame-AD/unitdc-rs I ran across it because I wanted to know if dc, the old Unix rpn calculator, could do units.
- ginko 3y agoFrink looks pretty interesting, but it's not open source as far as I know.
- smasher164 3y agoFrink is great. If you’re looking for a more general purpose language with a units system, consider F#: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/units-of-measure https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
- xxr 3y ago"Ah, neat, a new programming language." >Frink Applet "Ah, neat, a programming language that has eluded my attention for quite some time."
- krmbzds 3y agoThere is also an open-source Rust implementation called rink-rs. [0] https://github.com/tiffany352/rink-rs/ https://github.com/tiffany352/rink-rs/ [1] https://github.com/tiffany352/rink-rs/blob/master/core/definitions.units https://github.com/tiffany352/rink-rs/blob/master/core/defin... [2] https://rinkcalc.app/ https://rinkcalc.app/
- steego 3y agoI came across this repo where someone actually took the time to convert Frink's unit data to F# (which also supports units of measure) and I got to wondering if Frink's inspired it. https://github.com/avestura/FsFrink https://github.com/avestura/FsFrink BTW, I'd love to see more mainstream languages consider features like units of measure. I understand the tech-debt it would likely-incur, but I think it would be a fun mental exercise to really go through the different languages and ask how one might add units of measure. For example, in F#, the units are erased when they're compiled, so there is no runtime support for units. But I could imagine a dynamic/weaker typed language implementing it with runtime support where units are implemented like atomic symbols that are paired with numbers. Maybe each compound unit could be represented with a unique symbol that's created at runtime. Personally, I don't think languages explore enough with interesting literals. Combining units with non-numeric types like strings might make interpolation a little more interesting.
- tobias2014 3y agoIt seems to me that Haskell would be a great language for such a thing, ensuring correctness at compile time through the type system, e.g. using the units package https://hackage.haskell.org/package/units https://hackage.haskell.org/package/units https://github.com/goldfirere/units/tree/master/units https://github.com/goldfirere/units/tree/master/units It even has nice features like: "The laws of nature have dimensions, and they hold true regardless of the units used. For example, the gravitational force between two bodies is (gravitational constant) * (mass 1) * (mass 2) / (distance between body 1 and 2)^2, regardless of whether the distance is given in meters or feet or centimeters. In other words, every law of nature is unit-polymorphic." "The units package supports unit-polymorphic programs ..." If on the other hand you just want a small calculator with units (which actually does also come with a library), there's qalculate ( https://news.ycombinator.com/item?id=37037900 https://news.ycombinator.com/item?id=37037900 )
- actuallyalys 3y agoF# is in the same category of statically typed functional languages, and it has units of measure: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/units-of-measure https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref.... I'm not sure whether it has that level of unit polymorphism, although you can make functions generic over any unit of measure.
- paholg 3y agoRust as well. There are at least a few libraries to do it, but I'll link the one I wrote: https://crates.io/crates/dimensioned https://crates.io/crates/dimensioned
- hardlianotion 3y agoThat's very interesting, but why is it a language and not a library?
- layer8 3y agoSyntax.