From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA18517; Mon, 14 Oct 2002 11:46:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 LAA18437 for ; Mon, 14 Oct 2002 11:46:50 +0200 (MET DST) Received: from favie.faith.gr.jp (favie.faith.gr.jp [61.127.175.250]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9E9km501305 for ; Mon, 14 Oct 2002 11:46:49 +0200 (MET DST) Received: from localhost (dhcp7.faith.gr.jp [192.168.1.17]) by favie.faith.gr.jp (8.9.3/8.9.3) with ESMTP id SAA27993; Mon, 14 Oct 2002 18:46:41 +0900 To: checker@d6.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] Runtime overflow and what to do In-Reply-To: <4.3.2.7.2.20021013175437.032eb130@mail.d6.com> References: <200210121613.MAA27433@psi-phi.mit.edu> <20021013112815.K13771@pauillac.inria.fr> <4.3.2.7.2.20021013175437.032eb130@mail.d6.com> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20021014184615Q.garrigue@kurims.kyoto-u.ac.jp> Date: Mon, 14 Oct 2002 18:46:15 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Chris Hecker > > echo "print_int Sys.word_size" > /tmp/caml$$ > > WORDSIZE=`ocaml /tmp/caml$$` > > rm -f /tmp/caml$$ > > We clearly need a "-eval" switch to ocaml, like perl's -e/n/p. :) The above can be reduced to one line, without temporary file. In fact, I feel more like we would need a "-silent" option, to get rid of prompts and types (this is already the default with scripts). echo "print_int Sys.word_size;;" | \ ocaml | grep "^# ." | sed -e "s/# //" -e "s/- :.*//" A shorter but more specific approach is echo "Sys.word_size;;" | ocaml | grep "# -" | sed -e "s/.*= //" Jacques Garrigue ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners