Live data from Hacker News

Frink

frinklang.org

41–50 of 66 posts

Re: Frink

#41
post #35

Earlier quoted context omitted.

GNU units

Or Duckduckgo. For some reason GNU units never understands what I type, which is of course my own incompetence, but DDG does a fine job.

Programs reflect the character of those who wrote them.

That's why using GNU stuff is such a pain (for me, at least.) They are the most fastidious, unforgiving, unhelping pieces of software to ever be written.

Re: Frink

#42

I'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 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…

I have successfully used rink [1] as an IRC bot. To me it was "good enough", but YMMV.

[1] https://github.com/tiffany352/rink-rs/

Re: Frink

#43
post #32

For people in Python-world, I've tried many units packages and tend to prefer 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 objects: volume = q('10 feet') * q(10, 'feet') * (10 * u.feet…

As far as I know, facts and information can't be copyrighted, which means at the very least the raw data in units.txt can be used freely with flagrant disregard for licensing.

Careful! Collections (databases) of fact can often be copyrighted.

Re: Frink

#44

Earlier quoted context omitted.

Don'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 ) probably there is something with a license.

A map is not copyrightable. It is just a diagram of facts. Mapmakers protect themselves by inserting fake data which they can then use to claim copyright.

It looks like it's the other way around:

https://en.wikipedia.org/wiki/Trap_street#Legal_issues

>In Alexandria Drafting Co. v. Andrew H. Amsterdam dba Franklin Maps, the court ruled that "fictitious names may not be copyrighted" and "the existence, or non-existence, of a road is a non-copyrightable fact".

Maps are copyrightable (I think?), but the trap streets themselves aren't. They're only there to detect when someone is copying the map.

Re: Frink

#45

For people in Python-world, I've tried many units packages and tend to prefer 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 objects: volume = q('10 feet') * q(10, 'feet') * (10 * u.feet…

> I'm wondering about an importer for the Frink ones... but https://frinklang.org/frinkdata/units.txt doesn't seem to have a license?)

That data is almost all taken from GNU Units, including the descriptions, which means it might be under the GPL. Frink itself doesn't seem to be open source at all?

I wrote a parser and interpreter [1] for the GNU units descriptions a while ago, you can see the parsed json here [2] (kg! are base unit definitions, "micro_" are prefixes)

[1] https://github.com/phiresky/qalc-react

[2] https://github.com/phiresky/qalc-react/blob/master/data/gnu-...

Re: Frink

#46
post #16

How is this different than Unix `units`? https://en.wikipedia.org/wiki/GNU_Units

Frink is a (Turing complete?) programming language. GNU Units is a program.

Definitely Turing complete, I've implemented SKI calculus in both Frink and my implementation Farnsworth.

Re: Frink

#47
post #41
post #35

Earlier quoted context omitted.

Or Duckduckgo. For some reason GNU units never understands what I type, which is of course my own incompetence, but DDG does a fine job.

Programs reflect the character of those who wrote them. That's why using GNU stuff is such a pain (for me, at least.) They are the most fastidious, unforgiving, unhelping pieces of software to ever be written.

Indeed. The most singularly maddening thing to read in a man page is undoubtedly "The full documentation for foo is maintained as a Texinfo manual. If the info and foo programs are properly installed at your site, the command info foo should give you access to the complete manual."

Re: Frink

#48
post #39

Earlier quoted context omitted.

I’m guessing they meant that it would require a good carpenter to make a room exactly 3m x 4m x 3m

How would it be harder than to make a room exactly 10 feet x 12 feet x 8 feet?

I'm guessing they are from the US where carpenters work with feet and inches rather than with meters.

Re: Frink

#49
post #25

Earlier quoted context omitted.

Hmm, 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.

If you define a "radian" like that you lose all the nice properties of sin like sin(x)' = cos(x)

Yes. The radian is exactly what it HAS to be. Nothing more, nothing less. Just like the natural constant e.

Re: Frink

#50

For people in Python-world, I've tried many units packages and tend to prefer 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 objects: volume = q('10 feet') * q(10, 'feet') * (10 * u.feet…

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

I haven't even tried the software yet, but that file is a great read. An excerpt (part of a rant about the definition of the candela):

  //   What really annoys me is that the official definitions
  //   don't come right out and say, "okay, we're sorry, this
  //   is obviously a useless definition for any other
  //   wavelength, and it doesn't even make sense for *that*
  //   wavelength.  We know.  It sucks.  The guys at the 16th
  //   CGPM went out and got drunk the night before instead of
  //   working on the definition, and they all sheepishly passed
  //   this in in the morning, and went back to bed.  They got
  //   fired later, make no doubt.  It's on our list of bugs.  
  //   We're sending in the Wolf to fix it directly.
  //   Here is the workaround, but we consider it broken
  //   and we're ashamed to have ever put it forth in this
  //   useless form and left it this way for 30 years.
  //   For now, here is one single draft standard equation to use
  //   for other wavelengths.  Download it here.  We promise
  //   that the link works and contains a computer-readable 
  //   table (though we're too sloppy to actually create a good
  //   smooth polynomial fit that would be a lot cleaner and
  //   easier for everyone) and is not some PDF of a terrible
  //   unreadable old re-scan, stashed away somewhere, making 
  //   you wonder if it's valid today, nor is it a ridiculous CIE
  //   document that you have to *pay* a hundred bucks for, when
  //   we could and absolutely need to distribute it for free.
Post reply on HN