[HN Gopher] The Jame of Life
___________________________________________________________________
The Jame of Life
Author : gbrown_
Score : 34 points
Date : 2021-05-21 09:25 UTC (1 days ago)
(HTM) web link (buttondown.email)
(TXT) w3m dump (buttondown.email)
| inimino wrote:
| This is an interesting post, but I think it should have mentioned
| the point that GoL is a tour-de-force to show off what is
| possible in the language, but it's not what the language is
| mostly used for. Most people using J or APL will just be getting
| some statistics out of large tables of numbers, or simulating
| something. So it's a little unfair to criticize the language for
| not being well suited to the problem. It's an extreme example of
| something well beyond what you would normally see written in that
| style.
| narrator wrote:
| I worked translating APL into C. APL died for the same reasons
| Perl died. Nobody wants to read your code. APL had the niche back
| in the 70s that it was a very productive language for 110 baud
| teletypes where you could watch the characters coming back from
| the timesharing system print out line by line as you waited. In
| that age, conciseness was a killer feature.
| rscho wrote:
| APL died? A large part of banking and heavy industry runs on
| APL, so I don't think so...
| donkarma wrote:
| It's dead, just still decaying
| tromp wrote:
| Sometimes a simpler language beats one with problem specific
| primitives. For instance, Haskell is well equipped to do a short
| prime number generator with
|
| nubBy(((>1).).gcd)[2..]
|
| where nub removes duplicates from a list according to some notion
| of equivalence, which in this case is having a greatest common
| divisor greater than one.
|
| That's just 23 bytes. Can we beat that with a language with no
| such arithmetic and list support?
|
| It can in fact be beaten with a language that has no built-in
| numbers, let alone arithmetic.
|
| This 167 bit Binary Lambda Calculus [1] program 00110101000101000
| 10100010000010100000100010100010000010000010100000100010100000100
| 010000010000000100 produces the infinite characteristic sequence
| of primes.
|
| [1]
| https://tromp.github.io/cl/Binary_lambda_calculus.html#Compl...
___________________________________________________________________
(page generated 2021-05-22 23:01 UTC)