From martin.becker at mx.uni-saarland.de  Tue Nov  3 13:34:03 2009
From: martin.becker at mx.uni-saarland.de (Martin Becker)
Date: Tue, 03 Nov 2009 13:34:03 +0100
Subject: [Rd] Strange code in `?`
In-Reply-To: <4AEFFC67.7070206@sciviews.org>
References: <4AEFFC67.7070206@sciviews.org>
Message-ID: <4AF0233B.4020500@mx.uni-saarland.de>

I don't know if this is really a joke. It is certainly not easy to answer
   `?`(`?`(`?`(`?`(`?`))))
and spending some time trying to contact Delphi (maybe in order to 
permit cosmic radiation to feed the solution into the computer's RAM) is 
possibly one of the most promising approaches ;-)

Best,
  Martin

Philippe Grosjean wrote:
> Hello,
>
> In R 2.10, looking at:
>
> > `?`
> function (e1, e2)
> {
>     if (missing(e2)) {
>         type <- NULL
>         topicExpr <- substitute(e1)
>     }
>     else {
>         type <- substitute(e1)
>         topicExpr <- substitute(e2)
>     }
>     if (is.call(topicExpr) && topicExpr[[1L]] == "?") {
>         search <- TRUE
>         topicExpr <- topicExpr[[2L]]
>         if (is.call(topicExpr) && topicExpr[[1L]] == "?" && 
> is.call(topicExpr[[2L]]) &&
>             topicExpr[[2L]][[1L]] == "?") {
>             cat("Contacting Delphi...")
>             flush.console()
>             Sys.sleep(2 + rpois(1, 2))
>             cat("the oracle is unavailable.\nWe apologize for any 
> inconvenience.\n")
>             return(invisible())
>         }
>     }
>
> [...]
>
> I am especially puzzled by this part:
>
> cat("Contacting Delphi...")
> flush.console()
> Sys.sleep(2 + rpois(1, 2))
> cat("the oracle is unavailable.\nWe apologize for any inconvenience.\n")
>
> We now got jokes in R code? Why not? ;-)
> Best,
>
> Philippe

-- 
Dr. Martin Becker
Statistics and Econometrics
Saarland University
Campus C3 1, Room 206
66123 Saarbruecken
Germany



[Rd] Strange code in `?`
Martin Becker