12 ms·
Frink
- sonofblah 8y agoIt makes you laugh, it makes you think, and then the thing...with the function? Frinky's not loading so good right now, HN.
- tosh 8y agoMirror: https://web.archive.org/web/20180812184707/https://frinklang.org/ https://web.archive.org/web/20180812184707/https://frinklang...
- Athas 8y agoI'm surprised the site died. It looks like a static website, and even a small webserver in a default configuration can serve thousands of files per second.
- scotty79 8y agoI don't think it's static: https://web.archive.org/web/20170718015315/https://frinklang.org/fspdocs.html https://web.archive.org/web/20170718015315/https://frinklang...
- mortehu 8y agoIt's much more likely to have reached maximum concurrency than maximum throughput. When the site is accessed by a general audience, many will access it through a 3G connection or worse, and their slow speeds will cause the number of concurrent connections to balloon. This website uses Apache, which sometimes defaults to a maximum of 10 concurrent workers.
- tosh 8y agoThe units file (and its comments) makes a thrilling read https://frinklang.org/frinkdata/units.txt https://frinklang.org/frinkdata/units.txt
- messe 8y agoThe section/rant about the candela is hilarious. Concluding with: > In short, candela = EPIC FAIL.
- gerdesj 8y agoThere are some great notes in there and also things that you will almost certainly not know already. Beware the SI's broken definition of Hz. You should treat the radian as being correct, as a fundamental dimensionless property of the universe that falls out of pure math like the Taylor series for sin[x], and you should treat the Hz as being a fundamental property of incompetence by committee. [...] Either way, if I ever develop a time machine, I'm going to go back and knock both groups' heads together. At a frequency of about 1 Hz. Or better yet, strap them to a wheel and tell them I'm going to spin one group at a frequency of 1 Hz, and the other at 1 radian/s and let them try to figure out which one of those stupid inconsistent definitions means what. Hint: It'll depend on which time period I do it in, I guess, thanks to their useless inconsistent definition changes. The rest of the diatribe on Hz ends up amusingly spittle flecked with some decent frothing in evidence. I always knew that the kilo was bollocks (lump in a jar) but that barely gets a nod here. I had no idea about the state of some of the other units (like Hz)
- repsilat 8y agoHmm, I guess it would have worked if a radian was defined as 1/(2pi) instead of 1. On the downside, you'd have to redefine things like `sin` to take multiples of "whole rotations" to make `sin(2pi radians)` (i.e., `sin(1.0)`) do the right thing.
- Twirrim 8y agoI love these examples: Let's say you wanted to fill your bedroom up with water. How much water would it take? Let's say your room measures 10 feet by 12 feet wide by 8 feet high. 10 feet 12 feet 8 feet -> gallons 552960/77 (approx. 7181.298701298701) It would take approximately 7181 gallons to fill it. Note that you get both an exact fraction and an approximation. (If you don't want to see the fraction, put a decimal point in any of the numbers, like 10. or 10.0.) How much would that weigh, if you filled it with water? Frink has the unit "water" which stands for the density of water. 10. feet 12 feet 8 feet water -> pounds 59930.84215309883 So it would weigh almost 60,000 pounds. What if you knew that your floor could only support 2 tons? How deep could you fill the room with water? 2. tons / (10 feet 12 feet water) -> feet 0.5339487791320047 So you could only fill it about 0.53 feet deep. It'll be a pretty sad pool party. This sits firmly in the "Neat, and now I'm sad I don't have a practical use case for this"
- simias 8y agoAmusingly, this example wouldn't be nearly as impressive if you used metric units instead.
- arnarbi 8y agoIndeed 3 m 4 m 3 m -> liters 36000 3 m 4 m 3 m water -> kg 36000 2 metricton / (3 m 4 m water) -> m 1/6
- deleted 8y ago[deleted]
- maxerickson 8y agoUr carpenter is amazing.
- lucb1e 8y agoI'm not quite sure what this means, but your profile proves you're not a spam bot, so I guess I won't flag it... did you submit this in the wrong tab or am I missing something?
- yeellow 8y agoFrink is really great as a sophisticated calculator (it is also quite powerful and nice programming language, but I've never used it's full potential). It helped me with cosmology classes assignments (very convenient unit conversions and built-in all physical constants I could wish for) . I just wish it had a better ide. I would love Frink Jupiter kernel with nice latex formula display. I emailed the author about that, but he wasn't interested. Maybe some skilled person from HN would take the challenge? Frink deserves more love, the amount of details included there is amazing and it's one man job. Very impressive.
- tosh 8y agoA talk on Frink by its author (Alan Eliasen) from the Emerging Languages Camp 2010 in Portland https://www.youtube.com/watch?v=6NZ_qvQy5Cc https://www.youtube.com/watch?v=6NZ_qvQy5Cc
- hardmath123 8y agoFrink is like 80% of the reason I passed first-year physics. It's like a typechecker… for science!
- ModernMech 8y agoDimensional analysis is the original type checking.
- deleted 8y ago[deleted]
- tniemi 8y agoHow is this different than Unix `units`? https://en.wikipedia.org/wiki/GNU_Units https://en.wikipedia.org/wiki/GNU_Units
- ModernMech 8y agoFrink is a (Turing complete?) programming language. GNU Units is a program.
- simcop2387 8y agoDefinitely Turing complete, I've implemented SKI calculus in both Frink and my implementation Farnsworth.
- heisenzombie 8y agoFor people in Python-world, I've tried many units packages and tend to prefer https://pint.readthedocs.io https://pint.readthedocs.io For the bedroom example someone posted, here's the equivalent in pint: import pint # Possibly my least favorite thing about Pint is # the verbose importing/instantiating dance u = pint.UnitRegistry() q = u.quantity() # there are multiple ways of making <Quantity> objects: volume = q('10 feet') * q(10, 'feet') * (10 * u.feet) volume.to('gallons) # How deep could you fill the room? (q('2 tons') / (q('10 feet') * q('12 feet') * u.water/u.gravity)).to('feet') Notes: - Pint has far fewer material property entries in its database (though one can make arbitrary unit registries --- I'm wondering about an importer for the Frink ones... but https://frinklang.org/frinkdata/units.txt https://frinklang.org/frinkdata/units.txt doesn't seem to have a license?) - That said, I'm not wild about Frink's treatment of material properties: Why is the constant `butter` a density, but `eggwhite` a mass, and `naturalgas` a specific energy? - Pint works (mostly) nicely with numpy and can (sometimes) drop into existing code, since <Quantity> objects quack like builtin numbers.
- ModernMech 8y ago> I'm wondering about an importer for the Frink ones... but https://frinklang.org/frinkdata/units.txt https://frinklang.org/frinkdata/units.txt doesn't seem to have a license?) This is just a list of facts, no? You can't really copyright such a thing.
- sllabres 8y agoDon't know if this holds water... E.g. a cartographic map: just a "diagram" of facts? Why not ask if there is a license for this file? Edit: And as I see in this thread there is gnu-units (https://en.wikipedia.org/wiki/GNU_Units https://en.wikipedia.org/wiki/GNU_Units) probably there is something with a license.
- jchw 8y agoThe expression of facts is copyrightable, not the facts though. So importing it is water tight.
- andrepd 8y agoFunny how one of the examples for translation >"I will not buy this record; it is scratched." -> Spanish >No compraré este expediente; se rasguña. is wrong x).
- moeffju 8y agoI think that is the joke, it's a reference to a Monty Python sketch about a (deliberately?) wrong Hungarian phrasebook. "I will not buy this record, it is scratched" is one of the examples in the sketch.
- simcop2387 8y agoI've actually built a similar language directly inspired by this one. It's been left to sit for a long time due to some issues with the implementation and language itself. https://metacpan.org/pod/Language::Farnsworth https://metacpan.org/pod/Language::Farnsworth I originally built it because I wanted an easier to integrate version into an IRC bot, the java implementation of Frink was hard to integrate safely (keep it from running too long, max memory usage, etc.) at the time and having a native perl version made handling a lot of that easier. Language wise, the problems I ran into were that, at least in my implementation, it began to get very difficult to parse a lot of things unambiguously and I couldn't solve them without a larger redesign of the language. In particular handling arrays and making user defined types easier to use and make (you can emulate that right now with currying and closures to make function calls simpler). I never got it past that step because I didn't want to do a complete redesign of the language and break all compatibility, right now about 80% of all Frink programs will probably just work fine in Farnsworth, and 90% with some minor tweaks.
- jedimastert 8y ago>CPAN Huh. I don't know why, but I never thought I'd see a Perl project anywhere in HackerNews. There might literally be dozens of us.
- lifthrasiir 8y agoI have successfully used rink [1] as an IRC bot. To me it was "good enough", but YMMV. [1] https://github.com/tiffany352/rink-rs/ https://github.com/tiffany352/rink-rs/
- lucb1e 8y agoBe sure to scroll down to the following part, where the author attempts to validate a fart joke using Frink: https://frinklang.org/#FartJokes https://frinklang.org/#FartJokes
- mwexler 8y agoFrink has been around for a long, long time, and the author has had a great sense of humour about some of the units he's thrown in. While I rarely need the tool, it's great to know that I can deal with cubits whenever I need to.
- kijduse 8y agoYeah but can it convert US measuring cups to anything usable in the EU? I’m still not even sure if it’s a weight or a volume.