caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matt Gushee <mgushee@havenrock.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] [ANN] Bantam: a lightweight file manager for X11
Date: Mon, 02 May 2005 00:21:29 -0600	[thread overview]
Message-ID: <4275C6E9.8020002@havenrock.com> (raw)
In-Reply-To: <700d600f05050122287ed4a4f6@mail.gmail.com>

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


      parent reply	other threads:[~2005-05-02  6:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-02  4:21 Matt Gushee
     [not found] ` <700d600f05050122287ed4a4f6@mail.gmail.com>
2005-05-02  6:21   ` Matt Gushee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4275C6E9.8020002@havenrock.com \
    --to=mgushee@havenrock.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).