Frink

frinklang.org

236 points by lisper 2 months ago


deng - 2 months ago

This is interesting, but I doubt anything will ever come up in my lifetime that is even close to replacing Emacs Calc for me. I still consider it to be the best scientific calculator ever written. It's crazy that many Emacs users aren't even aware that it exists. It comes with an almost ridiculously extensive manual, complete with exercises and everything:

https://www.gnu.org/software/emacs/manual/html_mono/calc.htm...

It's probably overkill for most people, and I'm sad that I don't get to use it as much as when I was a student, but it's still a beautiful rabbit hole to fall into. And it works in a terminal just fine. :-)

timewizard - 2 months ago

I present you, if you're into this sort of thing, one of the snarkiest files on the internet.

https://frinklang.org/frinkdata/units.txt

Alan's editorializing on the nature of radians and hertz is my favorite thing.

synapsomorphy - 2 months ago

Interesting project. I use command line Qalculate [1] for this (has a very similar feature set to Frink AFAICT) and Pint [2] for scripting. I feel like unit-aware calculators are hugely underused by physical engineers, it's the same idea and benefit as type safety but they're virtually unheard of, everyone just uses excel. Having guaranteed dimensional correctness is so great for the early design stage, it makes it a lot easier to explore the problem space.

[1] https://qalculate.github.io/ [2] https://pint.readthedocs.io/en/stable/

vdm - 2 months ago

https://numbat.dev/doc/comparison.html

nqzero - 2 months ago

this is 100% proprietary and the source code for this isn't available: https://frinklang.org/faq.html#OpenSource

i'm open to non-FOSS licenses (and advocate for and use a class of them), but in this case 1. afaict, the license offers zero rights to the user 2. for me personally, i want more rights for a language than for an app, eg mongo

adius - 2 months ago

My new go-to language for any calculations is https://numbat.dev.

It’s a statically typed programming language for scientific computations with first class support for physical dimensions and units.

Great ergonomics and a pleasure to use!

rrgok - 2 months ago

A little bit of a tangent: I love the homepage. It includes everything I need to know about the language in a single page. Features, documentation with code examples and links between sections. And everything is one ctrl+f away.

nkrisc - 2 months ago

Looking at the sample calculations, isn’t the first example missing the temperature of the water?

https://frinklang.org/#SampleCalculations

peter_d_sherman - 2 months ago

This subsection looks like the key to understanding Frink:

https://frinklang.org/#HowFrinkIsDifferent

(That, and we warmly welcome Frink to the club of computer programming languages! (as we once did for Perl, Java, PHP, Rust, Clojure, Go, Zig, Nim, Python, etc. etc.!))

cmacleod4 - 2 months ago

Name collision - there is an unrelated "Frink" at https://catless.ncl.ac.uk/Programs/Frink/ which is a formatter and checker for the Tcl language.

anta40 - 2 months ago

I wonder if there's a similar CLI tool? Nothing against GUI-based tool, but easily usable on terminal is plus point.

owlstuffing - 2 months ago

I use Java with manifold-units[1] for this. Some examples: ‎

>

// commonly used unit abbreviations e.g., m, ft, hr, mph, etc.

import static manifold.science.util.UnitConstants.*;

...

Length l = 5m; // 5 meters

Length height = 5 ft + 9.5 in;

Length distance = 80 mph * 2.3 hr;

Force force = 5kg * 9.807 m/s/s; // 49.035 Newtons

Force f = 49.035 kg m/s/s;

force == f // true

force == 49.035 N // true

1. https://github.com/manifold-systems/manifold/tree/master/man...*

- 2 months ago
[deleted]