[racket-dev] Search by example (was Re: Roogle?)
Three hours ago, Tony Garnock-Jones wrote:
> On 2011-08-06 4:41 PM, Robby Findler wrote:
> > But I think in Racket we have better ways of avoiding such danger
> > (namely using the sandbox library or the pieces it builds
> > upon). In general, in fact, you'd have to do that anyways, since a
> > contract can be some arbitrary predicate (and don't forget do-dads
> > like #:pre and friends).
>
> OK - so rather than using the contracts as a kind of executable
> documentation, just go ahead and try out each possibility in the
> sandbox? Not a bad approach.
This makes more sense. In some cases, the contracts would be
implemented manually (eg, primitives), etc. So running it in a
sandbox makes the most sense in terms of getting safe executions as
well as limiting the time you wait for each try.
*However*, there's an awful lot of functions to try -- going over them
will make a very slow search...
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!