Re: [racket-users] Listing All Programs

2019-09-05 Thread Jens Axel Søgaard
Den tor. 5. sep. 2019 kl. 23.27 skrev Josh Rubin : > > On 9/5/2019 9:05 AM, Adam Golding wrote: > > What is the shortest/smallest racket program (ithat enumerates all and > > only valid racket programs? > > > > You might be interested in the logic-programming/constraint-solving > language named

Re: [racket-users] Listing All Programs

2019-09-05 Thread Sage Gerard
With a Racket section to boot. Thanks so much for sharing this! I had no idea about this kind of application. Original Message On Sep 5, 2019, 5:26 PM, Josh Rubin wrote: > On 9/5/2019 9:05 AM, Adam Golding wrote: >> What is the shortest/smallest racket program (ithat

Re: [racket-users] Listing All Programs

2019-09-05 Thread Josh Rubin
On 9/5/2019 9:05 AM, Adam Golding wrote: What is the shortest/smallest racket program (ithat enumerates all and only valid racket programs? You might be interested in the logic-programming/constraint-solving language named miniKanren. http://minikanren.org/ miniKanren can solve puzzles

Re: [racket-users] Listing All Programs

2019-09-05 Thread Adam Golding
if it executes? On Thursday, 5 September 2019 09:56:48 UTC-4, dvanhorn wrote: > > But whether a program is syntactically valid is not an easy thing to > decide in a language like racket... > > On Thu, Sep 5, 2019, 9:45 AM Laurent > > wrote: > >> Probably only those that output Chaitin's

Re: [racket-users] Listing All Programs

2019-09-05 Thread Sorawee Porncharoenwase
Oh, this is easy. The grammar of Racket is #lang * which, as I showed above, is expressible as regular expression. Regular languages are easily decidable :) On Thu, Sep 5, 2019 at 9:07 PM Laurent wrote: > Although it's not about checking, but generating, which *may* be easier. > (Though if

Re: [racket-users] Listing All Programs

2019-09-05 Thread Laurent
Although it's not about checking, but generating, which *may* be easier. (Though if one can generate all syntactically valid programs in program size order, then checking is just a matter of checking for membership in the list of all programs of size less than the program. This list can be huge

Re: [racket-users] Listing All Programs

2019-09-05 Thread David Van Horn
But whether a program is syntactically valid is not an easy thing to decide in a language like racket... On Thu, Sep 5, 2019, 9:45 AM Laurent wrote: > Probably only those that output Chaitin's constant ;) > > But otherwise I would guess "syntactically valid", in which case it would > be easier

Re: [racket-users] Listing All Programs

2019-09-05 Thread Laurent
Probably only those that output Chaitin's constant ;) But otherwise I would guess "syntactically valid", in which case it would be easier to consider only lambdas with only one argument. Though if you want to also use all of Racket's primitives (that is, including I/O), then good luck. My

Re: [racket-users] Listing All Programs

2019-09-05 Thread David Van Horn
What do you mean by valid? On Thu, Sep 5, 2019, 9:05 AM Adam Golding wrote: > What is the shortest/smallest racket program (ithat enumerates all and > only valid racket programs? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To