From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 18DF8BDCB for ; Thu, 8 Sep 2005 11:53:52 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j889rpxF016534 for ; Thu, 8 Sep 2005 11:53:51 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA03802 for ; Thu, 8 Sep 2005 11:53:50 +0200 (MET DST) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j889roT6031964 for ; Thu, 8 Sep 2005 11:53:50 +0200 Received: from acerf.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id 06ABA132; Thu, 8 Sep 2005 12:53:49 +0300 (EEST) Subject: Re: [Caml-list] Shortest hanging From: Ville-Pertti Keinonen To: Jon Harrop Cc: caml-list@inria.fr In-Reply-To: <200509080450.50695.jon@ffconsultancy.com> References: <200509080450.50695.jon@ffconsultancy.com> Content-Type: text/plain Date: Thu, 08 Sep 2005 12:53:48 +0300 Message-Id: <1126173228.732.45.camel@acerf.exomi.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 43200A2F.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43200A2E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 rec:01 rec:01 tokens:01 -rectypes:01 tokens:01 wrote:01 hangs:02 shorter:02 shorter:02 let:03 let:03 thu:05 2005:89 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thu, 2005-09-08 at 04:50 +0100, Jon Harrop wrote: > Whilst trying to find the shortest OCaml program that hangs, I came up with: > > let rec f() = f() in f();; > > and: > > let rec x = 1::x in x=x;; Are you counting characters or tokens? The following is shorter either way: while true do () done;; With -rectypes you can also do: let f f = f f in f f;; Which is shorter in characters but has more tokens.