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 SAA32584; Mon, 14 Oct 2002 18:48:46 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA00042 for ; Mon, 14 Oct 2002 18:48:45 +0200 (MET DST) Received: from relay.pair.com (relay1.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id g9EGmgD05899 for ; Mon, 14 Oct 2002 18:48:44 +0200 (MET DST) Received: (qmail 59779 invoked from network); 14 Oct 2002 16:48:40 -0000 Received: from adsl-host-sf-228.apexworld.net (HELO checkerlap.d6.com) (66.114.212.228) by relay1.pair.com with SMTP; 14 Oct 2002 16:48:40 -0000 X-pair-Authenticated: 66.114.212.228 Message-Id: <4.3.2.7.2.20021014094010.03418790@mail.d6.com> X-Sender: checker@mail.d6.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Mon, 14 Oct 2002 09:49:00 -0700 To: Jacques Garrigue From: Chris Hecker Subject: [Caml-list] new ocaml switches (was Re: Runtime overflow and what to do) Cc: caml-list@inria.fr In-Reply-To: <20021014184615Q.garrigue@kurims.kyoto-u.ac.jp> References: <4.3.2.7.2.20021013175437.032eb130@mail.d6.com> <200210121613.MAA27433@psi-phi.mit.edu> <20021013112815.K13771@pauillac.inria.fr> <4.3.2.7.2.20021013175437.032eb130@mail.d6.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >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). Yes, I agree with -silent too! The only problem with using the pipe for everything is that Win2k's echo passes the quotes along to ocaml, so you need: echo Sys.word_size | ocaml Sadly, this means you'll need different commands on unix versus nt. -eval would avoid that problem to a large extent, except in that case quoting inside a string is different between the two systems, so you're stil kind of hosed. We probably need all of these switches! Would -silent not print anything that wasn't "printed" from the script, or would it only print the types? Maybe we need -Q for printing nothing (script must print to stdout), -qq for printing only values, and -q for printing types and values. Or something. And -e[val] for evaluating a string (should support multiple of them on a single command like perl does, which is handy). Not sure if there are equivalents for perl -n & -p that we'd want...ocaml is a bit heavy for quick scripting like this, so -eval might be enough. Chris ------------------- 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