[HN Gopher] Loda-lang - language, computational model, and OEIS ...
___________________________________________________________________
Loda-lang - language, computational model, and OEIS miner
Author : todsacerdoti
Score : 35 points
Date : 2021-09-24 08:37 UTC (1 days ago)
(HTM) web link (loda-lang.org)
(TXT) w3m dump (loda-lang.org)
| prezjordan wrote:
| This is hilarious and I love it. Two questions:
|
| 1) How can I see the programs that I mine? I ran mine but it's
| unclear if I've found any?
|
| 2) How can I start from the beginning? I'd like to see how long
| it takes to mine A01, for example
| tromp wrote:
| The notion of program optimization here is rather odd, as
| programs can refer to other programs in a single instruction. For
| example, the program for the prime numbers is
| seq $0,6005 ; The odd prime numbers together with 1. max
| $0,2
|
| and if we go down the rabbit hole, we find that the program for
| A006005 uses the instruction seq $0,98090 ;
| Numbers k such that 2k-3 is prime.
|
| where the A098090 program in turn uses seq
| $3,10051 ; Characteristic function of primes: 1 if n is prime,
| else 0.
|
| and this pattern continues with 4 programs containing
| instructions seq $1,80339 ; Characteristic
| function of {1} union {primes}: 1 if n is 1 or a prime, else 0.
| seq $0,38548 ; Number of divisors of n that are at most sqrt(n).
| seq $0,94820 ; Partial sums of A038548. seq $1,94820 ;
| Partial sums of A038548. seq $0,132106 ; a(n) = 1 +
| floor(sqrt(n)) + Sum_{i=1..n} floor(n/i).
|
| Where at last the program for A132106 doesn't use the seq
| instruction.
|
| There also seems to be a danger here of creating cyclic
| definitions.
| nixpulvis wrote:
| Neat.
|
| How many of the solution programs were originally hand-written vs
| machine generated from other known solutions or actually "mined"?
| Reading through https://github.com/loda-lang/loda-
| cpp/blob/main/miners.defau..., it seems like the "template" for
| each generator could have been minted one way or another. I'm a
| little curious now...
|
| It's kinda fun to see a program minimizer in ~200LoC++, but I
| wonder what other optimization tricks would be worth implementing
| for the purposes of integer sequence search? I wonder if it would
| be worth wiring up a proper compiler framework? Or are there
| other projects that already do this kind of thing faster?
|
| Instead of just "matching" it might be cool to sort these
| solutions by similarity and then compare that to the similarity
| of the sequences themselves.
|
| Finally, given that the OEIS databases exists with "FORMULA" (on
| every entry?), wouldn't it be faster to just parse that? Maybe
| you'd find some bugs?
| tromp wrote:
| There seems to be a problem with the mining. LODA programs are
| described as being programs "for an OEIS sequence" when they
| merely match in the limited number of terms given in the OEIS
| summary, even when it obviously doesn't describe the full
| sequence. An example is the entry for an inverse TREE function
| [1]
|
| A300402 (program): Smallest integer i such that TREE(i) >= n.
|
| which is claimed to correspond to LODA program
| min $0,4 div $0,2 add $0,1
|
| [1] https://oeis.org/A300402
| lain98 wrote:
| Unfortunately named.
___________________________________________________________________
(page generated 2021-09-25 23:01 UTC)