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 unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/0b83b7d7-ea3e-434a-b6c4-f394a97fe4fd%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAFJHQkGS_%3DM9G%3DGaLXZgctO6UC_cR9VpqjXt5q211UOeOq2dFw%40mail.gmail.com.
Oh, this is easy. The grammar of Racket is
#lang <id> <whatever>*
which, as I showed above, is expressible as regular expression. Regular languages are easily decidable :)
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CABNTSaGqXagO98Ttx1-rjmqSrdNyHn4m_UUd5_xazF-xiW2O_Q%40mail.gmail.com.
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 <lauren...@gmail.com> wrote:
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 closest guess would be:(for/list ([i (in-naturals)])(mflatt i))
On Thu, Sep 5, 2019 at 2:31 PM David Van Horn <dvan...@cs.umd.edu> wrote:
What do you mean by valid?
On Thu, Sep 5, 2019, 9:05 AM Adam Golding <adamg...@gmail.com> 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 unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/0b83b7d7-ea3e-434a-b6c4-f394a97fe4fd%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/beea9305-6945-45fd-91b2-59e6162b6b1e%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/beea9305-6945-45fd-91b2-59e6162b6b1e%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/a0ee9cdb-c46d-4f3a-a9c3-4a9c700cec71%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/a0ee9cdb-c46d-4f3a-a9c3-4a9c700cec71%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/1be52cfa-9dc0-4379-b1fa-dfe65df2b2e9%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/b7389311-cc35-a725-dbaa-6ffc7153781b%40gmail.com.
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.