From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 24B07BCA8 for ; Mon, 2 May 2005 08:21:35 +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 j426LYIh006528 for ; Mon, 2 May 2005 08:21:34 +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 IAA10507 for ; Mon, 2 May 2005 08:21:34 +0200 (MET DST) Received: from mz2.forethought.net (mzpi4.forethought.net [216.241.36.13]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j426LWCh030391 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 2 May 2005 08:21:34 +0200 Received: from [216.241.35.41] (helo=[10.0.0.2]) by mz2.forethought.net with esmtp (Exim 4.30) id 1DSUJ8-0000hX-5r for caml-list@inria.fr; Mon, 02 May 2005 00:21:32 -0600 Message-ID: <4275C6E9.8020002@havenrock.com> Date: Mon, 02 May 2005 00:21:29 -0600 From: Matt Gushee User-Agent: Mozilla Thunderbird 1.0 (X11/20050108) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] [ANN] Bantam: a lightweight file manager for X11 References: <4275AAC5.5090509@havenrock.com> <700d600f05050122287ed4a4f6@mail.gmail.com> In-Reply-To: <700d600f05050122287ed4a4f6@mail.gmail.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4275C6EE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4275C6EC.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 alas:01 byte-code:01 ocaml:01 getenv:01 binary:01 kludge:01 handler:01 wrote:01 exception:01 exception:01 bin:01 bin:01 native:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Janne Hellsten wrote: > Hi Matt, > > I compiled this with Ocaml 3.08.3 & Tcl/Tk 8.4. Alas, not all is > well. When I run bantam.bin, I get this: > > janne@nurbian:~/bantam-0.1$ ./bantam.bin Fatal error: exception Not_found > Raised by primitive operation at unknown location > > This was all I got with byte-code and OCAMLRUNPARAM=b=1. Native > version printed just the Not_found exception info. Well, you're being too clever! You (no, I don't really mean you, the OCaml developer, I mean "you" the generic user) are not supposed to know bantam.bin even exists; you're just supposed to run 'bantam', which is a shell script. The cause of that exception is Sys.getenv("BANTAM_USER_DIR") That variable is set by the 'bantam' shell script to its default value, $HOME/.bantam; or you can override it by setting the variable manually (BTW, the shell script also creates the $BANTAM_USER_DIR if it doesn't exist). Now, I agree this is a problem. I suppose that exception should be handled, and maybe there's a need for better documentation. I'm not really sure of the best way to deal with this, but one of my objectives was to be able to produce an easily installed, relocatable binary. And there needs to be a per-user directory for configuration, helper scripts, and trash. The shell script is a bit of a kludge, but I don't see another way to do it without either (a) eliminating flexibility in installation or (b) limiting the audience for the program to OCaml developers. I'm open to suggestions. I appreciate the feedback. I'll add an exception handler in the next version. Meanwhile, see what happens if you just run 'bantam.' Best regards, Matt -- Matt Gushee Englewood, CO, USA